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 ########## DATABASE CONFIGURATION
28 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
31 'ENGINE': 'django.db.backends.postgresql_psycopg2',
36 'PORT': '', # Set to empty string for default. Not used with sqlite3.
39 ########## END DATABASE CONFIGURATION
41 ########## STATIC CONFIG
42 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
43 STATIC_URL = '/static/'
44 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
45 STATIC_ROOT = normpath(join(DJANGO_ROOT, 'static'))
47 ########## END STATIC CONFIG
49 ########## CELERY CONFIGURATION
50 # See: http://docs.celeryq.org/en/latest/configuration.html#celery-always-eager
51 CELERY_ALWAYS_EAGER = True
52 ########## END CELERY CONFIGURATION
54 ########## STORAGE CONFIGURATION
55 # See: http://django-storages.readthedocs.org/en/latest/index.html
60 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
61 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
63 # AWS cache settings, don't change unless you know what you're doing:
64 AWS_EXPIREY = 60 * 60 * 24 * 7
66 'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
69 ########## END STORAGE CONFIGURATION
72 ########## TOOLBAR CONFIGURATION
73 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
76 'template_timings_panel',
81 DEBUG_TOOLBAR_PANELS = (
82 'debug_toolbar.panels.versions.VersionsPanel',
83 'debug_toolbar.panels.timer.TimerPanel',
84 'debug_toolbar.panels.settings.SettingsPanel',
85 'debug_toolbar.panels.headers.HeadersPanel',
86 'debug_toolbar.panels.request.RequestPanel',
87 'debug_toolbar.panels.sql.SQLPanel',
88 'debug_toolbar.panels.staticfiles.StaticFilesPanel',
89 'debug_toolbar.panels.templates.TemplatesPanel',
90 'template_timings_panel.panels.TemplateTimings.TemplateTimings',
91 'debug_toolbar.panels.cache.CachePanel',
92 'debug_toolbar.panels.signals.SignalsPanel',
93 'debug_toolbar.panels.logging.LoggingPanel',
96 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
97 INTERNAL_IPS = ('127.0.0.1',)
99 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
100 MIDDLEWARE_CLASSES += (
101 'debug_toolbar.middleware.DebugToolbarMiddleware',
103 ########## END TOOLBAR CONFIGURATION
105 ########## PROFILING CONFIGURATION
106 MIDDLEWARE_CLASSES += (
107 'karmaworld.apps.courses.middleware.ProfileMiddleware',
109 ########## END PROFILING CONFIGURATION
111 ########## COMPRESSION CONFIGURATION
112 COMPRESS_ENABLED = False
113 ########## END COMPRESSION CONFIGURATION
116 ########## TESTING CONFIGURATION
117 # Use django-nose to test our app, see https://github.com/jbalogh/django-nose
118 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
119 ########## END TESTING CONFIGURATION