python - How to group models in django admin? -
lets have group of models must kept separate (visually) in admin group.
right alphabetic, jumbles them.
i'd organize them way:
group 1: (custom named)
- model 1
- model 4
group 2 (custom named)
- model 2
- model 3
i cannot seem find documentation on how this. possible?
you need create 2 apps. first app == group 1. second app == group 2.
then, need create proxy model in new app. this.
class proxyreview(review): class meta: proxy = true # if you're define proxyreview inside review/models.py, # app_label set 'review' automatically. # or else comment out following line specify explicitly # app_label = 'review' # set following lines display proxyreview review # verbose_name = review._meta.verbose_name # verbose_name_plural = review._meta.verbose_name_plural # in admin.py admin.site.register(proxyreview)
Comments
Post a Comment