Hi,
I have created the following user form for my custom user model:
class UsersForm(ModelForm):
class Meta:
model = UserAccount
fields = ('is_active', 'is_superuser', 'is_templog', 'is_crewreg', 'is_spaceman','first_name', 'last_name',
'company', 'address1', 'address2', 'address3', 'zipcode', 'city', 'country', 'email', 'favourite_event',
'user_permissions')
def __init__(self, *args, **kwargs):
super(UsersForm, self).__init__(*args, **kwargs)
self.fields['country'].required = False
self.fields['user_permissions'].widget.attrs['class'] = 'input-xxlarge'
self.fields['user_permissions'].widget.attrs['style'] = 'min-height:150px'
self.fields['user_permissions'].help_text = 'Specific permissions for this user. Hold down "Control", or "Command" on a Mac, to select more than one.'
But when I save it via form.save(), any changed permissions are not saved. What do I have to do to change this?
thanks
Thomas