Permalink
Browse files

show ancestors when filtering admin trees

  • Loading branch information...
evildmp committed May 2, 2013
1 parent d363f25 commit 92a78a746d573afcdacc218ffd94da6dc6114f93
Showing with 6 additions and 1 deletion.
  1. +2 −1 contacts_and_people/admin.py
  2. +1 −0 links/admin.py
  3. +3 −0 news_and_events/admin.py
@@ -388,7 +388,8 @@ class EntityAdmin(PersonAndEntityAdmin, TreeAdmin):
'slug': ('name',)
}
readonly_fields = ['address_report']
-
+ filter_include_ancestors = True
+
def address_report(self, instance):
if not instance.abstract_entity:
return "%s" % (", ".join(instance.get_full_address)) or "Warning: this Entity has no address."
View
@@ -120,6 +120,7 @@ class ExternalSiteAdmin(TreeAdmin):
readonly_fields = ('parent',)
form = ExternalSiteForm
list_display = ('domain', 'site',)
+ filter_include_ancestors = True
admin.site.register(ExternalLink, ExternalLinkAdmin)
View
@@ -213,6 +213,9 @@ class EventAdmin(NewsAndEventsAdmin, TreeAdmin):
search_fields = ['title']
list_filter = (EventIsSeries, 'start_date', HostedByFilter)
save_as = True
+
+ filter_include_ancestors = True
+
# autocomplete fields
related_search_fields = ['hosted_by','parent','building', 'external_url']

0 comments on commit 92a78a7

Please sign in to comment.