|
@@ -1,7 +1,6 @@
|
|
|
from django.forms import ModelForm
|
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
-from djadhere.forms import ReadOnlyModelForm
|
|
|
from .models import Profile
|
|
|
|
|
|
|
|
@@ -11,16 +10,11 @@ class UserCreateForm(ModelForm):
|
|
|
fields = ('username', 'first_name', 'last_name', 'email',)
|
|
|
|
|
|
|
|
|
-class UserChangeForm(ReadOnlyModelForm):
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+class UserChangeForm(ModelForm):
|
|
|
class Meta:
|
|
|
model = User
|
|
|
fields = ('username', 'first_name', 'last_name', 'email',)
|
|
|
- readonly_fields = ('username', 'first_name', 'last_name',)
|
|
|
+ admin_only_fields = ('username', 'first_name', 'last_name',)
|
|
|
|
|
|
|
|
|
class ProfileForm(ModelForm):
|