mirror of
https://github.com/eldarion/eldarion-ajax-demo.git
synced 2026-01-07 21:23:54 -05:00
Add gondor
This commit is contained in:
122
demo/settings.py
122
demo/settings.py
@@ -1,91 +1,70 @@
|
||||
import os
|
||||
import urlparse
|
||||
|
||||
|
||||
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
DEBUG = True
|
||||
DEBUG = bool(int(os.environ.get("DEBUG", 1)))
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = [
|
||||
# ("Your Name", "your_email@example.com"),
|
||||
("Patrick Altman", "paltman@eldarion.com"),
|
||||
]
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": "dev.db",
|
||||
if "GONDOR_DATABASE_URL" in os.environ:
|
||||
urlparse.uses_netloc.append("postgres")
|
||||
url = urlparse.urlparse(os.environ["GONDOR_DATABASE_URL"])
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": {
|
||||
"postgres": "django.db.backends.postgresql_psycopg2"
|
||||
}[url.scheme],
|
||||
"NAME": url.path[1:],
|
||||
"USER": url.username,
|
||||
"PASSWORD": url.password,
|
||||
"HOST": url.hostname,
|
||||
"PORT": url.port
|
||||
}
|
||||
}
|
||||
else:
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||
"NAME": "demo",
|
||||
"HOST": "127.0.0.1",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
# although not all choices may be available on all operating systems.
|
||||
# On Unix systems, a value of None will cause Django to use the same
|
||||
# timezone as the operating system.
|
||||
# If running in a Windows environment this must be set to the same as your
|
||||
# system time zone.
|
||||
TIME_ZONE = "UTC"
|
||||
|
||||
# Language code for this installation. All choices can be found here:
|
||||
# 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
|
||||
|
||||
# If you set this to False, Django will not format dates, numbers and
|
||||
# calendars according to the current locale.
|
||||
USE_L10N = True
|
||||
|
||||
# If you set this to False, Django will not use timezone-aware datetimes.
|
||||
SITE_ID = os.environ.get("SITE_ID", 1)
|
||||
USE_I18N = False
|
||||
USE_L10N = False
|
||||
USE_TZ = True
|
||||
|
||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||
# Example: "/home/media/media.lawrence.com/media/"
|
||||
MEDIA_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "media")
|
||||
|
||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
||||
# trailing slash.
|
||||
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
|
||||
MEDIA_ROOT = os.path.join(
|
||||
os.environ.get("GONDOR_DATA_DIR", PACKAGE_ROOT),
|
||||
"site_media",
|
||||
"media"
|
||||
)
|
||||
STATIC_ROOT = os.path.join(
|
||||
os.environ.get("GONDOR_DATA_DIR", PACKAGE_ROOT),
|
||||
"site_media",
|
||||
"static"
|
||||
)
|
||||
MEDIA_URL = "/site_media/media/"
|
||||
|
||||
# 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(PACKAGE_ROOT, "site_media", "static")
|
||||
|
||||
# URL prefix for static files.
|
||||
# Example: "http://media.lawrence.com/static/"
|
||||
STATIC_URL = "/site_media/static/"
|
||||
|
||||
# Additional locations of static files
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(PACKAGE_ROOT, "static"),
|
||||
]
|
||||
|
||||
# List of finder classes that know how to find static files in
|
||||
# various locations.
|
||||
STATICFILES_FINDERS = [
|
||||
"django.contrib.staticfiles.finders.FileSystemFinder",
|
||||
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
||||
]
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = "pimlfza8csdl)d*a#u9sr%@!_72b=ek8zhyuni^x)4i@t1yvpw"
|
||||
|
||||
# List of callables that know how to import templates from various sources.
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY", "")
|
||||
TEMPLATE_LOADERS = [
|
||||
"django.template.loaders.filesystem.Loader",
|
||||
"django.template.loaders.app_directories.Loader",
|
||||
]
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = [
|
||||
"django.contrib.auth.context_processors.auth",
|
||||
"django.core.context_processors.debug",
|
||||
@@ -98,8 +77,6 @@ TEMPLATE_CONTEXT_PROCESSORS = [
|
||||
"pinax_utils.context_processors.settings",
|
||||
"account.context_processors.account",
|
||||
]
|
||||
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
@@ -107,16 +84,11 @@ MIDDLEWARE_CLASSES = [
|
||||
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
]
|
||||
|
||||
ROOT_URLCONF = "demo.urls"
|
||||
|
||||
# Python dotted path to the WSGI application used by Django's runserver.
|
||||
WSGI_APPLICATION = "demo.wsgi.application"
|
||||
|
||||
TEMPLATE_DIRS = [
|
||||
os.path.join(PACKAGE_ROOT, "templates"),
|
||||
]
|
||||
|
||||
INSTALLED_APPS = [
|
||||
"django.contrib.admin",
|
||||
"django.contrib.auth",
|
||||
@@ -138,12 +110,6 @@ INSTALLED_APPS = [
|
||||
# project
|
||||
"demo"
|
||||
]
|
||||
|
||||
# A sample logging configuration. The only tangible logging
|
||||
# performed by this configuration is to send an email to
|
||||
# the site admins on every HTTP 500 error when DEBUG=False.
|
||||
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
||||
# more details on how to customize your logging configuration.
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
@@ -167,13 +133,15 @@ LOGGING = {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
FIXTURE_DIRS = [
|
||||
os.path.join(PROJECT_ROOT, "fixtures"),
|
||||
]
|
||||
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
EMAIL_BACKEND = os.environ.get("EMAIL_BACKEND", "django.core.mail.backends.console.EmailBackend")
|
||||
EMAIL_HOST = os.environ.get("EMAIL_HOST", "smtp.sendgrid.net")
|
||||
EMAIL_PORT = os.environ.get("EMAIL_PORT", 587)
|
||||
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER", "")
|
||||
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD", "")
|
||||
EMAIL_USE_TLS = True
|
||||
ACCOUNT_OPEN_SIGNUP = False
|
||||
ACCOUNT_USE_OPENID = False
|
||||
ACCOUNT_REQUIRED_EMAIL = False
|
||||
|
||||
14
gondor.yml
Normal file
14
gondor.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
key: FOHSH30AS0N
|
||||
vcs: git
|
||||
framework: django
|
||||
django:
|
||||
managepy: manage.py
|
||||
requirements_file: requirements.txt
|
||||
on_deploy:
|
||||
- manage.py syncdb --noinput
|
||||
- manage.py collectstatic --noinput
|
||||
static_urls:
|
||||
- /site_media:
|
||||
root: site_media/
|
||||
wsgi:
|
||||
entry_point: demo.wsgi:application
|
||||
@@ -8,3 +8,7 @@ django-user-accounts==1.0b3
|
||||
django-forms-bootstrap==2.0.3.post1
|
||||
metron==1.0
|
||||
pinax-utils==1.0b1.dev3
|
||||
|
||||
gondor==1.1.5
|
||||
psycopg2==2.4.5
|
||||
gunicorn==0.14.5
|
||||
|
||||
Reference in New Issue
Block a user