tags:

views:

52

answers:

1

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 
    ...
A: 

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
utku_karatas
Yes that was exactly what I was trying to do. Thanks.
orwellian