3 # Copyright (C) 2012 FinalsClub Foundation
4 """Development settings and globals."""
7 from os.path import join, normpath
8 from S3 import CallingFormat
13 ########## DEBUG CONFIGURATION
14 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
17 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
18 TEMPLATE_DEBUG = DEBUG
19 ########## END DEBUG CONFIGURATION
22 ########## EMAIL CONFIGURATION
23 # See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
24 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
25 ########## END EMAIL CONFIGURATION
28 ########## DATABASE CONFIGURATION
29 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
32 'ENGINE': 'django.db.backends.postgresql_psycopg2',
37 'PORT': '', # Set to empty string for default. Not used with sqlite3.
40 ########## END DATABASE CONFIGURATION
42 ########## STATIC CONFIG
43 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
44 STATIC_URL = '/static/'
45 # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
46 STATIC_ROOT = normpath(join(DJANGO_ROOT, 'static'))
48 ########## END STATIC CONFIG
50 ########## CELERY CONFIGURATION
51 # See: http://docs.celeryq.org/en/latest/configuration.html#celery-always-eager
52 CELERY_ALWAYS_EAGER = True
53 ########## END CELERY CONFIGURATION
55 ########## STORAGE CONFIGURATION
56 # See: http://django-storages.readthedocs.org/en/latest/index.html
61 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
62 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
64 # AWS cache settings, don't change unless you know what you're doing:
65 AWS_EXPIREY = 60 * 60 * 24 * 7
67 'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
70 ########## END STORAGE CONFIGURATION
73 ########## TOOLBAR CONFIGURATION
74 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
81 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
82 INTERNAL_IPS = ('127.0.0.1',)
84 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
85 MIDDLEWARE_CLASSES += (
86 'debug_toolbar.middleware.DebugToolbarMiddleware',
90 DEBUG_TOOLBAR_CONFIG = {
91 'INTERCEPT_REDIRECTS': False # Don't interrput our redirects!
93 ########## END TOOLBAR CONFIGURATION
95 ########## TESTING CONFIGURATION
96 # Use django-nose to test our app, see https://github.com/jbalogh/django-nose
97 TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
98 ########## END TESTING CONFIGURATION