tags:

views:

138

answers:

1

I'm building a website for a friends's art exhibition. I currently define a model called Participant, every participant should also be able to log in to the system, so when a Participant is created a new User is also created.

Now when editing or creating a new Participant, I would like to be able to display certain fields from User such as email address for example. So that someone using the admin only has to edit Participant and the linked User will be updated.

My problem is displaying these fields in the admin. I have tried to add e-mail as a property of the Participant model, that looks up its value from the related User, but these aren't displayed in the Admin. I also tried to define my own admin form for this model, however I can't get it prepopulated as this only works with fields.

From my googling so far it looks like prepopulating admin forms is not possible in the current version, using properties like fields doesn't seem to work either or at least not the way I want it.

Could anyone point me in the right direction?

David

+1  A: 

Check this:

Inline Model Admin

Andrea Di Persio
I get it!Thanks alot :-)