-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update example project settings to remove warnings on 1.7. Remove ref…
…erences to dotcloud.
- Loading branch information
Showing
1 changed file
with
4 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,11 @@ | |
import json | ||
import os | ||
|
||
PROJECT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) | ||
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
ADMINS = ( | ||
# ('Your Name', '[email protected]'), | ||
) | ||
|
||
MANAGERS = ADMINS | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | ||
|
@@ -37,8 +31,6 @@ | |
# http://www.i18nguy.com/unicode/language-identifiers.html | ||
LANGUAGE_CODE = 'en-us' | ||
|
||
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 | ||
|
@@ -74,7 +66,7 @@ | |
# Put strings here, like "/home/html/static" or "C:/www/django/static". | ||
# Always use forward slashes, even on Windows. | ||
# Don't forget to use absolute paths, not relative paths. | ||
os.path.join(PROJECT_PATH, 'static'), | ||
os.path.join(BASE_DIR, 'static'), | ||
) | ||
|
||
# List of finder classes that know how to find static files in | ||
|
@@ -88,21 +80,14 @@ | |
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = '&k9%jt6ozi$7o+xalyhx9=^e6+*mtb*s9)crr9mhp=ti8utykl' | ||
|
||
# List of callables that know how to import templates from various sources. | ||
TEMPLATE_LOADERS = ( | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
# 'django.template.loaders.eggs.Loader', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
# Uncomment the next line for simple clickjacking protection: | ||
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
|
||
ROOT_URLCONF = 'example.urls' | ||
|
@@ -114,20 +99,16 @@ | |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | ||
# Always use forward slashes, even on Windows. | ||
# Don't forget to use absolute paths, not relative paths. | ||
os.path.join(PROJECT_PATH, 'templates'), | ||
os.path.join(BASE_DIR, 'templates'), | ||
) | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.sites', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
# Uncomment the next line to enable the admin: | ||
'django.contrib.admin', | ||
# Uncomment the next line to enable admin documentation: | ||
# 'django.contrib.admindocs', | ||
'allaccess', | ||
) | ||
|
||
|
@@ -186,33 +167,3 @@ | |
'django.core.context_processors.static', | ||
'allaccess.context_processors.available_providers', | ||
) | ||
|
||
|
||
ENV_FILE = '/home/dotcloud/environment.json' | ||
|
||
if os.path.exists(ENV_FILE): | ||
# We are on Dotcloud | ||
with open('/home/dotcloud/environment.json') as f: | ||
env = json.load(f) | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': 'allaccess-demo', | ||
'USER': env['DOTCLOUD_DB_SQL_LOGIN'], | ||
'PASSWORD': env['DOTCLOUD_DB_SQL_PASSWORD'], | ||
'HOST': env['DOTCLOUD_DB_SQL_HOST'], | ||
'PORT': int(env['DOTCLOUD_DB_SQL_PORT']), | ||
} | ||
} | ||
|
||
MEDIA_ROOT = '/home/dotcloud/data/media/' | ||
|
||
STATIC_ROOT = '/home/dotcloud/volatile/static/' | ||
|
||
DEBUG = False | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
SECRET_KEY = env['SECRET_KEY'] | ||
|
||
ALLOWED_HOSTS = ['allaccess-mlavin.dotcloud.com', ] |