comparison gpp/settings.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 ca66189c7c44
comparison
equal deleted inserted replaced
5:63696b279e35 6:b6263ac72052
138 GPP_NO_REPLY_EMAIL = 'no_reply' 138 GPP_NO_REPLY_EMAIL = 'no_reply'
139 AVATAR_DIR = 'avatars' 139 AVATAR_DIR = 'avatars'
140 MAX_AVATAR_SIZE_BYTES = 2 * 1024 * 1024 140 MAX_AVATAR_SIZE_BYTES = 2 * 1024 * 1024
141 MAX_AVATAR_SIZE_PIXELS = 100 141 MAX_AVATAR_SIZE_PIXELS = 100
142 AVATAR_DEFAULT_URL = MEDIA_URL + AVATAR_DIR + '/default.png' 142 AVATAR_DEFAULT_URL = MEDIA_URL + AVATAR_DIR + '/default.png'
143
144 # URL's of 3rd party Javascript and CSS files.
145 # These dictionaries are used by core/templatetags/script_tags, and
146 # should also be used by developers when creating form media classes.
147 GPP_THIRD_PARTY_JS = {
148 'jquery': (
149 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js',
150 ),
151 'jquery-autocomplete': (
152 'js/jquery-autocomplete/lib/jquery.js',
153 'js/jquery-autocomplete/lib/jquery.bgiframe.min.js',
154 'js/jquery-autocomplete/lib/jquery.ajaxQueue.js',
155 'js/jquery-autocomplete/jquery.autocomplete.js',
156 ),
157 'jquery-jeditable': (
158 'js/jquery.jeditable.mini.js',
159 ),
160 'jquery-ui': (
161 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/jquery-ui.js',
162 ),
163 'markitup': (
164 'js/markitup/jquery.markitup.pack.js',
165 'js/markitup/sets/markdown/set.js',
166 ),
167 }
168 GPP_THIRD_PARTY_CSS = {
169 'jquery-ui': (
170 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/redmond/jquery-ui.css',
171 ),
172 'jquery-autocomplete': (
173 'js/jquery-autocomplete/jquery.autocomplete.css',
174 ),
175 'markitup': (
176 'js/markitup/skins/markitup/style.css',
177 'js/markitup/sets/markdown/style.css',
178 ),
179 }
180
181 # vim: ts=4 sw=4