comparison gpp/bio/forms.py @ 70:c0d3b09c9b95

#18 - Add time zone field to user profile.
author Brian Neal <bgneal@gmail.com>
date Wed, 01 Jul 2009 17:57:11 +0000
parents 5eed5e7c1c98
children f8f4514b806a
comparison
equal deleted inserted replaced
69:9fb8e804652b 70:c0d3b09c9b95
28 class EditUserProfileForm(forms.ModelForm): 28 class EditUserProfileForm(forms.ModelForm):
29 """Form for editing the fields of the UserProfile model.""" 29 """Form for editing the fields of the UserProfile model."""
30 location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) 30 location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
31 occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) 31 occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
32 interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) 32 interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
33 time_zone = forms.CharField(required=False, widget=forms.HiddenInput())
33 34
34 class Meta: 35 class Meta:
35 model = UserProfile 36 model = UserProfile
36 exclude = ('user', 'avatar', 'profile_html', 'signature_html') 37 exclude = ('user', 'avatar', 'profile_html', 'signature_html')
37 38
40 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \ 41 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \
41 settings.GPP_THIRD_PARTY_CSS['jquery-ui'] 42 settings.GPP_THIRD_PARTY_CSS['jquery-ui']
42 } 43 }
43 js = settings.GPP_THIRD_PARTY_JS['markitup'] + \ 44 js = settings.GPP_THIRD_PARTY_JS['markitup'] + \
44 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + \ 45 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + \
45 ('js/bio.js', ) 46 ('js/bio.js', 'js/timezone.js')
46 47
47 48
48 def get_image(file): 49 def get_image(file):
49 """ 50 """
50 Returns a PIL Image from the supplied file. 51 Returns a PIL Image from the supplied file.