Hi,
I'm wondering if it's possible to chain StackedInlined object in a
django admin page.
Let me explain it:
I have a class UserProfile which is linked by a OneToOneField to the
django auth module class User. By this way (which is recommended) I
store additionnal informations about my users. In those informations,
I have a ForeignKey to the school of the user.
With a StackedInline class, I can edit user's profile in a user admin
page but I also want to be able to edit the school of a inside this
page, not with a pop-up.
Is it possible to achieve this?
Just to sum-up:
My model:
Class UserProfile(models.Model):
user = models.OneToOneField(User)
....extra fields....
school = models.ForeignKey(School)
My admin.py:
admin.site.unregister(User)
class UserProfileInline(admin.StackedInline):
model = UserProfile
class UserProfileAdmin(UserAdmin):
inlines = [UserProfileInline]
admin.site.register(User, UserProfileAdmin)
Thank you for your help
--
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.