On Sep 2, 2010, at 4:41 PM, Steve McConville wrote:
What would be the best way to go about this? Is it necessary to create
a custom widget to achieve this?
I guess the best way would be to use the 'initial' parameter.
http://docs.djangoproject.com/en/dev/topics/forms/formsets/#using-initial-dat
We have a modelformset created like this:
DocumentFormSet = modelformset_factory(Document, extra=0,
fields=('name', 'category')
with a models.py like this:
class Category(models.Model):
name = CharField(max_length=100)
# other stuff
class Document(models.Model):
name = CharField(max
2 matches
Mail list logo