comparison gpp/bio/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 f408971657b9
comparison
equal deleted inserted replaced
5:63696b279e35 6:b6263ac72052
38 model = UserProfile 38 model = UserProfile
39 exclude = ('user', 'avatar', 'profile_html', 'signature_html') 39 exclude = ('user', 'avatar', 'profile_html', 'signature_html')
40 40
41 class Media: 41 class Media:
42 css = { 42 css = {
43 'all': ('js/markitup/skins/markitup/style.css', 43 'all': settings.GPP_THIRD_PARTY_CSS['markitup'] + \
44 'js/markitup/sets/markdown/style.css', 44 settings.GPP_THIRD_PARTY_CSS['jquery-ui']
45 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/redmond/jquery-ui.css',
46 ),
47 } 45 }
48 js = ( 46 js = settings.GPP_THIRD_PARTY_JS['jquery'] + \
49 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', 47 settings.GPP_THIRD_PARTY_JS['markitup'] + \
50 'js/markitup/jquery.markitup.pack.js', 48 settings.GPP_THIRD_PARTY_JS['jquery-ui'] + \
51 'js/markitup/sets/markdown/set.js', 49 ('js/bio.js', )
52 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/jquery-ui.js',
53 'js/bio.js',
54 )
55 50
56 51
57 def get_image(file): 52 def get_image(file):
58 """ 53 """
59 Returns a PIL Image from the supplied file. 54 Returns a PIL Image from the supplied file.