Mercurial > public > sg101
annotate membermap/forms.py @ 1017:21c592cac71c
ManifestStaticFilesStorage: stop using form Media.
It's okay for the admin, but not for user facing stuff.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 06 Dec 2015 14:48:30 -0600 |
parents | ee87ea74d46b |
children | 6164cc091649 |
rev | line source |
---|---|
gremmie@1 | 1 """ |
gremmie@1 | 2 Forms for the member map application. |
gremmie@1 | 3 """ |
gremmie@1 | 4 from django import forms |
bgneal@6 | 5 |
gremmie@1 | 6 from membermap.models import MapEntry |
gremmie@1 | 7 |
gremmie@1 | 8 |
gremmie@1 | 9 class MapEntryForm(forms.ModelForm): |
bgneal@312 | 10 location = forms.CharField(required=True, |
bgneal@133 | 11 widget=forms.TextInput(attrs={'size': 64, 'maxlength': 255})) |
bgneal@312 | 12 message = forms.CharField(required=False, |
bgneal@133 | 13 widget=forms.Textarea(attrs={'class': 'markItUp smileyTarget'})) |
gremmie@1 | 14 |
gremmie@1 | 15 class Meta: |
gremmie@1 | 16 model = MapEntry |
gremmie@1 | 17 fields = ('location', 'message') |