3 # Copyright (C) 2012 FinalsClub Foundation
4 """Development settings and globals."""
6 from os.path import join, normpath
7 from S3 import CallingFormat
12 ########## DEBUG CONFIGURATION
13 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
16 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
17 TEMPLATE_DEBUG = DEBUG
18 ########## END DEBUG CONFIGURATION
21 ########## EMAIL CONFIGURATION
22 # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
23 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
24 ########## END EMAIL CONFIGURATION
27 ########## STATIC CONFIG
28 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
29 STATIC_URL = '/static/'
30 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
31 STATIC_ROOT = normpath(join(DJANGO_ROOT, 'static'))
33 ########## END STATIC CONFIG
35 ########## CELERY CONFIGURATION
36 # See: http://docs.celeryq.org/en/latest/configuration.html#celery-always-eager
37 CELERY_ALWAYS_EAGER = True
38 ########## END CELERY CONFIGURATION
40 ########## STORAGE CONFIGURATION
41 # See: http://django-storages.readthedocs.org/en/latest/index.html
46 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
47 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
49 # AWS cache settings, don't change unless you know what you're doing:
50 AWS_EXPIREY = 60 * 60 * 24 * 7
52 'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
55 ########## END STORAGE CONFIGURATION
58 ########## TOOLBAR CONFIGURATION
59 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
66 DEBUG_TOOLBAR_PATCH_SETTINGS = False
68 DEBUG_TOOLBAR_PANELS = (
69 'debug_toolbar.panels.versions.VersionsPanel',
70 'debug_toolbar.panels.timer.TimerPanel',
71 'debug_toolbar.panels.settings.SettingsPanel',
72 'debug_toolbar.panels.headers.HeadersPanel',
73 'debug_toolbar.panels.request.RequestPanel',
74 'debug_toolbar.panels.sql.SQLPanel',
75 'debug_toolbar.panels.staticfiles.StaticFilesPanel',
76 'debug_toolbar.panels.templates.TemplatesPanel',
77 'debug_toolbar.panels.cache.CachePanel',
78 'debug_toolbar.panels.signals.SignalsPanel',
79 'debug_toolbar.panels.logging.LoggingPanel',
82 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
83 INTERNAL_IPS = ('127.0.0.1',)
85 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
86 MIDDLEWARE_CLASSES += (
87 'debug_toolbar.middleware.DebugToolbarMiddleware',
89 ########## END TOOLBAR CONFIGURATION
91 ########## PROFILING CONFIGURATION
92 MIDDLEWARE_CLASSES += (
93 'karmaworld.apps.courses.middleware.ProfileMiddleware',
95 ########## END PROFILING CONFIGURATION
97 ########## COMPRESSION CONFIGURATION
98 COMPRESS_ENABLED = False
99 ########## END COMPRESSION CONFIGURATION
102 ########## TESTING CONFIGURATION
103 # Use django-nose to test our app, see https://github.com/jbalogh/django-nose
104 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
105 ########## END TESTING CONFIGURATION