Mercurial > public > sg101
comparison bio/forms.py @ 609:678a1a2ef55a
For issue 16, add country flag icons to user profiles & forum posts.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 28 Jul 2012 15:12:09 -0500 |
parents | ee87ea74d46b |
children | 5be850a66dfc |
comparison
equal
deleted
inserted
replaced
608:8ddd6490cbc9 | 609:678a1a2ef55a |
---|---|
24 fields = ('first_name', 'last_name', 'email') | 24 fields = ('first_name', 'last_name', 'email') |
25 | 25 |
26 | 26 |
27 class EditUserProfileForm(forms.ModelForm): | 27 class EditUserProfileForm(forms.ModelForm): |
28 """Form for editing the fields of the UserProfile model.""" | 28 """Form for editing the fields of the UserProfile model.""" |
29 location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) | 29 location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 })) |
30 occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) | 30 occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 })) |
31 interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 })) | 31 interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 })) |
32 time_zone = forms.CharField(required=False, widget=forms.HiddenInput()) | 32 time_zone = forms.CharField(required=False, widget=forms.HiddenInput()) |
33 use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False) | 33 use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False) |
34 profile_text = forms.CharField(required=False, | 34 profile_text = forms.CharField(required=False, |
35 widget=forms.Textarea(attrs={'class': 'markItUp'})) | 35 widget=forms.Textarea(attrs={'class': 'markItUp'})) |
36 signature = forms.CharField(required=False, | 36 signature = forms.CharField(required=False, |
40 auto_subscribe = forms.BooleanField( | 40 auto_subscribe = forms.BooleanField( |
41 label='Automatically subscribe to every forum topic I create or reply to', required=False) | 41 label='Automatically subscribe to every forum topic I create or reply to', required=False) |
42 | 42 |
43 class Meta: | 43 class Meta: |
44 model = UserProfile | 44 model = UserProfile |
45 fields = ('location', 'birthday', 'occupation', 'interests', | 45 fields = ('location', 'country', 'birthday', 'occupation', 'interests', |
46 'profile_text', 'hide_email', 'signature', 'time_zone', | 46 'profile_text', 'hide_email', 'signature', 'time_zone', |
47 'use_24_time', 'auto_favorite', 'auto_subscribe') | 47 'use_24_time', 'auto_favorite', 'auto_subscribe') |
48 | 48 |
49 class Media: | 49 class Media: |
50 css = { | 50 css = { |