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-inlineformset-factory

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 an inline formsets to edit authors & books inline.

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 the inline model.
http://code.djangoproject.com/browser/django/trunk/django/forms/models.py

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to