Skip to content

Commit

Permalink
added template for local settings
Browse files Browse the repository at this point in the history
  • Loading branch information
q committed Sep 5, 2011
1 parent 64f6bed commit 508814e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 23 deletions.
36 changes: 36 additions & 0 deletions lolaws/local_settings_TEMPLATE.py
@@ -0,0 +1,36 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'lolaws',
'USER': 'lolaws',
'PASSWORD': 'SETME',
'HOST': 'SETME',
'PORT': '',
}
}

AWS_ACCESS_KEY_ID = "SETME"
AWS_SECRET_ACCESS_KEY = "SETME"
AWS_STORAGE_BUCKET_NAME = "SETME"

# S3
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'

STATIC_URL = 'http://'+AWS_STORAGE_BUCKET_NAME+'.s3.amazonaws.com/'
ADMIN_MEDIA_PREFIX = STATIC_URL + "admin/"

AWS_HEADERS = {
'Cache-Control': 'max-age=86400',
}

from S3 import CallingFormat
AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN

# email
EMAIL_BACKEND = 'django_ses.SESBackend'
DEFAULT_FROM_EMAIL = 'lolaws <SETME@EMAIL.LOL>'
EMAIL_SUBJECT_PREFIX = '[lolaws] '



24 changes: 1 addition & 23 deletions lolaws/settings.py
Expand Up @@ -62,7 +62,7 @@

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = 'http://BUCKETNAME.s3.amazonaws.com/'
STATIC_URL = '/static/'

# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
Expand Down Expand Up @@ -154,28 +154,6 @@
}
}


# s3 storage
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'

#DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'

AWS_ACCESS_KEY_ID = "SETME"
AWS_SECRET_ACCESS_KEY = "SETME"
AWS_STORAGE_BUCKET_NAME = "SETME"
STATIC_URL = 'http://'+AWS_STORAGE_BUCKET_NAME+'.s3.amazonaws.com/'
ADMIN_MEDIA_PREFIX = STATIC_URL + "admin/"
from S3 import CallingFormat
AWS_CALLING_FORMAT = CallingFormat.SUBDOMAIN
AWS_HEADERS = {
'Cache-Control': 'max-age=86400',
}

EMAIL_BACKEND = 'django_ses.SESBackend'
DEFAULT_FROM_EMAIL = 'lolaws <YOUR@EMAIL.LOL>'
EMAIL_SUBJECT_PREFIX = '[lolaws] '

try:
from local_settings import *
except ImportError:
Expand Down

0 comments on commit 508814e

Please sign in to comment.