I'd like to get the values in class variables like list_display and list_filter from a view. Something like:
def some_view():
print Order.list_display
...
I'd like to get the values in class variables like list_display and list_filter from a view. Something like:
def some_view():
print Order.list_display
...
So you want access to associated ModelAdmin objects from the model instance? How about this:
from django.contrib import admin
print admin.site._registry[Order].list_display