Skip to content

Commit

Permalink
[admin] Added key_length and digest to available filters
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Aug 23, 2016
1 parent da675f1 commit 7fbb2ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions django_x509/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def get_fields(self, request, obj=None):


class CaAdmin(AbstractAdmin):
pass
list_filter = ('key_length', 'digest', 'created',)


class CertAdmin(AbstractAdmin):
list_filter = ('ca', 'revoked', 'created',)
list_filter = ('ca', 'revoked', 'key_length', 'digest', 'created',)
list_select_related = ('ca',)
readonly_fields = ('revoked', 'revoked_at',)
fields = ['name',
Expand Down Expand Up @@ -96,6 +96,7 @@ def ca_url(self, obj):
url=url,
text=obj.ca.name)
ca_url.short_description = 'CA'

def revoke_action(self, request, queryset):
rows = 0
for cert in queryset:
Expand Down

0 comments on commit 7fbb2ab

Please sign in to comment.