This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-03-02 21:41:14 +00:00
|
|
|
"""passbook administrative user forms"""
|
|
|
|
|
|
|
|
from django import forms
|
|
|
|
|
2019-10-12 12:23:03 +00:00
|
|
|
from passbook.admin.fields import YAMLField
|
2019-03-02 21:41:14 +00:00
|
|
|
from passbook.core.models import User
|
|
|
|
|
|
|
|
|
|
|
|
class UserForm(forms.ModelForm):
|
|
|
|
"""Update User Details"""
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = User
|
2019-12-31 11:51:16 +00:00
|
|
|
fields = ["username", "name", "email", "is_staff", "is_active", "attributes"]
|
2019-03-02 21:41:14 +00:00
|
|
|
widgets = {
|
2019-12-31 11:51:16 +00:00
|
|
|
"name": forms.TextInput,
|
2019-10-12 12:23:03 +00:00
|
|
|
}
|
|
|
|
field_classes = {
|
2019-12-31 11:51:16 +00:00
|
|
|
"attributes": YAMLField,
|
2019-03-02 21:41:14 +00:00
|
|
|
}
|