I have 2 tables/models, which for all practical purposes are the same
as the standard Author/Book example, but with the additional
restriction that in my application each Author can only write 0 or 1
books. (eg, the ForeignKey field in the Book model is or can be a
OneToOneField, and there may be authors who have no corresponding book
in the Book table.)

Suppose the models look like this:
# Models
class Author(models.Model):
    name = models.CharField(max_length=100)
    address = models.CharField(max_length=100)

class Book(models.Model):
    author_id = models.OneToOneField(Author)
    title = models.CharField(max_length=100)


I'd like to have a form that allowed me to edit both the title of the
book belonging to a particular author AND also edit his address (and
possibly name). Even better, I'd like to do this in a formset_factory
type situation, not just a single book/author combo at a time, but one
form with multiple entries.

The "inline_formset" allows me to pull up the book belonging to a
particular author (queried by author name, form example) but it does
NOT give me access to the Author part of the model in the resulting
formset.

Any thoughts?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
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