I'm having a similar problem that I posted about here: http://groups.google.com/group/django-users/browse_thread/thread/bb4c792f13b2eceb#
Did you find a solution that works for you? Sorry, I couldn't figure out from your post exactly what you did. I tried using inlineformset_factory() like you described, but I couldn't get it to work. Are you working inside the admin interface? Perhaps that is my problem.... Cheers, Ben On Nov 10, 6:49 pm, John Boxall <[EMAIL PROTECTED]> wrote: > I take it back. > > I over thought it - > > Instead of using a custominlineform model just pass the parameters > directly to inlineformset_factory as per it's spec: > def inlineformset_factory(parent_model, model, form=ModelForm, > formset=BaseInlineFormSet, fk_name=None, > fields=None, exclude=None, > extra=3, can_order=False, can_delete=True, > max_num=0, > formfield_callback=lambda f: > f.formfield()): > > On Nov 10, 12:47 pm, John Boxall <[EMAIL PROTECTED]> wrote: > > > Heyo Django Users, > > > I'm in a bit of a pickle with InlineFormsets - > > > I'm following the example at the Django > > Docs:http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-i... > > > I've got two models: > > -------------------- > > class Author(models.Model): > > name = models.CharField(max_length=100) > > > class Book(models.Model): > > author = models.ForeignKey(Author) > > title = models.CharField(max_length=100) > > description = models.CharField(max_length=255) > > -------------------- > > > And I want to have aninlineformsets to edit authors & booksinline. > > > What I want to do is just show the title field of the Book so I have > > a custom ModelForm for that: > > > -------------------- > > class BookModelForm(forms.ModelForm): > > class Meta: > > model = Book > > fields = ('title',) > > -------------------- > > > Everything looks good, I'm all ready to construct my > > inlinemodelformset using inlineformset_factory... > > -------------------- > > from django.forms.models import inlineformset_factory > > # ??? > > BookFormSet = inlineformset_factory(Author, Book) > > -------------------- > > > And doh! inlineformset_factory doesn't seem to want to let me set the > > form for > > theinlinemodel.http://code.djangoproject.com/browser/django/trunk/django/forms/model... > > > Anyone have any luck with this? > > > Thanks, > > > John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---