Forms based on selection in django admin -



Forms based on selection in django admin -

i have need next situation struggling find reply if provide pointers, i'd appreciative:

i have model called someobject, propertybase, propertyone, propertytwo

class propertybase(models.model): name = models.charfield(....) class meta: abstract = true class propertyone(propertybase): # properties here particular 1 subclass of propertybase class propertytwo(propertybase): # properties here particular 2 subclass of propertybase class someobject(models.model): description = models.charfield(max_length=256, blank=true, null=true) property_base = models.manytomanyfield(propertybase)

i want user of django admin able create someobject instances able select type of property list (these list subclasses of propertybase - i.e. propertyone, propertytwo etc.). then, want user see right admin.modeladmin based on selection.

what's best way doing this?

e.g. user creates new someobject instance. in admin class, select 'propertytwo' list. admin shows right admin form properties on propertytwo instance , saves database appropriately. rather not have intermediate admin page, although don't mind refresh based on selection. have ajax (with i'm unfamiliar)?

thanks in advance

django admin

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -