Commit 7b1096cb authored by Jakob Lund Johannessen's avatar Jakob Lund Johannessen
Browse files

refactor: admin

parent c0ca65f4
Pipeline #171214 passed with stages
in 2 minutes and 36 seconds
......@@ -4,18 +4,19 @@ from .models import Offer, AthleteFile
from django.contrib.auth import get_user_model
from .forms import CustomUserChangeForm, CustomUserCreationForm
# Register your models here.
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
form = CustomUserChangeForm
model = get_user_model()
# list_display = UserAdmin.list_display + ('coach',)
fieldsets = UserAdmin.fieldsets + ((None, {"fields": ("coach",)}),)
add_fieldsets = UserAdmin.add_fieldsets + ((None, {"fields": ("coach",)}),)
# Custom user admin
admin.site.register(get_user_model(), CustomUserAdmin)
# Other features
admin.site.register(Offer)
admin.site.register(AthleteFile)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment