Questions for django


581

optional fields in django models

I have the following model in django.
2771

Decoding unicode from Javascript in Python & Django

On a website I have the word pluČ™ sent via POST to a Django view.
5840

Django internationalization switching between languages

I have a french and a english site up, very basic. I created my fr language file. I have a few translated strings to test this to make sure it works but I am confused as how to set up the actual li...
1055

python USER_BASE error

I am using python 2.6 and trying to install django tagging package and i get this error below.I am installing few python 2.4 packages on a 64 bit machine which already has python2.6.
5699

Is it possible to set the implicit OneToOne key directly when using multi table inheritance in Django?

I'm trying to extend a library model through multi-table inheritance and this is what I ended up with:
9775

Django + fcgi = new edits to views.py not shown

I wanted to dive into Python\Django development and used what I had at hands:
9040

How do I catch/except registration errors with Django?

I want to be able to return a message to the user when they try to register but their registration fails.
8023

Django. how to get a host name for db

I'm trying to connect to database:
7703

Django, want to upload either image (ImageField) or file (FileField)

I have a form in my html page, that prompts user to upload File or Image to the server. I want to be able to upload ether file or image. Let's say if user choose file, image should be null, and vice
1495

how do django forms work

I am learning Django. Particularly I am reading about forms and I cannot understand how do they work.
9346

Manually rendering django template with date filter

I've got the template to render manually, but not the dates with a filter. Is there a way of doing this without formatting the dates before I put them in the context?
623

Override data validation on one django form element

I have a select list dropdown box on my form that is populated with data from a Model (Directors). The value of this dropdown doesn't need to be saved; it is really only used to dynamically trigger
7450

Django: WSGI delays

I've deployed a django-application, which basically works fine. The only problem I have is that there are sometimes requests hanging, and I can't find the reason for this.
3508

django celery - how to send request.FILES to task

i'm trying to send request.FILES['photo'], an uploaded file from my site, to tCelery via:
7906

Django FormWizard and Admin application

I have a series of forms that I need a user to complete in sequence, which is perfect for the formwizard app. However, I've some need of the admin application also and would like to set the whole t...
6465

Replace comma by newline using django

I am using django and python.
3828

How to handle actions in Django/Tastypie?

I'm writing a web app which purpose is to act as an intermediate layer between an application and Amazon's API. I figured a REST style API would fit and chose Tastypie to ease the implementation.
9807

using the django rest framework properly

Here is one of the functions I have using the django rest framework:
5045

Storing geographical locations in Django/MySQL model, and querying based on proximity

We're trying to make an iOS app that allows users to create geographical points of interest on a map. We are currently evaluating whether we can use Django/MySQL as a backend for the app.
4941

Trying to set Django and postgreSQL on Heroku

I'm trying to follow the Heroku tutorial on deploying Django applications:
6644

Django infer a field from other fields

I am currently having a model:
893

How to access both directions of ManyToManyField in Django Admin?

The Django admin filter_horizontal setting gives a nice widget for editing a many-to-many relation. But it's a special setting that wants a list of fields, so it's only available on the (admin for ...
7592

Why was an old .pyc file breaking Django?

I pulled the latest code using git today and I got the following error:
5127

Django XMMS2: 'module' object has no attribute 'XMMS'

I just started to use Python so the following might be a really REALLY dumb question but I searched the web for a long time and didn't find anything.
7320

htaccess rewrite incorrectly appending URL with mod_wsgi config file path

I'm currently in the process of migrating domains [old_domain] -> [new_domain].
855

how to get the datetime.date() value from django model?

I have a problem in getting the datetime.date() value in my django...
5284

Override default queryset in Django admin

One of my models has a deleted flag, which is used to hide objects globally:
2888

MySQL Query error when run within Python but not when run directly

I am passing '2012-09-10 00:00:00-05:00' to a MySQL query. This value is retrieved using the pytz module for Python.
7964

django-mptt tree rebuild error

I used django-mptt version (0,5,'+dev')
9160

How to reinstall PIL on mac OS X Snow Leopard

I have been for hours on this. I needed to get jpeglib and PIL reinstalled.
1507

order by on a django paginator page object

How can I run an order_by on myFinalData? I need to do it after pagination or the pages sort don't make sense
9573

using rstrip on form.cleaned_data in Django

In my views.py, i have a snippit of code like this:
1609

Django extends not including child file

I have a view that returns a page from my template dir, successfully, no problem:
829

Drawbacks to running Django under PyPy?

I understand that Django, PyPy, and Psycopg2 all work correctly together, and speed.pypy.org claims great performance improvements over CPython. Are there any downsides?
2004

use IDs instead of instances to create new objects with foreign keys

I want to create a new Django ORM object with three foreign keys. I got the IDs of the foreign rows already, and I mean - that's all I need to fill the foreign key columns in my new row, right? How...
9980

django (or wsgi) chain stdout from subprocess

I am writing a webservice in Django to handle image/video streams, but it's mostly done in an external program. For instance:
4146
4265

mysterious javascript error with django

I am including jquery in my template like so:
6790

500 Error With WSGI in Django

I'm deploying my first ever Django project and I get the feeling I'm very close, but just need some help getting over the line. Here's the problem:
9719

How to store a reference to model type in another model instance

So this is a little exercise in the meta meta.. I want to be able to store model reference as a row in a table associated with another model. Something like this:
3823

Django rest framework - Authentication error with PUT requests

I have a very simple Resource like this for my model 'Presentacion'
7742

using key as value in Mongoengine

I use mongoengine for mongodb in django.
4222

Using Django to manage XML configuration file

We're using Django to mange a set of XML configuration files through the django-admin interface.
2839

How to convert in Django unicode to C++ std::string

I develop an application in C++ with WWW interface in Django.
9803

Django render template from media folder

I'm trying to provide additional level of flexibility for some views, specifically, I want to be able to render a view using a django template from the media location (say referred to by a FileFiel...
1010
1447

Django - load page fragments using Ajax/Ajah

I have a complex page where some parts of the page take more time to load. I was thinking about using AJAH approach and load fragments using jQuery after initial page is loaded. Then I realized that

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.