Reverted to default (sqlite) settings so all working.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""
|
||||
Django settings for testproject project.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.6/topics/settings/
|
||||
|
||||
@@ -6,38 +8,33 @@ For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/1.6/ref/settings/
|
||||
"""
|
||||
|
||||
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
|
||||
ugettext = lambda s: s
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
import sys
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
SITE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
BASE_DIR = '/'.join(os.path.abspath(os.path.dirname(__file__)).split('/')[0:-3]) # up from mayan/settings/include
|
||||
SITE_ROOT = BASE_DIR # for compatibility
|
||||
|
||||
_apps_path = os.path.join(BASE_DIR, 'mayan/apps')
|
||||
if _apps_path not in sys.path:
|
||||
sys.path.append(_apps_path)
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static_collected/')
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'om^a(i8^6&h+umbd2%pt91cj!qu_@oztw117rgxmn(n2lp^*c!'
|
||||
|
||||
try:
|
||||
from .secrets import *
|
||||
except ImportError:
|
||||
raise ImproperlyConfigured('You need a secrets.py file - contact aaron.dennis@crossculturalconsult.com')
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
TEMPLATE_DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = (
|
||||
#Django
|
||||
#Django
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
@@ -47,16 +44,16 @@ INSTALLED_APPS = (
|
||||
'django.contrib.admindocs',
|
||||
'django.contrib.comments',
|
||||
'django.contrib.staticfiles',
|
||||
# 3rd party
|
||||
# South
|
||||
# 3rd party
|
||||
# South
|
||||
'south',
|
||||
# Others
|
||||
# Others
|
||||
'filetransfers',
|
||||
'taggit',
|
||||
'mptt',
|
||||
'compressor',
|
||||
'rest_framework',
|
||||
# Base generic
|
||||
# Base generic
|
||||
'permissions',
|
||||
'project_setup',
|
||||
'project_tools',
|
||||
@@ -64,8 +61,8 @@ INSTALLED_APPS = (
|
||||
'navigation',
|
||||
'lock_manager',
|
||||
'web_theme',
|
||||
# pagination needs to go after web_theme so that the pagination template
|
||||
# if found
|
||||
# pagination needs to go after web_theme so that the pagination template
|
||||
# if found
|
||||
'pagination',
|
||||
'common',
|
||||
'django_gpg',
|
||||
@@ -77,7 +74,7 @@ INSTALLED_APPS = (
|
||||
'scheduler',
|
||||
'job_processor',
|
||||
'installation',
|
||||
# Mayan EDMS
|
||||
# Mayan EDMS
|
||||
'storage',
|
||||
'app_registry',
|
||||
'folders',
|
||||
@@ -98,8 +95,9 @@ INSTALLED_APPS = (
|
||||
'checkouts',
|
||||
'bootstrap',
|
||||
'registration',
|
||||
# Has to be last so the other apps can register it's signals
|
||||
'signaler')
|
||||
# Has to be last so the other apps can register it's signals
|
||||
'signaler',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
@@ -112,13 +110,22 @@ MIDDLEWARE_CLASSES = (
|
||||
'common.middleware.strip_spaces_widdleware.SpacelessMiddleware',
|
||||
'common.middleware.login_required_middleware.LoginRequiredMiddleware',
|
||||
'permissions.middleware.permission_denied_middleware.PermissionDeniedMiddleware',
|
||||
'pagination.middleware.PaginationMiddleware')
|
||||
'pagination.middleware.PaginationMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'mayan.urls'
|
||||
|
||||
WSGI_APPLICATION = 'mayan.wsgi.application'
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(SITE_ROOT, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
||||
@@ -137,10 +144,18 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.6/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# Custom settings section
|
||||
|
||||
import sys
|
||||
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
|
||||
PROJECT_TITLE = 'Mayan CCCS Review'
|
||||
sys.path.append(os.path.join(BASE_DIR, 'apps'))
|
||||
|
||||
PROJECT_TITLE = 'Mayan EDMS'
|
||||
PROJECT_NAME = 'mayan'
|
||||
|
||||
LANGUAGES = (
|
||||
('ar', ugettext('Arabic')),
|
||||
@@ -169,6 +184,9 @@ LANGUAGES = (
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
STATIC_ROOT = os.path.join(SITE_ROOT, 'static/')
|
||||
|
||||
STATIC_URL = '/%s-static/' % PROJECT_NAME
|
||||
|
||||
ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'
|
||||
|
||||
@@ -218,7 +236,7 @@ LOGIN_EXEMPT_URLS = (
|
||||
r'^favicon\.ico$',
|
||||
r'^about\.html$',
|
||||
r'^legal/', # allow the entire /legal/* subsection
|
||||
r'^static/',
|
||||
r'^%s-static/' % PROJECT_NAME,
|
||||
|
||||
r'^accounts/register/$',
|
||||
r'^accounts/register/complete/$',
|
||||
@@ -250,3 +268,42 @@ REST_FRAMEWORK = {
|
||||
'PAGINATE_BY_PARAM': 'page_size',
|
||||
'MAX_PAGINATE_BY': 100,
|
||||
}
|
||||
|
||||
try:
|
||||
from settings_local import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
if DEBUG:
|
||||
INTERNAL_IPS = ('127.0.0.1',)
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
try:
|
||||
import rosetta
|
||||
INSTALLED_APPS += ('rosetta',)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import django_extensions
|
||||
INSTALLED_APPS += ('django_extensions',)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import debug_toolbar
|
||||
#INSTALLED_APPS +=('debug_toolbar',)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
||||
|
||||
WSGI_AUTO_RELOAD = True
|
||||
if 'debug_toolbar' in INSTALLED_APPS:
|
||||
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'INTERCEPT_REDIRECTS': False,
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
__author__ = 'paul'
|
||||
@@ -1,30 +0,0 @@
|
||||
from mayan.settings.includes.common import *
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
INTERNAL_IPS = ('127.0.0.1',)
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'mayan',
|
||||
'USER': 'mayan',
|
||||
'PASSWORD': DBPASSWORD,
|
||||
'HOST': '',
|
||||
'PORT': ''}}
|
||||
|
||||
INSTALLED_APPS = INSTALLED_APPS + (
|
||||
'rosetta',
|
||||
'django_extensions',
|
||||
'debug_toolbar')
|
||||
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader')
|
||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
||||
WSGI_AUTO_RELOAD = True
|
||||
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
|
||||
1
mayan/settings/includes/.gitignore
vendored
1
mayan/settings/includes/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
secrets.py
|
||||
@@ -1 +0,0 @@
|
||||
__author__ = 'paul'
|
||||
@@ -1,3 +0,0 @@
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'not so secret so change me'
|
||||
DBPASSWORD = 'my db user password'
|
||||
@@ -1,15 +0,0 @@
|
||||
from mayan.settings.includes.common import *
|
||||
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ALLOWED_HOSTS = ['.crossculturalconsult.com']
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'mayan',
|
||||
'USER': 'mayan',
|
||||
'PASSWORD': DBPASSWORD,
|
||||
'HOST': '',
|
||||
'PORT': ''}}
|
||||
Reference in New Issue
Block a user