Mercurial > public > sg101
comparison gpp/bio/forms.py @ 312:88b2b9cb8c1f
Fixing #142; cut over to the django.contrib.staticfiles app.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 27 Jan 2011 02:56:10 +0000 |
parents | 1ba2c6bf6eb7 |
children | e28aee19f7c9 |
comparison
equal
deleted
inserted
replaced
311:b1c39788e511 | 312:88b2b9cb8c1f |
---|---|
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, |
37 widget=forms.Textarea(attrs={'class': 'markItUp'})) | 37 widget=forms.Textarea(attrs={'class': 'markItUp'})) |
38 | 38 |
39 class Meta: | 39 class Meta: |
40 model = UserProfile | 40 model = UserProfile |
41 fields = ('location', 'birthday', 'occupation', 'interests', | 41 fields = ('location', 'birthday', 'occupation', 'interests', |
93 # Django ContentFile from that. The ContentFile has no name, | 93 # Django ContentFile from that. The ContentFile has no name, |
94 # that is why we return one ourselves explicitly. | 94 # that is why we return one ourselves explicitly. |
95 s = StringIO() | 95 s = StringIO() |
96 self.image.save(s, self.file_type) | 96 self.image.save(s, self.file_type) |
97 return name, ContentFile(s.getvalue()) | 97 return name, ContentFile(s.getvalue()) |
98 | 98 |
99 return name, self.cleaned_data['avatar_file'] | 99 return name, self.cleaned_data['avatar_file'] |
100 | 100 |
101 | 101 |
102 class SearchUsersForm(forms.Form): | 102 class SearchUsersForm(forms.Form): |
103 """ | 103 """ |