Skip to content
Snippets Groups Projects
Commit 01ab4674 authored by Ole-Christian Bjerkeset's avatar Ole-Christian Bjerkeset
Browse files

Refactiring users/admin.py

parent afe079ec
No related branches found
No related tags found
1 merge request!7merging refactor/gallery into master
Pipeline #171797 passed with stage
in 28 seconds
from django.contrib.auth import get_user_model
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
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):
"""Allows users to have a custom
user page in the Django admin view
"""
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",)}),)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment