Working on Heroku integration.
parent
d54612c1ab
commit
e7b4b5515a
|
@ -12,6 +12,7 @@ django-pagination==1.0.7
|
|||
django-taggit==0.10
|
||||
django-tastypie==0.10.0
|
||||
django-templatetag-sugar==0.1
|
||||
django-toolbelt==0.0.1
|
||||
ecdsa==0.10
|
||||
Fabric==1.8.0
|
||||
gunicorn==18.0
|
||||
|
|
38
settings.py
38
settings.py
|
@ -1,6 +1,6 @@
|
|||
# Django settings for snipt project.
|
||||
|
||||
import os
|
||||
import dj_database_url, os
|
||||
|
||||
DEBUG = True
|
||||
|
||||
|
@ -12,23 +12,23 @@ ADMINS = (
|
|||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': os.environ.get('DB_NAME', 'snipt'),
|
||||
'USER': os.environ.get('DB_USER', ''),
|
||||
'PASSWORD': os.environ.get('DB_PASS', ''),
|
||||
'HOST': os.environ.get('DB_PORT_5432_TCP_ADDR', '127.0.0.1'),
|
||||
'PORT': os.environ.get('DB_PORT_5432_TCP_PORT', ''),
|
||||
}
|
||||
}
|
||||
DATABASES['default'] = dj_database_url.config()
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
STATIC_ROOT = 'staticfiles'
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = (
|
||||
os.path.join(BASE_DIR, 'media'),
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
)
|
||||
|
||||
INTERNAL_IPS = ('127.0.0.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
|
||||
|
||||
# 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/"
|
||||
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
|
||||
# various locations.
|
||||
STATICFILES_FINDERS = (
|
||||
|
|
Loading…
Reference in New Issue