Skip to content

Commit

Permalink
admin: add search_fields to InstitutionIPAddressRange
Browse files Browse the repository at this point in the history
  • Loading branch information
cormier committed Sep 2, 2016
1 parent a2c0461 commit 56f8937
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion eruditorg/core/subscription/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class JournalAccessSubscriptionPeriodInline(admin.TabularInline):
model = JournalAccessSubscriptionPeriod


class InstitutionIPAddressRangeAdmin(admin.ModelAdmin):
search_fields = ('subscription__organisation__name',)


class JournalAccessSubscriptionAdmin(admin.ModelAdmin):
fieldsets = [
(None, {
Expand All @@ -28,6 +32,7 @@ class JournalAccessSubscriptionAdmin(admin.ModelAdmin):
}),
]

search_fields = ('organisation__name',)
inlines = [JournalAccessSubscriptionPeriodInline, ]

list_display = ('pk', 'title', 'user', 'organisation', 'journal', 'collection', 'full_access', )
Expand All @@ -44,7 +49,7 @@ class JournalManagementSubscriptionAdmin(admin.ModelAdmin):
list_display_links = ('pk', 'title', 'journal', )


admin.site.register(InstitutionIPAddressRange)
admin.site.register(InstitutionIPAddressRange, InstitutionIPAddressRangeAdmin)
admin.site.register(JournalAccessSubscription, JournalAccessSubscriptionAdmin)
admin.site.register(JournalAccessSubscriptionPeriod)
admin.site.register(JournalManagementPlan, JournalManagementPlanAdmin)
Expand Down

0 comments on commit 56f8937

Please sign in to comment.