chore: 将后端移动到 api/ 目录,准备合并为单仓库
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e172ffc0b3
commit
0591eda56f
244 files changed
No files matched your search
@@ -0,0 +1,24 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.models import Group
|
||||
from .models import User
|
||||
|
||||
admin.site.site_header = "前端开发网站管理"
|
||||
admin.site.site_index = "前端开发网站管理"
|
||||
admin.site.site_title = "前端开发网站管理"
|
||||
|
||||
admin.site.unregister(Group)
|
||||
|
||||
|
||||
@admin.register(User)
|
||||
class AdminAccount(UserAdmin):
|
||||
fieldsets = ((None, {"fields": ("username", "password", "role", "is_active")}),)
|
||||
add_fieldsets = (
|
||||
(
|
||||
None,
|
||||
{"fields": ("username", "password1", "password2", "role")},
|
||||
),
|
||||
)
|
||||
list_display = ("username", "role", "is_active")
|
||||
list_filter = ("role", "is_active")
|
||||
search_fields = ("username",)
|
||||
Reference in new issue
Block a user