mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 20:01:51 +02:00
15 lines
416 B
Python
15 lines
416 B
Python
from django.contrib import admin
|
|
from django.contrib.auth.admin import UserAdmin
|
|
|
|
from .forms import CustomUserChangeForm, CustomUserCreationForm
|
|
from .models import CustomUser
|
|
|
|
|
|
class CustomUserAdmin(UserAdmin):
|
|
add_form = CustomUserCreationForm
|
|
form = CustomUserChangeForm
|
|
model = CustomUser
|
|
list_display = ["username", "first_name", "last_name"]
|
|
|
|
|
|
admin.site.register(CustomUser, CustomUserAdmin)
|