Mercurial > public > sg101
comparison gpp/membermap/forms.py @ 6:b6263ac72052
Use DRY principle to manage third party javascript libraries. Created script_tags template tags to generate the correct link and script tags for 3rd party libraries. The settings.py file is the only place where the full path name is specified.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 22:50:56 +0000 |
parents | dbd703f7d63a |
children | c515b7401078 |
comparison
equal
deleted
inserted
replaced
5:63696b279e35 | 6:b6263ac72052 |
---|---|
1 """ | 1 """ |
2 Forms for the member map application. | 2 Forms for the member map application. |
3 """ | 3 """ |
4 from django import forms | 4 from django import forms |
5 from django.conf import settings | |
6 | |
5 from membermap.models import MapEntry | 7 from membermap.models import MapEntry |
6 | 8 |
7 | 9 |
8 class MapEntryForm(forms.ModelForm): | 10 class MapEntryForm(forms.ModelForm): |
9 | 11 |
11 model = MapEntry | 13 model = MapEntry |
12 fields = ('location', 'message') | 14 fields = ('location', 'message') |
13 | 15 |
14 class Media: | 16 class Media: |
15 css = { | 17 css = { |
16 'all': ('js/markitup/skins/markitup/style.css', | 18 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] |
17 'js/markitup/sets/markdown/style.css') | |
18 } | 19 } |
19 js = ( | 20 js = settings.GPP_THIRD_PARTY_JS['markitup'] |
20 'js/markitup/jquery.markitup.pack.js', | |
21 'js/markitup/sets/markdown/set.js', | |
22 ) | |
23 | 21 |
24 # vim: ts=4 sw=4 | 22 # vim: ts=4 sw=4 |