users.admin.AuthorizationInline use custom form
from AuthorizationAdmin
@@ -58,13 +58,6 @@ class UserProfileInline(admin.StackedInline):
)
-class AuthorizationInline(admin.StackedInline):
- form = AuthorizationInlineForm
- model = Authorization
- fk_name = "user"
- extra = 0
-
-
class AuthorizationAdmin(admin.ModelAdmin):
list_display = (
"id",
@@ -113,6 +106,13 @@ class AuthorizationAdmin(admin.ModelAdmin):
admin.site.register(Authorization, AuthorizationAdmin)
+class AuthorizationInline(admin.StackedInline):
+ form = AuthorizationAdminForm
+ model = Authorization
+ fk_name = "user"
+ extra = 0
+
+
class UserAdmin(AuthUserAdmin):
inlines = [EditorInline, UserProfileInline, AuthorizationInline]
list_display = ["username", "get_wp_username", "is_staff"]
