Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

show ancestors when filtering admin trees #94

Merged
merged 1 commit into from

1 participant

@evildmp
Owner

No description provided.

@evildmp evildmp merged commit 69bc956 into develop
@evildmp evildmp deleted the ancestors-ontree-filters branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 2, 2013
This page is out of date. Refresh to see the latest.
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']
Something went wrong with that request. Please try again.