comparison membermap/forms.py @ 581:ee87ea74d46b

For Django 1.4, rearranged project structure for new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 17:10:48 -0500
parents gpp/membermap/forms.py@88b2b9cb8c1f
children 21c592cac71c
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 """
2 Forms for the member map application.
3 """
4 from django import forms
5 from django.conf import settings
6
7 from membermap.models import MapEntry
8
9
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'}))
15
16 class Meta:
17 model = MapEntry
18 fields = ('location', 'message')
19
20 class Media:
21 css = {
22 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] +
23 settings.GPP_THIRD_PARTY_CSS['jquery-ui'])
24 }
25 js = (settings.GPP_THIRD_PARTY_JS['markitup'] +
26 settings.GPP_THIRD_PARTY_JS['jquery-ui'])
27