design patterns - A Django admin interface for my Django admin interface -
my django project has models shoptype
, shopitem
. each shoptype
object create, want associate — not single shopitem
object — subclass of shopitem
. basically, want model type in django not textfield or imagefield or like, modelfield.
example: using django admin interface, create new instance of shoptype
called cheeseshop
. in turn creates new model called cheese
inherits of behavior shopitem
. if go main page of django admin site, there's new link called "cheeses", , can create bunch of cheese
s please.
of course, suspect that's not possible: if create — — petshop
, wouldn't have add new record database, i'd have augment database schema include pet
s (along registering new pet
model admin interface , other complicated things haven't thought of yet).
but maybe there's existing django solution pattern? or maybe there's different, better-suited approach problem might achieve same effect?
any thoughts?
Comments
Post a Comment