django-rest-framework/rest_framework/authtoken/admin.py

12 lines
260 B
Python
Raw Normal View History

from django.contrib import admin
2013-07-09 16:12:28 +04:00
from rest_framework.authtoken.models import Token
class TokenAdmin(admin.ModelAdmin):
list_display = ('key', 'user', 'created')
fields = ('user',)
ordering = ('-created',)
admin.site.register(Token, TokenAdmin)