formset Questions

2

Solved

I have a author model and a books model. A user can modify properties of all the books from a given author. I want to be able to display errors for each individual book rather than have all the err...
Febricity asked 24/2, 2012 at 19:4

1

Solved

I am using inlineformset_factory to create fields for a many to many relationship between Clients and Sessions, with an intermediary Attendance model. I have the following in my views file: Atten...
Enfleurage asked 5/9, 2011 at 16:54

1

Solved

I am using inlineformset_factory to generate a formset as so: FormSet = inlineformset_factory(Model1, Model2, extra=0) if request.method =="POST": formset = FormSet(request.POST, instance=model1_...
Caledonian asked 26/8, 2011 at 16:11

1

Solved

I am having difficult times saving a formset to the database. I have 2 models, one having a ForeignKey to the other(I made some entries for Balanta model in Django admin page): models.py class B...
Eleanoreleanora asked 14/5, 2011 at 18:33

1

Solved

How do I add custom labels to my formset? <form method="post" action=""> {{ formset.management_form }} {% for form in formset %} {% for field in form %} {{ field.label_tag }}: {{ field ...
Palila asked 10/5, 2011 at 12:4

2

Solved

I've built this model which contains a generic foreign key: class MyModel(models.Model): content_type = models.ForeignKey(ContentType, verbose_name=_('content type')) object_id = models.Positive...
Mosley asked 24/9, 2009 at 10:16

2

Solved

I've written the following custom formset, but for the life of me I don't know how to save the form. I've searched the Django docs and done extensive searches, but no one solution works. Lots of ra...
Gstring asked 9/9, 2009 at 3:15

2

Solved

In this Django Doc explain how to create a formset that allows you to edit books belonging to a particular author. What I want to do is: Create a formset that allows you to ADD new book belonging ...
Kennie asked 12/8, 2009 at 18:14

2

Solved

In a Django ModelForm, you can change the widget type of a field like so: class EntryForm(ModelForm): entity = forms.CharField() class Meta: model = Entry I can easily create a modelformset ...
Airel asked 28/6, 2009 at 22:6

2

Solved

In my Django application application I have a formset that is created from a simple (not-model) form, with the extra=1 (to allow javasript to add more forms later on). class SomeForm(forms.Form): ...
Millen asked 29/5, 2009 at 19:7

© 2022 - 2024 — McMap. All rights reserved.