mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +03:00
Add an ModelAdmin for easy management of Tokens
This commit is contained in:
parent
b05eba70bd
commit
db863be10c
11
rest_framework/authtoken/admin.py
Normal file
11
rest_framework/authtoken/admin.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
from django.contrib import admin
|
||||||
|
from .models import Token
|
||||||
|
|
||||||
|
|
||||||
|
class TokenAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('key', 'user', 'created')
|
||||||
|
fields = ('user',)
|
||||||
|
ordering = ('-created',)
|
||||||
|
|
||||||
|
|
||||||
|
admin.site.register(Token, TokenAdmin)
|
Loading…
Reference in New Issue
Block a user