Permalink
Browse files

fix settings

  • Loading branch information...
1 parent d777dcf commit 64c43442fcbcffb2b399c8065164251301f0c43d @rudasn committed Dec 10, 2012
Showing with 32 additions and 13 deletions.
  1. +1 −1 project_name/settings/__init__.py
  2. +6 −6 project_name/settings/development.py
  3. +25 −6 project_name/settings/production.py
@@ -1,7 +1,7 @@
import os
try:
- import is_local
+ import local
from development import *
except:
from production import *
@@ -12,12 +12,6 @@
########## END DEBUG CONFIGURATION
-########## EMAIL CONFIGURATION
-# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
-EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
-########## END EMAIL CONFIGURATION
-
-
########## DATABASE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
@@ -33,6 +27,12 @@
########## END DATABASE CONFIGURATION
+########## EMAIL CONFIGURATION
+# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
+EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
+########## END EMAIL CONFIGURATION
+
+
########## CACHE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
CACHES = {
@@ -3,6 +3,25 @@
from common import *
from S3 import CallingFormat
+
+########## DATABASE CONFIGURATION
+DATABASE = {
+ 'NAME': '',
+ 'USER': '',
+ 'PASSWORD': ''
+}
+########## END DATABASE CONFIGURATION
+
+
+########## AMAZON S3 CONFIGURATION
+AMAZONS3 = {
+ 'ACCESS_KEY_ID': '',
+ 'SECRET_ACCESS_KEY': '',
+ 'BUCKET': '{{ project_name }}_django_static_storage'
+}
+########## AMAZON S3 CONFIGURATION
+
+
########## EMAIL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
@@ -34,9 +53,9 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
- 'NAME': '',
- 'USER': '',
- 'PASSWORD': '',
+ 'NAME': DATABASE.get('NAME'),
+ 'USER': DATABASE.get('USER'),
+ 'PASSWORD': DATABASE.get('PASSWORD'),
'HOST': '',
'PORT': '',
}
@@ -68,9 +87,9 @@
AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
# See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings
-AWS_ACCESS_KEY_ID = ''
-AWS_SECRET_ACCESS_KEY = ''
-AWS_STORAGE_BUCKET_NAME = ''
+AWS_ACCESS_KEY_ID = AMAZONS3.get('ACCESS_KEY_ID', '')
+AWS_SECRET_ACCESS_KEY = AMAZONS3.get('SECRET_ACCESS_KEY', '')
+AWS_STORAGE_BUCKET_NAME = AMAZONS3.get('BUCKET', '')
AWS_AUTO_CREATE_BUCKET = True
AWS_QUERYSTRING_AUTH = False

0 comments on commit 64c4344

Please sign in to comment.