Working on Heroku integration.

master
Nick Sergeant 2014-10-20 11:13:02 -04:00
parent d54612c1ab
commit e7b4b5515a
2 changed files with 14 additions and 25 deletions

View File

@ -12,6 +12,7 @@ django-pagination==1.0.7
django-taggit==0.10 django-taggit==0.10
django-tastypie==0.10.0 django-tastypie==0.10.0
django-templatetag-sugar==0.1 django-templatetag-sugar==0.1
django-toolbelt==0.0.1
ecdsa==0.10 ecdsa==0.10
Fabric==1.8.0 Fabric==1.8.0
gunicorn==18.0 gunicorn==18.0

View File

@ -1,6 +1,6 @@
# Django settings for snipt project. # Django settings for snipt project.
import os import dj_database_url, os
DEBUG = True DEBUG = True
@ -12,23 +12,23 @@ ADMINS = (
MANAGERS = ADMINS MANAGERS = ADMINS
DATABASES = { DATABASES['default'] = dj_database_url.config()
'default': { SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
'ENGINE': 'django.db.backends.postgresql_psycopg2', ALLOWED_HOSTS = ['*']
'NAME': os.environ.get('DB_NAME', 'snipt'),
'USER': os.environ.get('DB_USER', ''), BASE_DIR = os.path.dirname(os.path.abspath(__file__))
'PASSWORD': os.environ.get('DB_PASS', ''), STATIC_ROOT = 'staticfiles'
'HOST': os.environ.get('DB_PORT_5432_TCP_ADDR', '127.0.0.1'), STATIC_URL = '/static/'
'PORT': os.environ.get('DB_PORT_5432_TCP_PORT', ''),
} STATICFILES_DIRS = (
} os.path.join(BASE_DIR, 'media'),
os.path.join(BASE_DIR, 'static'),
)
INTERNAL_IPS = ('127.0.0.1',) INTERNAL_IPS = ('127.0.0.1',)
SITE_ID = 1 SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True USE_I18N = True
# If you set this to False, Django will not format dates, numbers and # If you set this to False, Django will not format dates, numbers and
@ -57,18 +57,6 @@ MEDIA_ROOT = os.path.join(BASE_PATH, 'media/uploads')
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/uploads/' MEDIA_URL = '/media/uploads/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(BASE_PATH, 'static')
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
os.path.join(BASE_PATH, 'media'),
)
# List of finder classes that know how to find static files in # List of finder classes that know how to find static files in
# various locations. # various locations.
STATICFILES_FINDERS = ( STATICFILES_FINDERS = (