Skip to content
Browse files

Merge pull request #94 from evildmp/ancestors-ontree-filters

show ancestors when filtering admin trees
  • Loading branch information...
2 parents 4b8ad0e + 92a78a7 commit 69bc9568eb2dd8c6c51705eaa9b962c60a28d650 @evildmp committed May 2, 2013
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
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']

0 comments on commit 69bc956

Please sign in to comment.
Something went wrong with that request. Please try again.