If you want to edit them together in the admin then do this for your
admin class
#------------------------------------
class BookInline(admin.TabularInline)
model = Book
extra = 2
class AuthorOptions(admin.ModelAdmin)
inlines = [BookInline]
admin.register(Author, AuthorOptions)
#------------------------------------
:)
On Dec 8, 6:51 am, Alistair Marshall <[email protected]>
wrote:
> I have been hunting around but can't find a solution to this problem:
>
> It is probably best described with an example
>
> Example:
>
> class Author(models.Model):
> name = models.CharField()
> location = models.CharField()
>
> class Book(models.Model):
> name = models.CharField()
> author = models.ForeignKey(Author)
>
> I want to be able to enter/edit details about both the author AND the
> books the author has written in the same form/view - I have tried
> using a form wizard though I have just gotten lost and am not sure if
> this is the best method of solving this or if it is even possible to
> include a formset within a form wizard.
>
> Has anyone else had this user case and is there a best method?
>
> Thanks
> Alistair
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---