On Thu, Oct 18, 2012 at 12:28 AM, Bill Freeman <ke1g...@gmail.com> wrote: > On Tue, Oct 16, 2012 at 6:21 PM, Daniele Procida <dani...@vurt.org> wrote: >> I am starting to customise the admin classes for my models so that I can >> provide extra feedback to the user. >> >> For example I want to report - in the admin page - useful information about >> how the system will interpret the current state of the object being edited. >> >> I'm doing this by using readonly_fields, that contain the output of method >> on the ModelAdmin class, a bit like this: >> >> class PersonAdmin(ModelAdmin): >> readonly_fields = ['check_address',] >> >> def check_address(self, instance): >> return instance.get_full_address or "<span >> class='errors'>Warning: I am unable to work out an address for this >> person.</span>" >> >> (the actual examples are rather more complex, but this is the idea). >> >> Does a more elegant way of doing this exist, either in Django's core >> already, or using some package that makes it easier? >> >> Thanks, >> >> Daniele > > > I'm a curmudgeon. I have to wonder how much work it is worth doing to > make the admin interface something that it is not before it is worth > using a custom view of your own. Remember, views that you write can > do anything that the admin can do.
But the admin has so much built in pretty! L. > > Bill > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- ...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.” http://www.warrenellis.com/?p=14314 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.