admin.py 299 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
from rest_framework.authtoken.admin import TokenAdmin
2 3 4 5 6
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import User

admin.site.register(User, UserAdmin)
Florent Chehab's avatar
Florent Chehab committed
7 8

# Pour la génération de token dans l'administration du site.
9
TokenAdmin.raw_id_fields = ("user",)