Questions for django


optional fields in django models

I have the following model in django.

Decoding unicode from Javascript in Python & Django

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

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...

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.

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:

Django + fcgi = new edits to not shown

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

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.

Django. how to get a host name for db

I'm trying to connect to database:

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

how do django forms work

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

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?

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

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.

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:

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...

Replace comma by newline using django

I am using django and python.

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.

using the django rest framework properly

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

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.

Trying to set Django and postgreSQL on Heroku

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

Django infer a field from other fields

I am currently having a model:

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 ...

Why was an old .pyc file breaking Django?

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

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.

htaccess rewrite incorrectly appending URL with mod_wsgi config file path

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

how to get the value from django model?

I have a problem in getting the value in my django...

Override default queryset in Django admin

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

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.

django-mptt tree rebuild error

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

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.

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

using rstrip on form.cleaned_data in Django

In my, i have a snippit of code like this:

Django extends not including child file

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

Drawbacks to running Django under PyPy?

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

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...

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:

mysterious javascript error with django

I am including jquery in my template like so:

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:

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:

Django rest framework - Authentication error with PUT requests

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

using key as value in Mongoengine

I use mongoengine for mongodb in django.

Using Django to manage XML configuration file

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

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

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

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...

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.