Top "Django-models" questions

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

Django DoesNotExist

I am having issues on trying to figure "DoesNotExist Errors", I have tried to find the right way for manage …

python django django-models django-views
Get the latest record with filter in Django

I am trying to get the latest Django model object but cannot seem to succeed. Neither of these are working: …

python django django-models django-queryset
matching query does not exist Error in Django

I have implemented a password recovery functionality in django. With my method, the new password will be sent to the …

python django django-models django-templates django-views
Django - filtering on foreign key properties

I'm trying to filter a table in Django based on the value of a particular field of a ForeignKey. For …

django django-models django-queryset
How to create Password Field in Model Django

I want to create password as password field in views. models.py: class User(models.Model): username = models.CharField(max_…

python django django-models django-forms
__init__() got an unexpected keyword argument 'user'

i am using Django to create a user and an object when the user is created. But there is an …

python django django-models django-forms django-views
Update only specific fields in a models.Model

I have a model class Survey(models.Model): created_by = models.ForeignKey(User) question = models.CharField(max_length=150) active = models.…

django django-models django-views django-database
django - get() returned more than one topic

When I tried to relate an attribute with another one which has an M to M relation I received this …

django django-models django-views
How to create password input field in django

Hi I am using the django model class with some field and a password field. Instead of displaying regular plain …

django django-models django-forms django-templates django-views
Django - how to create a file and save it to a model's FileField?

Here's my model. What I want to do is generate a new file and overwrite the existing one whenever a …

python django django-models