Author: leidel
Date: Sat Jan 3 03:55:22 2009
New Revision: 89
Modified:
trunk/dbtemplates/admin.py
Log:
Added a list to the admin list view that contains all site names that the
template is used on.
Modified: trunk/dbtemplates/admin.py
==============================================================================
--- trunk/dbtemplates/admin.py (original)
+++ trunk/dbtemplates/admin.py Sat Jan 3 03:55:22 2009
@@ -39,8 +39,12 @@
'classes': ('collapse',),
}),
)
- list_display = ('name', 'creation_date', 'last_changed')
+ list_display = ('name', 'creation_date', 'last_changed', 'site_list')
list_filter = ('sites',)
search_fields = ('name', 'content')
+
+ def site_list(self, template):
+ return ", ".join([site.name for site in template.sites.all()])
+ site_list.short_description = _('sites')
admin.site.register(Template, TemplateAdmin)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---