admin(major): add YAMLField for attributes, add codemirror editor

This commit is contained in:
Langhammer, Jens
2019-10-12 14:23:03 +02:00
parent 50172e58d8
commit 1fe420fd80
419 changed files with 75081 additions and 1 deletions

View File

@ -2,6 +2,7 @@
from django import forms
from passbook.admin.fields import YAMLField
from passbook.core.models import User
@ -13,5 +14,8 @@ class UserForm(forms.ModelForm):
model = User
fields = ['username', 'name', 'email', 'is_staff', 'is_active', 'attributes']
widgets = {
'name': forms.TextInput
'name': forms.TextInput,
}
field_classes = {
'attributes': YAMLField,
}