comparison gpp/bio/forms.py @ 120:f8f4514b806a

Added a 24-hour time preference flag in the user profile. Added forum template tags for showing forum dates/times adjusted for the user's time zone.
author Brian Neal <bgneal@gmail.com>
date Sun, 25 Oct 2009 21:55:28 +0000
parents c0d3b09c9b95
children c515b7401078
comparison
equal deleted inserted replaced
119:b8f1dcc9fae4 120:f8f4514b806a
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 time_zone = forms.CharField(required=False, widget=forms.HiddenInput())
34 use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False)
34 35
35 class Meta: 36 class Meta:
36 model = UserProfile 37 model = UserProfile
37 exclude = ('user', 'avatar', 'profile_html', 'signature_html') 38 exclude = ('user', 'avatar', 'profile_html', 'signature_html', 'forum_post_count')
38 39
39 class Media: 40 class Media:
40 css = { 41 css = {
41 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \ 42 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \
42 settings.GPP_THIRD_PARTY_CSS['jquery-ui'] 43 settings.GPP_THIRD_PARTY_CSS['jquery-ui']