You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
This must be easy but I'm not finding it in the docs. I need to access
the model class corresponding to the current ModelAdmin instance, so
that I can iterate through its objects. I need to do this generically
so that I can use the routine in all ModelAdmins.
Thanks for any help.
Lee
Matt Schinckel
unread,
Oct 18, 2011, 11:03:01 PM10/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
If you are in an instance method of a ModelAdmin, you can use `self.model` to get the model associated with the ModelAdmin.
Have a look in django.contrib.admin's source for what methods you can override, or hook into.