feat: MVP-скелет площадки (Django + MySQL/SQLite, модели по ТЗ §4, базовые страницы)
This commit is contained in:
1 parent
e5f312a00f
commit
8218a568ce
67 files changed
+1929
No files matched your search
@@ -0,0 +1,14 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
|
||||
from .models import User
|
||||
|
||||
|
||||
@admin.register(User)
|
||||
class CustomUserAdmin(UserAdmin):
|
||||
list_display = ('username', 'full_name', 'role', 'phone', 'region', 'is_staff')
|
||||
list_filter = ('role', 'is_staff', 'is_active')
|
||||
search_fields = ('username', 'full_name', 'phone', 'email')
|
||||
fieldsets = UserAdmin.fieldsets + (
|
||||
('Профиль', {'fields': ('role', 'full_name', 'phone', 'birth_date', 'region')}),
|
||||
)
|
||||
Reference in new issue
Block a user