Top "Django-models" questions

For questions concerning use of the model class from the web framework Django.

How to store a dictionary on a Django Model?

I need to store some data in a Django model. These data are not equal to all instances of the …

python django django-models orm persistence
Specifying a mySQL ENUM in a Django model

How do I go about specifying and using an ENUM in a Django model?

python mysql django django-models enums
Django query datetime for objects older than 5 hours

I'm trying to write a Django query for widgets that are more than 5 hours old and I'm a bit lost. …

django django-models django-queryset
how to use UUID in Django

I am trying to get unique IDs for my Django objects. In Django 1.8 they have the UUIDField. I am unsure …

python django django-models uuid
Can I make an admin field not required in Django without creating a form?

Every time I enter in a new player in the Admin portion of Django I get an error message that …

python django django-models django-admin django-forms
Django "xxxxxx Object" display customization in admin action sidebar

I would like to change the default behavior of how the admin recent changes sidebar displays the name of "objects" …

django django-models django-admin
Can a dictionary be passed to django models on create?

Is it possible to do something similar to this with a list, dictionary or something else? data_dict = { 'title' : 'awesome …

python django django-models django-queryset
Can I make the foreign key field optional in Django model

I have this code subject = models.ForeignKey(subjects) location = models.ForeignKey(location) publisher = models.ForeignKey(publisher) There its not always …

django django-models
How to add a new field to a model with new Django migrations?

I'm using the contribute_to_class method but I don't know how to create the field in the database with …

django django-models django-1.7 django-migrations
Tying in to Django Admin's Model History

The Setup: I'm working on a Django application which allows users to create an object in the database and then …

django django-models django-admin