broker pool limit
[oweals/karmaworld.git] / karmaworld / settings / dev.py
index d323fca4ababdde6f703917f3678a00d314b8884..d563696216cc6eb6ccde436862a4c1ca171feda3 100644 (file)
@@ -3,8 +3,8 @@
 # Copyright (C) 2012  FinalsClub Foundation
 """Development settings and globals."""
 
-
 from os.path import join, normpath
+from S3 import CallingFormat
 
 from common import *
 
@@ -24,41 +24,59 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 ########## END EMAIL CONFIGURATION
 
 
-########## DATABASE CONFIGURATION
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
-DATABASES = {
-    'default': {
-        'ENGINE': 'django.db.backends.sqlite3',
-        'NAME': normpath(join(DJANGO_ROOT, 'karmaworld.db')),
-        'USER': '',
-        'PASSWORD': '',
-        'HOST': '',
-        'PORT': '',
-    }
-}
-########## END DATABASE CONFIGURATION
-
-
-########## CACHE CONFIGURATION
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
-CACHES = {
-    'default': {
-        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
-    }
-}
-########## END CACHE CONFIGURATION
+########## STATIC CONFIG
+# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
+STATIC_URL = '/static/'
+# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
+STATIC_ROOT = normpath(join(DJANGO_ROOT, 'static'))
 
+########## END STATIC CONFIG
 
 ########## CELERY CONFIGURATION
 # See: http://docs.celeryq.org/en/latest/configuration.html#celery-always-eager
 CELERY_ALWAYS_EAGER = True
 ########## END CELERY CONFIGURATION
 
+########## STORAGE CONFIGURATION
+# See: http://django-storages.readthedocs.org/en/latest/index.html
+INSTALLED_APPS += (
+    'storages',
+)
+
+# See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
+AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
+
+# AWS cache settings, don't change unless you know what you're doing:
+AWS_EXPIREY = 60 * 60 * 24 * 7
+AWS_HEADERS = {
+    'Cache-Control': 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIREY,
+        AWS_EXPIREY)
+}
+########## END STORAGE CONFIGURATION
+
 
 ########## TOOLBAR CONFIGURATION
 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
 INSTALLED_APPS += (
     'debug_toolbar',
+    'django_extensions',
+    'django_nose',
+)
+
+DEBUG_TOOLBAR_PATCH_SETTINGS = False
+
+DEBUG_TOOLBAR_PANELS = (
+    'debug_toolbar.panels.versions.VersionsPanel',
+    'debug_toolbar.panels.timer.TimerPanel',
+    'debug_toolbar.panels.settings.SettingsPanel',
+    'debug_toolbar.panels.headers.HeadersPanel',
+    'debug_toolbar.panels.request.RequestPanel',
+    'debug_toolbar.panels.sql.SQLPanel',
+    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
+    'debug_toolbar.panels.templates.TemplatesPanel',
+    'debug_toolbar.panels.cache.CachePanel',
+    'debug_toolbar.panels.signals.SignalsPanel',
+    'debug_toolbar.panels.logging.LoggingPanel',
 )
 
 # See: https://github.com/django-debug-toolbar/django-debug-toolbar#installation
@@ -68,8 +86,20 @@ INTERNAL_IPS = ('127.0.0.1',)
 MIDDLEWARE_CLASSES += (
     'debug_toolbar.middleware.DebugToolbarMiddleware',
 )
-
-DEBUG_TOOLBAR_CONFIG = { 
-    'INTERCEPT_REDIRECTS': False # Don't interrput our redirects!
-}
 ########## END TOOLBAR CONFIGURATION
+
+########## PROFILING CONFIGURATION
+MIDDLEWARE_CLASSES += (
+    'karmaworld.apps.courses.middleware.ProfileMiddleware',
+)
+########## END PROFILING CONFIGURATION
+
+########## COMPRESSION CONFIGURATION
+COMPRESS_ENABLED = False
+########## END COMPRESSION CONFIGURATION
+
+
+########## TESTING CONFIGURATION
+# Use django-nose to test our app, see https://github.com/jbalogh/django-nose
+TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
+########## END TESTING CONFIGURATION