Django admin GenericForeignKey inline -


class myuser(abstractbaseuser):     ...     content_type = models.foreignkey(contenttype, limit_choices_to={"model__in": ("agentprofile", "clientprofile"))     object_id = models.positiveintegerfield()     profile = generic.genericforeignkey('content_type', 'object_id')  class agentprofile(models.model):     license_number = models.charfield(max_length=50, blank=true)  class clientprofile(models.model):     address = models.charfield(max_length=250) 

i have 3 models: myuser(custom user model), clientprofile, agentprofile. how can edit clientprofile/agentprofile on myuser admin page (like inline)?

you need use generictabularinline. see django docs.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -