Top "Django" questions

Django is an open-source server-side web application framework written in Python.

Correct way to use get_or_create?

I'm trying to use get_or_create for some fields in my forms, but I'm getting a 500 error when I …

python django
How to express a One-To-Many relationship in Django

I'm defining my Django models right now and I realized that there wasn't a OneToManyField in the model field types. …

django django-models
Error: "dictionary update sequence element #0 has length 1; 2 is required" on Django 1.4

I have an error message on django 1.4: dictionary update sequence element #0 has length 1; 2 is required [EDIT] It happened when I …

python django uwsgi
Django development IDE

I have done a little Django development, but it has all been in a text editor. I was curious what …

python django ide
Fastest way to get the first object from a queryset in django?

Often I find myself wanting to get the first object from a queryset in Django, or return None if there …

python django performance django-models
Django Model() vs Model.objects.create()

What it the difference between running two commands: foo = FooModel() and bar = BarModel.objects.create() Does the second one immediately …

python django database django-models
RuntimeWarning: DateTimeField received a naive datetime

I m trying to send a simple mail using IPython. I have not set up any models still getting this …

django django-mailer
How can I filter a Django query with a list of values?

I'm sure this is a trivial operation, but I can't figure out how it's done. There's got to be something …

python django django-queryset
How to get value from form field in django framework?

How do I get values from form fields in the django framework? I want to do this in views, not …

python django
How do I get the object if it exists, or None if it does not exist?

When I ask the model manager to get an object, it raises DoesNotExist when there is no matching object. go = …

python django django-queryset