|
|
|
|
@@ -1,36 +1,38 @@
|
|
|
|
|
"""
|
|
|
|
|
Django settings for Mayan EDMS project.
|
|
|
|
|
Django settings for mayan10 project.
|
|
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 1.10.4.
|
|
|
|
|
|
|
|
|
|
For more information on this file, see
|
|
|
|
|
https://docs.djangoproject.com/en/1.6/topics/settings/
|
|
|
|
|
https://docs.djangoproject.com/en/1.10/topics/settings/
|
|
|
|
|
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
|
https://docs.djangoproject.com/en/1.6/ref/settings/
|
|
|
|
|
https://docs.djangoproject.com/en/1.10/ref/settings/
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
|
|
|
_file_path = os.path.abspath(os.path.dirname(__file__)).split('/')
|
|
|
|
|
import mayan
|
|
|
|
|
|
|
|
|
|
BASE_DIR = '/'.join(_file_path[0:-2])
|
|
|
|
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
|
|
|
|
|
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'mayan', 'media')
|
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
|
|
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
|
|
|
|
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: keep the secret key used in production secret!
|
|
|
|
|
SECRET_KEY = 'secret_key_missing'
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
|
DEBUG = True
|
|
|
|
|
DEBUG = False
|
|
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
ALLOWED_HOSTS = ['*']
|
|
|
|
|
|
|
|
|
|
# Application definition
|
|
|
|
|
|
|
|
|
|
@@ -55,7 +57,6 @@ INSTALLED_APPS = (
|
|
|
|
|
'compressor',
|
|
|
|
|
'corsheaders',
|
|
|
|
|
'djcelery',
|
|
|
|
|
'filetransfers',
|
|
|
|
|
'formtools',
|
|
|
|
|
'mptt',
|
|
|
|
|
'pure_pagination',
|
|
|
|
|
@@ -86,7 +87,6 @@ INSTALLED_APPS = (
|
|
|
|
|
'documents',
|
|
|
|
|
'events',
|
|
|
|
|
'folders',
|
|
|
|
|
'installation',
|
|
|
|
|
'linking',
|
|
|
|
|
'mailer',
|
|
|
|
|
'metadata',
|
|
|
|
|
@@ -103,6 +103,7 @@ INSTALLED_APPS = (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
|
'corsheaders.middleware.CorsMiddleware',
|
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
|
@@ -118,10 +119,32 @@ MIDDLEWARE_CLASSES = (
|
|
|
|
|
|
|
|
|
|
ROOT_URLCONF = 'mayan.urls'
|
|
|
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
|
{
|
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
|
'DIRS': [],
|
|
|
|
|
'OPTIONS': {
|
|
|
|
|
'context_processors': [
|
|
|
|
|
'django.template.context_processors.debug',
|
|
|
|
|
'django.template.context_processors.i18n',
|
|
|
|
|
'django.template.context_processors.request',
|
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
|
],
|
|
|
|
|
'loaders': [
|
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
|
'django.template.loaders.app_directories.Loader'
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
WSGI_APPLICATION = 'mayan.wsgi.application'
|
|
|
|
|
|
|
|
|
|
# Database
|
|
|
|
|
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
|
|
|
|
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
|
|
|
|
|
|
|
|
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
|
'default': {
|
|
|
|
|
@@ -130,8 +153,26 @@ DATABASES = {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Password validation
|
|
|
|
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
|
|
|
|
|
|
|
|
|
|
AUTH_PASSWORD_VALIDATORS = [
|
|
|
|
|
{
|
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
|
# https://docs.djangoproject.com/en/1.6/topics/i18n/
|
|
|
|
|
# https://docs.djangoproject.com/en/1.10/topics/i18n/
|
|
|
|
|
|
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
|
|
|
@@ -143,15 +184,17 @@ USE_L10N = True
|
|
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
|
|
# https://docs.djangoproject.com/en/1.10/howto/static-files/
|
|
|
|
|
|
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
|
|
|
|
|
# ------------ Custom settings section ----------
|
|
|
|
|
|
|
|
|
|
TEMPLATE_DEBUG = True
|
|
|
|
|
PROJECT_TITLE = 'Mayan EDMS'
|
|
|
|
|
PROJECT_NAME = 'mayan'
|
|
|
|
|
PROJECT_TITLE = mayan.__title__
|
|
|
|
|
PROJECT_WEBSITE = 'http://www.mayan-edms.com'
|
|
|
|
|
PROJECT_COPYRIGHT = mayan.__copyright__
|
|
|
|
|
PROJECT_LICENSE = mayan.__license__
|
|
|
|
|
|
|
|
|
|
LANGUAGES = (
|
|
|
|
|
('ar', _('Arabic')),
|
|
|
|
|
@@ -181,24 +224,10 @@ LANGUAGES = (
|
|
|
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
|
|
|
|
|
sys.path.append(os.path.join(BASE_DIR, 'mayan', 'apps'))
|
|
|
|
|
sys.path.append(os.path.join(BASE_DIR, 'apps'))
|
|
|
|
|
|
|
|
|
|
STATIC_ROOT = os.path.join(MEDIA_ROOT, 'static')
|
|
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
|
|
|
|
'django.contrib.auth.context_processors.auth',
|
|
|
|
|
'django.core.context_processors.debug',
|
|
|
|
|
'django.core.context_processors.i18n',
|
|
|
|
|
'django.core.context_processors.request',
|
|
|
|
|
'django.contrib.messages.context_processors.messages',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
STATICFILES_FINDERS = (
|
|
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
|
|
|
|
|