angrybeanie_wagtail/env/lib/python3.12/site-packages/wagtail/test/customuser/viewsets.py

13 lines
355 B
Python
Raw Permalink Normal View History

2025-07-25 21:32:16 +10:00
from wagtail.users.views.users import UserViewSet as WagtailUserViewSet
from .forms import CustomUserCreationForm, CustomUserEditForm
class CustomUserViewSet(WagtailUserViewSet):
icon = "custom-icon"
def get_form_class(self, for_update=False):
if for_update:
return CustomUserEditForm
return CustomUserCreationForm