Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 378 lines (340 sloc) 13.028 kb
13405931 »
2012-04-10 First commit
1 # Django settings for fiddlesalad project.
2 import os
3 PROJECT_DIR = os.path.dirname(__file__)
4
5 DEBUG = True
6 TEMPLATE_DEBUG = DEBUG
7
8 ADMINS = (
9 # ('Your Name', 'your_email@example.com'),
10 )
11
12 MANAGERS = ADMINS
13
14 DATABASES = {
15 'default': {
059c0d90 »
2012-04-10 make installation easier
16 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
13405931 »
2012-04-10 First commit
17 'NAME': 'fiddle', # Or path to database file if using sqlite3.
059c0d90 »
2012-04-10 make installation easier
18 'USER': '', # Not used with sqlite3.
13405931 »
2012-04-10 First commit
19 'PASSWORD': '', # Not used with sqlite3.
059c0d90 »
2012-04-10 make installation easier
20 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
13405931 »
2012-04-10 First commit
21 'PORT': '', # Set to empty string for default. Not used with sqlite3.
22 }
23 }
24
25 # Local time zone for this installation. Choices can be found here:
26 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
27 # although not all choices may be available on all operating systems.
28 # On Unix systems, a value of None will cause Django to use the same
29 # timezone as the operating system.
30 # If running in a Windows environment this must be set to the same as your
31 # system time zone.
32 TIME_ZONE = 'America/Chicago'
33
34 # Language code for this installation. All choices can be found here:
35 # http://www.i18nguy.com/unicode/language-identifiers.html
36 LANGUAGE_CODE = 'en-us'
37
38 SITE_ID = 1
39
40 # If you set this to False, Django will make some optimizations so as not
41 # to load the internationalization machinery.
42 USE_I18N = True
43
44 # If you set this to False, Django will not format dates, numbers and
45 # calendars according to the current locale
46 USE_L10N = True
47
48 # Absolute filesystem path to the directory that will hold user-uploaded files.
49 # Example: "/home/media/media.lawrence.com/media/"
50 MEDIA_ROOT = ''
51
52 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
53 # trailing slash.
54 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
55 MEDIA_URL = ''
56
57 # Absolute path to the directory static files should be collected to.
58 # Don't put anything in this directory yourself; store your static files
59 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
60 # Example: "/home/media/media.lawrence.com/static/"
61 STATIC_ROOT = os.path.join(PROJECT_DIR, "static")
62
63 PYTHON_LIB_DIR = os.path.join(PROJECT_DIR, "static\\lib")
64
65 # URL prefix for static files.
66 # Example: "http://media.lawrence.com/static/"
67 STATIC_URL = 'http://127.0.0.1:8000/static/'
68
69 MEDIA_VERSION = '2012032020'
70
71 # URL prefix for admin static files -- CSS, JavaScript and images.
72 # Make sure to use a trailing slash.
73 # Examples: "http://foo.com/static/admin/", "/static/admin/".
74 ADMIN_MEDIA_PREFIX = '/static/admin/'
75
76 AWS_ACCESS_KEY_ID = ''
77
78 AWS_SECRET_ACCESS_KEY = ''
79
80 AWS_STORAGE_BUCKET_NAME = ''
81
82 build_config = False
83
84 if not build_config:
85 FILES = {
86 'BOWSER': 'js/bowser.js',
87 'UNDERSCORE': 'js/underscore.js',
88 'VALIDATE': 'js/jquery.validate.js',
89 'KNOCKOUT': 'js/knockout-latest.debug.js',
90 'KNOCKOUT_MAPPING': 'js/knockout.mapping.js',
91 }
92 else:
93 FILES = {
94 'BOWSER': 'js/build/lib/bowser.min.js',
95 'UNDERSCORE': 'js/build/lib/underscore.min.js',
96 'VALIDATE': 'js/build/lib/jquery.validate.min.js',
97 'KNOCKOUT': 'js/build/lib/knockout.min.js',
98 'KNOCKOUT_MAPPING': 'js/build/lib/knockout.mapping.min.js',
99 }
100
101 # Media files
102 MEDIASYNC = {
103 'BACKEND': 'mediasync.backends.s3',
104 'AWS_KEY': AWS_ACCESS_KEY_ID,
105 'AWS_SECRET': AWS_SECRET_ACCESS_KEY,
106 'AWS_BUCKET': AWS_STORAGE_BUCKET_NAME,
107 'JOINED': {
108 'css/boilerplate.css': [
109 'css/boilerplate.css'
110 ],
111 'css/documentation.css': [
112 'css/documentation.css',
113 'css/syntax_highlighter_theme_default.css',
114 ],
115 'css/wijmo-artisto.css': [
116 'css/jquery-ui.artisto.css',
117 'css/jquery.wijmo-open.css',
118 ],
119 'css/home.css': [
120 'css/bootstrap.css',
121 'css/codemirror.css',
122 'css/codemirror/themes/monokai.css',
123 'css/home.css',
124 'css/logo.fiddlesalad.css',
125 ],
126 'css/snippets.css': [
127 'css/user.css'
128 ],
129 'css/login.css': [
130 'css/login.css'
131 ],
132 'css/404.css': [
133 'css/404.css'
134 ],
135 'css/styles.fiddle.css': [
136 'css/jquery-ui.flick.css',
137 'css/jquery.wijmo-open.css',
138 'css/jquery.noty.css',
139 'css/noty_theme_default.css',
140 'css/boilerplate.css',
141 'css/codemirror.css',
142 'css/codemirror/themes/stylish.css',
143 'css/codemirror/util/dialog.css',
144 'css/simple-hint.css',
145 'css/mergely.css',
146 'css/style.css',
147 'css/logo.fiddlesalad.css',
148 'css/fiddle.css',
149 'css/faq.css'
150 ],
151 'js/navigation.js': [
152 'js/navigation.js'
153 ],
154 'js/documentation.js': [
155 'js/build/lib/shCore.js',
156 'js/build/lib/shAutoloader.js',
157 'js/build/lib/shBrushPython.js',
158 'js/build/lib/shBrushXml.js',
159 ],
160 'js/jquery-ui.fiddle.js': [
161 'js/jquery-ui-1.8.18.custom.js',
162 'js/jquery.wijmo-open.all.2.0.0.min.js',
163 ],
164 'js/knockout.js': [
165 FILES['VALIDATE'],
166 'js/additional-methods.js',
167 FILES['KNOCKOUT'],
168 'js/knockout-jquery-ui-widget.js',
169 FILES['KNOCKOUT_MAPPING'],
170 'js/bindings.js',
171 ],
172 'js/fiddle.bootstrap.js': [
173 FILES['BOWSER'],
174 FILES['UNDERSCORE'],
175 'js/classy.js',
176 'js/helpers.js',
177 'js/trie.js',
178 'js/autocomplete.js',
179 'js/store.js',
180 'js/base64.js',
181 'js/frameworks.js',
182 'js/compiled-coffee/codestorage.js',
183 'js/fiddle-configuration.js',
184 'js/keywords.js',
185 'js/compiled-coffee/keylistener.js',
186 'js/compiled-coffee/engine.require.js',
187 'js/compiled-coffee/user-interface.js',
188 'js/compiled-coffee/fiddle-engine.js',
189 ],
190 'js/codemirror.fiddle.js': [
191 'js/codemirror.js',
192 'js/codemirror/simple-hint.js',
193 'js/codemirror/javascript-hint.js',
194 'js/codemirror/dialog.js',
195 'js/codemirror/searchcursor.js',
196 'js/codemirror/search.js',
197 'js/codemirror/formatting.js',
198 'js/keywords.js',
199 'js/codemirror/closetag.js',
200 'js/codemirror/mode/python/python.js',
201 'js/codemirror/mode/javascript/javascript.js',
202 'js/codemirror/mode/coffeescript/coffeescript.js',
203 'js/codemirror/mode/less/less.js',
204 'js/codemirror/mode/css/css.js',
205 'js/codemirror/mode/xml/xml.js',
206 'js/codemirror/mode/htmlmixed/htmlmixed.js',
207 'js/codemirror/mode/haml/haml.js',
208 'js/codemirror/mode/jade/jade.js',
209 'js/codemirror/mode/sass/sass.js',
210 'js/codemirror/mode/scss/scss.js',
211 'js/codemirror/mode/stylus/stylus.js',
212 'js/codemirror/runmode.js',
213 ],
214 'js/fiddle.plugins.js': [
215 'js/jquery.csrf.js',
216 'js/jquery.spellchecker.js',
217 'js/jquery.history.js',
218 'js/mergely.js',
219 ],
220 'js/fiddle.init.js': [
221 'js/prefixfree.js',
222 'js/date.format.js',
223 'js/compiled-coffee/model.js',
224 'js/fiddle.js',
225 'js/layout.js',
226 'js/htmlparser.js',
227 'js/jade.runtime.min.js',
228 'js/jquery.noty.js',
229 'js/beautify.js',
230 ],
231 'js/menu.fiddle.js': [
232 'js/fiddle-configuration.js',
233 'js/keywords.js',
234 'js/underscore.js',
235 'js/queue.js',
236 'js/store.js',
237 'js/compiled-coffee/menu.js',
238 ]
239 },
240 }
241
242 if build_config:
243 MEDIASYNC['PROCESSORS'] = ('mediasync.processors.closurecompiler.compile','mediasync.processors.slim.css_minifier',)
244 #MEDIASYNC['PROCESSORS'] = ('mediasync.processors.combine.default',)
245 MEDIASYNC['JOINED']['js/jquery-ui.fiddle.js'] = [
246 'js/build/lib/jquery-ui-1.8.18.custom.min.js',
247 'js/build/lib/jquery.wijmo.wijutil.min.js',
248 'js/build/lib/jquery.wijmo.wijdialog.min.js',
249 'js/build/lib/jquery.wijmo.wijsplitter.min.js',
250 'js/build/lib/jquery.wijmo.wijmenu.min.js',
251 ]
252
253 MEDIASYNC['SERVE_REMOTE'] = False
254
255 # Additional locations of static files
256 STATICFILES_DIRS = (
257 # Put strings here, like "/home/html/static" or "C:/www/django/static".
258 # Always use forward slashes, even on Windows.
259 # Don't forget to use absolute paths, not relative paths.
260 )
261
262 # List of finder classes that know how to find static files in
263 # various locations.
264 STATICFILES_FINDERS = (
265 'django.contrib.staticfiles.finders.FileSystemFinder',
266 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
267 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
268 )
269
270 # Make this unique, and don't share it with anybody.
271 SECRET_KEY = 'o#&0=io58r!=dhaf(gx@a5$n#2zy!b$k=yhu&^@uq^7=$v%&k('
272
273 # List of callables that know how to import templates from various sources.
274 TEMPLATE_LOADERS = (
275 'django.template.loaders.filesystem.Loader',
276 'django.template.loaders.app_directories.Loader',
277 # 'django.template.loaders.eggs.Loader',
278 )
279
280 TEMPLATE_CONTEXT_PROCESSORS = (
281 'django.contrib.auth.context_processors.auth',
282 'django.core.context_processors.debug',
283 'django.core.context_processors.i18n',
284 'django.core.context_processors.media',
285 'django.core.context_processors.static',
286 'django.contrib.messages.context_processors.messages',
287 'django.core.context_processors.request',
288 'cloud_ide.context_processors.debug',
289 'cloud_ide.context_processors.media',
290 'fiddlesalad.context_processors.site',
291 )
292
293 MIDDLEWARE_CLASSES = (
294 'django.middleware.common.CommonMiddleware',
295 'django.contrib.sessions.middleware.SessionMiddleware',
296 'django.middleware.csrf.CsrfViewMiddleware',
297 'django.contrib.auth.middleware.AuthenticationMiddleware',
298 'django.contrib.messages.middleware.MessageMiddleware',
299 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
300 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
301 )
302
303 ROOT_URLCONF = 'fiddlesalad.urls'
304
305 TEMPLATE_DIRS = (
792f685b »
2012-04-10 update directory setting for templates
306 os.path.join(os.path.dirname(PROJECT_DIR), "templates"),
13405931 »
2012-04-10 First commit
307 os.path.join(PROJECT_DIR, "templates"),
308 )
309
310 INSTALLED_APPS = (
311 'django.contrib.auth',
312 'django.contrib.contenttypes',
313 'django.contrib.sessions',
314 'django.contrib.admin',
315 'django.contrib.sites',
316 'django.contrib.sitemaps',
317 'django.contrib.flatpages',
318 'django.contrib.messages',
319 'django.contrib.staticfiles',
320 'django.contrib.redirects',
321 'mediasync',
322 'taggit',
323 'social_auth',
324 'chunks',
325 'cloud_ide.fiddle',
326 # Uncomment the next line to enable the admin:
327 # 'django.contrib.admin',
328 # Uncomment the next line to enable admin documentation:
329 # 'django.contrib.admindocs',
330 )
331
332 AUTHENTICATION_BACKENDS = (
333 'social_auth.backends.twitter.TwitterBackend',
334 'social_auth.backends.facebook.FacebookBackend',
335 'social_auth.backends.google.GoogleOAuthBackend',
336 'django.contrib.auth.backends.ModelBackend',
337 )
338
339 LOGIN_URL = '/login/'
340 LOGIN_REDIRECT_URL = '/done/'
341
342 TWITTER_CONSUMER_KEY = '65tXXWpGJ0PfsZzN1xR7Q'
343 TWITTER_CONSUMER_SECRET = 'KZa2FPOjIByvdFqcHGTQNi01VouoTiqeAaZ8yelTh0'
344 FACEBOOK_APP_ID = '244638052233650'
345 FACEBOOK_API_SECRET = '66c1d60fe6f777dc52c2c3eef5752fbf'
346 LINKEDIN_CONSUMER_KEY = ''
347 LINKEDIN_CONSUMER_SECRET = ''
348 ORKUT_CONSUMER_KEY = ''
349 ORKUT_CONSUMER_SECRET = ''
350 GOOGLE_OAUTH2_CLIENT_KEY = '823652973862.apps.googleusercontent.com'
351 GOOGLE_OAUTH2_CLIENT_SECRET = 'yQ4l2KebfymlugAnTgS6l2ID'
352 LOGIN_ERROR_URL = '/login/error/'
353 #SOCIAL_AUTH_USER_MODEL = 'app.CustomUser'
354 SOCIAL_AUTH_ERROR_KEY = 'socialauth_error'
355
356 # A sample logging configuration. The only tangible logging
357 # performed by this configuration is to send an email to
358 # the site admins on every HTTP 500 error.
359 # See http://docs.djangoproject.com/en/dev/topics/logging for
360 # more details on how to customize your logging configuration.
361 LOGGING = {
362 'version': 1,
363 'disable_existing_loggers': False,
364 'handlers': {
365 'mail_admins': {
366 'level': 'ERROR',
367 'class': 'django.utils.log.AdminEmailHandler'
368 }
369 },
370 'loggers': {
371 'django.request': {
372 'handlers': ['mail_admins'],
373 'level': 'ERROR',
374 'propagate': True,
375 },
376 }
377 }
Something went wrong with that request. Please try again.