# Path: users/forms.py
# class UserAdminForm(forms.ModelForm):
# 
#     class Meta:
#         model = User
#         exclude = ["password"]


from django.contrib import admin
from django.contrib.auth import get_user_model
from .forms import UserAdminForm


class UserAdmin(admin.ModelAdmin):

    form = UserAdminForm
    
    readonly_fields = ("sid", "password")
    list_display = ("sid", "username", "userStatus", "title")
    prepopulated_fields = {'slug': ('username',), }


# Path: users/forms.py
# class UserAdminForm(forms.ModelForm):
# 
#     class Meta:
#         model = User
#         exclude = ["password"]


# Path: users/admin.py
from django.contrib import admin
from django.contrib.auth import get_user_model
from .forms import UserAdminForm



class UserAdmin(admin.ModelAdmin):

    form = UserAdminForm
    
    readonly_fields = ("sid", "password")
    list_display = ("sid", "username", "userStatus", "title")
    prepopulated_fields = {'slug': ('username',), }


admin.site.register(get_user_model(), UserAdmin)