| INSTALLED_APPS = ( | |
| 'db_mutex', | |
| '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', | |
| 'my_app', | |
| 'crispy_forms', | |
| ) | |
| CRISPY_TEMPLATE_PACK = 'bootstrap3' | |
| # 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, | |
| 'filters': { | |
| 'require_debug_false': { | |
| '()': 'django.utils.log.RequireDebugFalse' | |
| } | |
| }, | |
| 'handlers': { | |
| 'mail_admins': { | |
| 'level': 'ERROR', | |
| 'filters': ['require_debug_false'], | |
| 'class': 'django.utils.log.AdminEmailHandler' | |
| } | |
| }, | |
| 'loggers': { | |
| 'django.request': { | |
| 'handlers': ['mail_admins'], | |
| 'level': 'ERROR', | |
| 'propagate': True, | |
| }, | |
| } | |
| } | |
| ## | |
| LOGIN_URL = "/signin" | |
| # Parse database configuration from $DATABASE_URL | |
| import dj_database_url | |
| DATABASES = {} | |
| if not os.environ.has_key('ENVIRONMENT') or os.environ['ENVIRONMENT']=='DEVELOPMENT': | |
| DATABASES = { | |
| 'default': { | |
| 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | |
| 'NAME': 'my_proj', # Or path to database file if using sqlite3. | |
| 'USER': 'my_proj_admin', # Not used with sqlite3. | |
| 'PASSWORD': '***', # Not used with sqlite3. | |
| 'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3. | |
| 'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
| } | |
| } | |
| else: | |
| DATABASES['default'] = dj_database_url.config() | |
| # Honor the 'X-Forwarded-Proto' header for request.is_secure() | |
| SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') | |
| # Allow all host headers | |
| ALLOWED_HOSTS = ['*'] | |
| # Static asset configuration | |
| import os | |
| BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| STATIC_ROOT = 'staticfiles' | |
| STATIC_URL = '/static/' | |
| STATICFILES_DIRS = ( | |
| os.path.join(BASE_DIR, 'static'), | |
| ) | |
| TEMPLATES = [ | |
| { | |
| 'BACKEND': 'django.template.backends.django.DjangoTemplates', | |
| 'DIRS': [os.path.join(BASE_DIR, 'templates')], | |
| 'APP_DIRS': True, | |
| 'OPTIONS': { | |
| 'context_processors': [ | |
| 'django.template.context_processors.debug', | |
| 'django.template.context_processors.request', | |
| 'django.contrib.auth.context_processors.auth', | |
| 'django.contrib.messages.context_processors.messages', | |
| ], | |
| }, | |
| }, | |
| ] | |
| if not os.environ.has_key('ENVIRONMENT') or os.environ['ENVIRONMENT']=='DEVELOPMENT': | |
| from settings_local import * | |
| import sys | |
| PROJECT_ROOT = os.path.dirname(__file__) | |
| sys.path.insert(0, os.path.join(PROJECT_ROOT, "hellosign_sdk")) | |
| DJANGO_SETTINGS_MODULE=settings rqworker high default low |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment