From 01ab4674de06bf7c85b700e0357c97d5ae7755fc Mon Sep 17 00:00:00 2001
From: olechrib <olechrib@stud.ntnu.no>
Date: Mon, 4 Apr 2022 10:33:24 +0200
Subject: [PATCH] Refactiring users/admin.py

---
 backend/secfit/users/admin.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/backend/secfit/users/admin.py b/backend/secfit/users/admin.py
index fc0af23..bce95fc 100644
--- a/backend/secfit/users/admin.py
+++ b/backend/secfit/users/admin.py
@@ -1,18 +1,19 @@
+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",)}),)
 
 
-- 
GitLab