schon/engine/vibes_auth/forms.py
Egor fureunoir Gorbunov c6e60d1f3e Features: 1) Replace ModelForm with UserChangeForm in UserForm; 2) Add add_form and change_password_form to UserAdmin; 3) Add formfield override for TextField with MarkdownWidget in blog admin; 4) Add dropdown menu definitions in Unfold settings.
Fixes: 1) Add missing import for `AdminPasswordChangeForm`, `UserCreationForm`, and `MarkdownWidget`.

Extra: 1) Add `django-unfold-markdown` as a dependency in `uv.lock` and `pyproject.toml`; 2) Remove redundant dropdown configuration from Unfold settings.
2025-12-10 15:33:58 +03:00

13 lines
331 B
Python

from unfold.forms import UserChangeForm
from engine.core.widgets import JSONTableWidget
from engine.vibes_auth.models import User
class UserForm(UserChangeForm): # type: ignore [type-arg]
class Meta:
model = User
fields = "__all__"
widgets = {
"attributes": JSONTableWidget(),
}