Top "Modelform" questions

Questions related to the usage of a Django helper class ModelForm that let programmers create a Form class from a model.

Django ModelForm has no model class specified

I am trying to use ModelForm: from django.db import models from django.forms import ModelForm class Car(models.Model): …

python django modelform
Django: Make certain fields in a ModelForm required=False

How do I make certain fields in a ModelForm required=False? If I have: class ThatForm(ModelForm): class Meta: widgets = {"…

django forms field required modelform
Django ModelForm instance with custom queryset for a specific field

I have a model not unlike the following: class Bike(models.Model): made_at = models.ForeignKey(Factory) added_on = models.…

django django-forms modelform
how can I change the modelform label and give it a custom name

I want to create a custom name for on of the labels in my modelform this is my forms.py …

django modelform
Creating a model and related models with Inline formsets

[I have posted this at the Django users | Google Groups also.] Using the example in the inline formset docs, I …

django modelform inline-formset
Django: how to hide/overwrite default label with ModelForm?

i have the following, but why does this not hide the label for book comment? I get the error 'textfield' …

python django label hide modelform
django: taking input and showing output in the same page

I am quite new to django and struggling to do something very simple. I have a ModelForm for the following …

django django-forms modelform
field choices() as queryset?

I need to make a form, which have 1 select and 1 text input. Select must be taken from database. model looks …

django modelform
Django's ModelForm unique_together validation

I have a Django model that looks like this. class Solution(models.Model): ''' Represents a solution to a specific …

django validation modelform
modelform: override clean method

I have two questions concerning the clean method on a modelform. Here is my example: class AddProfileForm(ModelForm): ... password = forms.…

django overriding modelform data-cleaning