On Sun, May 19, 2013 at 6:35 AM, Matthew Ngaha <chigga...@gmail.com> wrote: > > if you look at the diagram under that function, why is the value of > "was_published_recently.short_description" the title of that field? > replacing the old title? is a "short_desccription" attribute set > somewhere in django being inactive, but once you make use of this > attribute(or keyword), whatever the value is automatically becomes the > field title? is it the same for boolean being the value of the field > with the checked or unchecked symbol?
For example, see line 586 in admin/options.py: https://github.com/django/django/blob/1.5.1/django/contrib/admin/options.py#L586 # Gather actions from the admin site first for (name, func) in self.admin_site.actions: description = getattr(func, 'short_description', name.replace('_', ' ')) actions.append((func, name, description)) The default description is the name with underscores removed, unless you set a custom description in the function's "short_description" attribute. I'm not experienced with Django, so I can't ramble off lots of examples, but hopefully you get the gist. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor