Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

show ancestors when filtering admin trees

  • Loading branch information...
commit 92a78a746d573afcdacc218ffd94da6dc6114f93 1 parent d363f25
@evildmp authored
View
3  contacts_and_people/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
1  links/admin.py
@@ -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
3  news_and_events/admin.py
@@ -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']
Please sign in to comment.
Something went wrong with that request. Please try again.