I have the following models:
class Bill(models.Model): date = models.DateTimeField(_("Date of bill"),null=True,blank=True) class Item(models.Model): name = models.CharField(_("Name"),max_length=100) price = models.FloatField(_("Price")) quantity = models.IntegerField(_("Quantity")) bill = models.ForeignKey("Bill",verbose_name=_("Bill"), related_name="billitem")
I know this is possible:
from django.forms.models import inlineformset_factory inlineformset_factory(Bill, Item)
and then process this through the standard view.
Now I was wondering if there is a way to achieve the same (which means: using the built-in to add / edit elements belonging to the account) using class-based views (not for the admin interface).
django inline-formset django-class-based-views
Hixi Dec 21 '10 at 9:07 2010-12-21 09:07
source share