00af109e2f
* add flake8 to pre-commit config, and fixup many things to make flake8 happy * add isort and sort all imports, add to pre-commit and requirements
18 lines
453 B
Python
18 lines
453 B
Python
from django.contrib import admin
|
|
|
|
from .models import Token, TokenFind
|
|
|
|
|
|
@admin.register(Token)
|
|
class TokenAdmin(admin.ModelAdmin):
|
|
list_filter = ["camp"]
|
|
list_display = ["token", "description", "camp"]
|
|
search_fields = ["token", "description"]
|
|
|
|
|
|
@admin.register(TokenFind)
|
|
class TokenFindAdmin(admin.ModelAdmin):
|
|
list_filter = ["token__camp", "user"]
|
|
list_display = ["token", "user", "created"]
|
|
search_fields = ["user", "token"]
|