All developers are using psql locally now
[oweals/karmaworld.git] / karmaworld / settings / dev.py
1 #!/usr/bin/env python
2 # -*- coding:utf8 -*-
3 # Copyright (C) 2012  FinalsClub Foundation
4 """Development settings and globals."""
5
6
7 from os.path import join, normpath
8 from S3 import CallingFormat
9
10 from common import *
11
12
13 ########## DEBUG CONFIGURATION
14 # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
15 DEBUG = True
16
17 # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
18 TEMPLATE_DEBUG = DEBUG
19 ########## END DEBUG CONFIGURATION
20
21
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
26
27
28 ########## DATABASE CONFIGURATION
29 # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
30 DATABASES = {
31     'default': {
32         'ENGINE': 'django.db.backends.postgresql_psycopg2',
33         'NAME': 'karmanotes',
34         'USER': 'djkarma',
35         'PASSWORD': 'karma',
36         'HOST': 'localhost',
37         'PORT': '',  # Set to empty string for default. Not used with sqlite3.
38     }
39 }
40 ########## END DATABASE CONFIGURATION
41
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'))
47
48 ########## END STATIC CONFIG
49
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
54
55 ########## STORAGE CONFIGURATION
56 # See: http://django-storages.readthedocs.org/en/latest/index.html
57 INSTALLED_APPS += (
58     'storages',
59 )
60
61 # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
62 AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
63
64 # AWS cache settings, don't change unless you know what you're doing:
65 AWS_EXPIREY = 60 * 60 * 24 * 7
66 AWS_HEADERS = {
67     'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
68         AWS_EXPIREY)
69 }
70 ########## END STORAGE CONFIGURATION
71
72
73 ########## TOOLBAR CONFIGURATION
74 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
75 INSTALLED_APPS += (
76     'debug_toolbar',
77     'django_extensions',
78     'django_nose',
79 )
80
81 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
82 INTERNAL_IPS = ('127.0.0.1',)
83
84 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
85 MIDDLEWARE_CLASSES += (
86     'debug_toolbar.middleware.DebugToolbarMiddleware',
87 )
88
89
90 DEBUG_TOOLBAR_CONFIG = {
91     'INTERCEPT_REDIRECTS': False # Don't interrput our redirects!
92 }
93 ########## END TOOLBAR CONFIGURATION
94
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