bornhack-website/src/tokens/admin.py
Thomas Steen Rasmussen 00af109e2f
add flake8 and isort to pre-commit config, make flake8 and isort happy (#441)
* 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
2020-02-12 13:10:41 +01:00

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"]