taskapp/forms/user.py
changeset 219 f04a1ec7a07f
parent 213 a01078a9bbcf
equal deleted inserted replaced
218:59107ce0a618 219:f04a1ec7a07f
    14 class UserProfileEditForm(forms.ModelForm):
    14 class UserProfileEditForm(forms.ModelForm):
    15     """Form used to edit the profile of a user"""
    15     """Form used to edit the profile of a user"""
    16     
    16     
    17     class Meta:
    17     class Meta:
    18         model = Profile
    18         model = Profile
    19         exclude = ('user','rights','dob','credits')
    19         exclude = ('user','rights','dob','pynts')
    20 
    20 
    21     def clean_photo(self):
    21     def clean_photo(self):
    22         uploaded_photo = self.data.get('photo', None)
    22         uploaded_photo = self.data.get('photo', None)
    23         prev_photo = self.instance.photo
    23         prev_photo = self.instance.photo
    24         if uploaded_photo:
    24         if uploaded_photo: