Skip to content
This repository has been archived by the owner on Jan 18, 2020. It is now read-only.

Commit

Permalink
Update custom token display in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
bruth committed Feb 27, 2014
1 parent 3e9981f commit 0ef8693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion serrano/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class ApiTokenAdmin(admin.ModelAdmin):
def token_display(self, instance):
if instance.pk:
return instance.token
return '(available once saved)'
return '<em>(displayed once saved)</em>'

token_display.short_description = 'Token'
token_display.allow_tags = True

admin.site.register(ApiToken, ApiTokenAdmin)

0 comments on commit 0ef8693

Please sign in to comment.