Mercurial > public > sg101
comparison gpp/membermap/forms.py @ 133:c515b7401078
Use the new common way to apply markItUp to textareas and to get the smiley and markdown help dialogs for all the remaining apps except for forums and comments.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 27 Nov 2009 00:21:47 +0000 |
parents | b6263ac72052 |
children | 88b2b9cb8c1f |
comparison
equal
deleted
inserted
replaced
132:06503edcc56b | 133:c515b7401078 |
---|---|
6 | 6 |
7 from membermap.models import MapEntry | 7 from membermap.models import MapEntry |
8 | 8 |
9 | 9 |
10 class MapEntryForm(forms.ModelForm): | 10 class MapEntryForm(forms.ModelForm): |
11 location = forms.CharField(required=True, | |
12 widget=forms.TextInput(attrs={'size': 64, 'maxlength': 255})) | |
13 message = forms.CharField(required=False, | |
14 widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) | |
11 | 15 |
12 class Meta: | 16 class Meta: |
13 model = MapEntry | 17 model = MapEntry |
14 fields = ('location', 'message') | 18 fields = ('location', 'message') |
15 | 19 |
16 class Media: | 20 class Media: |
17 css = { | 21 css = { |
18 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] | 22 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] + |
23 settings.GPP_THIRD_PARTY_CSS['jquery-ui']) | |
19 } | 24 } |
20 js = settings.GPP_THIRD_PARTY_JS['markitup'] | 25 js = (settings.GPP_THIRD_PARTY_JS['markitup'] + |
26 settings.GPP_THIRD_PARTY_JS['jquery-ui']) | |
21 | 27 |
22 # vim: ts=4 sw=4 |