python - How can i have two ModelAdmin of the same model in Django Admin -
i have model admin registered on admin site
site.register(student, modeladmin)
now have 1 more admin inherited model admin custom data this
class studentadmin(modeladmin): list_display = ('id', 'user', 'created') search_fields = ('username',)
which want registered this
site.register(student, studentadmin)
but error student
registered
perhaps can use proxy models like..
class mystudent(student): class meta: proxy=true class mystudentadmin(modeladmin): list_display = ('id', 'user', 'created') search_fields = ('username',) site.register(student, modeladmin) site.register(mystudent, mystudentadmin)
Comments
Post a Comment