Improve the settings method, allow for execution of mayan-edms.py without an existing local.py file
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .base import *
|
||||
try:
|
||||
from .local import * # NOQA
|
||||
except ImportError:
|
||||
from .base import * # NOQA
|
||||
|
||||
@@ -34,7 +34,7 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = (
|
||||
#Django
|
||||
# Django
|
||||
'django.contrib.admin',
|
||||
'django.contrib.admindocs',
|
||||
'django.contrib.auth',
|
||||
@@ -204,7 +204,8 @@ STATICFILES_FINDERS = (
|
||||
|
||||
# --------- Django compressor -------------
|
||||
COMPRESS_PARSER = 'compressor.parser.HtmlParser'
|
||||
COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.CSSMinFilter']
|
||||
COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter',
|
||||
'compressor.filters.cssmin.CSSMinFilter']
|
||||
COMPRESS_ENABLED = False
|
||||
# ---------- Django sendfile --------------
|
||||
SENDFILE_BACKEND = 'sendfile.backends.simple'
|
||||
@@ -261,5 +262,5 @@ REST_FRAMEWORK = {
|
||||
CELERY_TIMEZONE = 'UTC'
|
||||
CELERY_ENABLE_UTC = True
|
||||
CELERY_ALWAYS_EAGER = True
|
||||
#------------ CORS ------------
|
||||
# ------------ CORS ------------
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .base import *
|
||||
from . import * # NOQA
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
@@ -19,7 +19,8 @@ INSTALLED_APPS += (
|
||||
'django_extensions',
|
||||
)
|
||||
|
||||
# Stop debug toolbar patching! (see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524)
|
||||
# Stop debug toolbar patching!
|
||||
# see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524
|
||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
||||
|
||||
WSGI_AUTO_RELOAD = True
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .base import *
|
||||
from . import * # NOQA
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
@@ -20,7 +20,8 @@ INSTALLED_APPS += (
|
||||
'debug_toolbar'
|
||||
)
|
||||
|
||||
# Stop debug toolbar patching! (see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524)
|
||||
# Stop debug toolbar patching!
|
||||
# see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524
|
||||
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
from __future__ import absolute_import
|
||||
from .local import *
|
||||
|
||||
from . import * # NOQA
|
||||
|
||||
DEBUG = False
|
||||
ALLOWED_HOSTS = ['*'] # Update this accordingly; https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||
|
||||
# Update this accordingly;
|
||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
Reference in New Issue
Block a user