admin.py 358 B

12345678910111213141516
  1. from django.contrib import admin
  2. from .models import User, LoginToken
  3. # Register your models here.
  4. class UserAdmin(admin.ModelAdmin):
  5. list_display = ["username", "password", "email"]
  6. class LoginTokenAdmin(admin.ModelAdmin):
  7. list_display = ["user", "token"]
  8. admin.site.register(User, UserAdmin)
  9. admin.site.register(LoginToken, LoginTokenAdmin)