# coding=utf-8
"""
Django settings for ace_office project.

Generated by 'django-admin startproject' using Django 1.8.7.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from config.conf_core import *
from os import environ
import os
import os.path

DATABASES = {
	'default': {
		'ENGINE': "django.db.backends.%s" % DB_ENGINE,
		'NAME': DB_NAME,
		'USER': DB_USERNAME,
		'PASSWORD': DB_PASSWORD,
		'HOST': DB_HOST,
		'PORT': DB_PORT,
	}
}

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Setting_ParentDir = os.path.dirname(os.path.abspath(__file__))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '74c=_w-u(pid!8c-mj)v1izwuwufx8qr60f1z%z)auk-0)@fef'

# SECURITY WARNING: don't run with debug turned on in production!
if eval(SET_DEBUG):
	DEBUG = True
else:
	DEBUG = False

ALLOWED_HOSTS = ['*']

# Application definition

INSTALLED_APPS = (
	'django.contrib.admin',
	'django.contrib.auth',
	'django.contrib.contenttypes',
	'django.contrib.sessions',
	'django.contrib.messages',
	'django.contrib.staticfiles',
	'django_forms_bootstrap',
	'modules.admin_account',  # 用户权限
	'modules.home_page',  # 我的主页
	'modules.mysite',  # 我的地盘
	'modules.organizational_structure',  # 组织架构
	'modules.organizational_structure.departments',  # 部门信息
	'modules.organizational_structure.profiles',  # 管理员信息
	'modules.organizational_structure.structures',  # 组织结构图
	'modules.project_manage',  # 项目管理
	'modules.employee_management.employee_info',  # 员工信息
	'modules.employee_management.archives_info',  # 员工档案信息
	'modules.social_security',  # 社保福利
	'modules.social_security.increase_info',  # 社保福利增员
	'modules.social_security.reduction_info',  # 社保福利减员
	'modules.social_security.social_security_detail',  # 社保明细
	'modules.settlement_pay',  # 结算发薪
	'modules.recruitment_manage',  # 招聘管理

	'modules.approval_process',  # 审批流程
	'modules.approval_process.leave',  # 审批流程，请假
	'modules.approval_process.loan',  # 审批流程，备用金
	'modules.approval_process.write_offs',  # 审批流程，报销与销账
	'modules.approval_process.wage',  # 审批流程，工资与职位调整
	'modules.approval_process.wage_replacement',  # 审批流程，工资补发申请
	'modules.approval_process.billing_pre_pay',  # 审批流程，结算与发薪
	'modules.approval_process.demand_turnover',  # 审批流程，管理人员需求与离职
	'modules.approval_process.temporary_write_offs_billing',  # 审批流程，临时工销账与开票
	'modules.approval_process.recruited_billing',  # 审批流程，待招结算与开票

	'modules.expense_manage',  # 费用管理
	'modules.personnel_operation',  # 人事操作质量
	'modules.system',  # 系统管理
	'modules.share_module',  # 公用模块
	'modules.dict_table',  # 字典表模块
	'modules.sidebar_menu',  # 页面菜单模块
	'modules.payroll_manage.payroll_detail',  # 薪资明细
	'modules.payroll_manage.payroll_gather',  # 薪资汇总

	'modules.finance.social_security_audit',  # 财务-社保审核
	'modules.finance.arrival_and_billing',  # 财务-到账与开票
	'modules.finance.loans_and_write_offs',  # 财务-借款与销账

	'modules.contract_manage',  # 合同

	# 'modules.attendance',  # 考勤
)

MIDDLEWARE_CLASSES = (
	'django.middleware.common.BrokenLinkEmailsMiddleware',
	'django.contrib.sessions.middleware.SessionMiddleware',
	'django.middleware.common.CommonMiddleware',
	'django.middleware.csrf.CsrfViewMiddleware',
	'django.contrib.auth.middleware.AuthenticationMiddleware',
	'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
	'django.contrib.messages.middleware.MessageMiddleware',
	# 'corsheaders.middleware.CorsMiddleware',
	'django.middleware.locale.LocaleMiddleware',
	'django.middleware.clickjacking.XFrameOptionsMiddleware',
	'django.middleware.security.SecurityMiddleware',
	"modules.middleware.threadlocals.ThreadLocals",
)

ROOT_URLCONF = 'ace_office.urls'

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',
				'django.core.context_processors.static',
				'django.core.context_processors.request',
			],
		},
	},
]

WSGI_APPLICATION = 'ace_office.wsgi.application'

# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'zh-hans'

TIME_ZONE = 'Asia/Shanghai'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = ''
STATIC_PATH = os.path.join(BASE_DIR, 'static').replace('\\', '/')
# Additional locations of static files
STATICFILES_DIRS = (
	# Put strings here, like "/home/html/static" or "C:/www/django/static".
	# Always use forward slashes, even on Windows.
	# Don't forget to use absolute paths, not relative paths.
	'%s/%s' % (BASE_DIR, '/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',
	#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

LOGIN_REDIRECT_URL = "/accounts/login"

# session超时
SESSION_COOKIE_AGE = 3600  # 默认1小时超时
# 如果置为True的话，Django会在每次收到请求的时候保存session，即使没发生变化。会话cookie在每次请求的时候都会送出。
# 同时，每次会话cookie送出的时候，其 expires 参数都会更新。
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True  # true or false, 如果设置为true，那么关闭浏览器时候，cookie就会失

# 临时文件目录
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

# 缓存
# CACHE_BACKEND = memcached

# 时间格式
DATE_FORMAT = "Y-m-d"

# 系统报错发送admin邮件
ADMINS = (
	('XHL', '593548215@qq.com'),
)
MANAGERS = ADMINS
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.qq.com'
SERVER_EMAIL = "593548215@qq.com"
EMAIL_HOST_USER = '593548215@qq.com'
EMAIL_HOST_PASSWORD = 'xhl,.,.1991'
EMAIL_PORT = 25



b5e90eb7e2f65ca8955177c86a716b31bde4041a
<mask token>

<mask token>
if eval(SET_DEBUG):
    DEBUG = True
else:
    DEBUG = False
<mask token>

<mask token>
DATABASES = {'default': {'ENGINE': 'django.db.backends.%s' % DB_ENGINE,
    'NAME': DB_NAME, 'USER': DB_USERNAME, 'PASSWORD': DB_PASSWORD, 'HOST':
    DB_HOST, 'PORT': DB_PORT}}
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Setting_ParentDir = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = '74c=_w-u(pid!8c-mj)v1izwuwufx8qr60f1z%z)auk-0)@fef'
if eval(SET_DEBUG):
    DEBUG = True
else:
    DEBUG = False
ALLOWED_HOSTS = ['*']
INSTALLED_APPS = ('django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'django_forms_bootstrap', 'modules.admin_account', 'modules.home_page',
    'modules.mysite', 'modules.organizational_structure',
    'modules.organizational_structure.departments',
    'modules.organizational_structure.profiles',
    'modules.organizational_structure.structures', 'modules.project_manage',
    'modules.employee_management.employee_info',
    'modules.employee_management.archives_info', 'modules.social_security',
    'modules.social_security.increase_info',
    'modules.social_security.reduction_info',
    'modules.social_security.social_security_detail',
    'modules.settlement_pay', 'modules.recruitment_manage',
    'modules.approval_process', 'modules.approval_process.leave',
    'modules.approval_process.loan', 'modules.approval_process.write_offs',
    'modules.approval_process.wage',
    'modules.approval_process.wage_replacement',
    'modules.approval_process.billing_pre_pay',
    'modules.approval_process.demand_turnover',
    'modules.approval_process.temporary_write_offs_billing',
    'modules.approval_process.recruited_billing', 'modules.expense_manage',
    'modules.personnel_operation', 'modules.system', 'modules.share_module',
    'modules.dict_table', 'modules.sidebar_menu',
    'modules.payroll_manage.payroll_detail',
    'modules.payroll_manage.payroll_gather',
    'modules.finance.social_security_audit',
    'modules.finance.arrival_and_billing',
    'modules.finance.loans_and_write_offs', 'modules.contract_manage')
MIDDLEWARE_CLASSES = ('django.middleware.common.BrokenLinkEmailsMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'modules.middleware.threadlocals.ThreadLocals')
ROOT_URLCONF = 'ace_office.urls'
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',
    'django.core.context_processors.static',
    'django.core.context_processors.request']}}]
WSGI_APPLICATION = 'ace_office.wsgi.application'
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = ''
STATIC_PATH = os.path.join(BASE_DIR, 'static').replace('\\', '/')
STATICFILES_DIRS = '%s/%s' % (BASE_DIR, '/static'),
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder')
LOGIN_REDIRECT_URL = '/accounts/login'
SESSION_COOKIE_AGE = 3600
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
DATE_FORMAT = 'Y-m-d'
ADMINS = ('XHL', '593548215@qq.com'),
MANAGERS = ADMINS
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.qq.com'
SERVER_EMAIL = '593548215@qq.com'
EMAIL_HOST_USER = '593548215@qq.com'
EMAIL_HOST_PASSWORD = 'xhl,.,.1991'
EMAIL_PORT = 25

<mask token>
from config.conf_core import *
from os import environ
import os
import os.path
DATABASES = {'default': {'ENGINE': 'django.db.backends.%s' % DB_ENGINE,
    'NAME': DB_NAME, 'USER': DB_USERNAME, 'PASSWORD': DB_PASSWORD, 'HOST':
    DB_HOST, 'PORT': DB_PORT}}
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Setting_ParentDir = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = '74c=_w-u(pid!8c-mj)v1izwuwufx8qr60f1z%z)auk-0)@fef'
if eval(SET_DEBUG):
    DEBUG = True
else:
    DEBUG = False
ALLOWED_HOSTS = ['*']
INSTALLED_APPS = ('django.contrib.admin', 'django.contrib.auth',
    'django.contrib.contenttypes', 'django.contrib.sessions',
    'django.contrib.messages', 'django.contrib.staticfiles',
    'django_forms_bootstrap', 'modules.admin_account', 'modules.home_page',
    'modules.mysite', 'modules.organizational_structure',
    'modules.organizational_structure.departments',
    'modules.organizational_structure.profiles',
    'modules.organizational_structure.structures', 'modules.project_manage',
    'modules.employee_management.employee_info',
    'modules.employee_management.archives_info', 'modules.social_security',
    'modules.social_security.increase_info',
    'modules.social_security.reduction_info',
    'modules.social_security.social_security_detail',
    'modules.settlement_pay', 'modules.recruitment_manage',
    'modules.approval_process', 'modules.approval_process.leave',
    'modules.approval_process.loan', 'modules.approval_process.write_offs',
    'modules.approval_process.wage',
    'modules.approval_process.wage_replacement',
    'modules.approval_process.billing_pre_pay',
    'modules.approval_process.demand_turnover',
    'modules.approval_process.temporary_write_offs_billing',
    'modules.approval_process.recruited_billing', 'modules.expense_manage',
    'modules.personnel_operation', 'modules.system', 'modules.share_module',
    'modules.dict_table', 'modules.sidebar_menu',
    'modules.payroll_manage.payroll_detail',
    'modules.payroll_manage.payroll_gather',
    'modules.finance.social_security_audit',
    'modules.finance.arrival_and_billing',
    'modules.finance.loans_and_write_offs', 'modules.contract_manage')
MIDDLEWARE_CLASSES = ('django.middleware.common.BrokenLinkEmailsMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'modules.middleware.threadlocals.ThreadLocals')
ROOT_URLCONF = 'ace_office.urls'
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',
    'django.core.context_processors.static',
    'django.core.context_processors.request']}}]
WSGI_APPLICATION = 'ace_office.wsgi.application'
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = ''
STATIC_PATH = os.path.join(BASE_DIR, 'static').replace('\\', '/')
STATICFILES_DIRS = '%s/%s' % (BASE_DIR, '/static'),
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder')
LOGIN_REDIRECT_URL = '/accounts/login'
SESSION_COOKIE_AGE = 3600
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
DATE_FORMAT = 'Y-m-d'
ADMINS = ('XHL', '593548215@qq.com'),
MANAGERS = ADMINS
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.qq.com'
SERVER_EMAIL = '593548215@qq.com'
EMAIL_HOST_USER = '593548215@qq.com'
EMAIL_HOST_PASSWORD = 'xhl,.,.1991'
EMAIL_PORT = 25

# coding=utf-8
"""
Django settings for ace_office project.

Generated by 'django-admin startproject' using Django 1.8.7.

For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
from config.conf_core import *
from os import environ
import os
import os.path

DATABASES = {
	'default': {
		'ENGINE': "django.db.backends.%s" % DB_ENGINE,
		'NAME': DB_NAME,
		'USER': DB_USERNAME,
		'PASSWORD': DB_PASSWORD,
		'HOST': DB_HOST,
		'PORT': DB_PORT,
	}
}

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Setting_ParentDir = os.path.dirname(os.path.abspath(__file__))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '74c=_w-u(pid!8c-mj)v1izwuwufx8qr60f1z%z)auk-0)@fef'

# SECURITY WARNING: don't run with debug turned on in production!
if eval(SET_DEBUG):
	DEBUG = True
else:
	DEBUG = False

ALLOWED_HOSTS = ['*']

# Application definition

INSTALLED_APPS = (
	'django.contrib.admin',
	'django.contrib.auth',
	'django.contrib.contenttypes',
	'django.contrib.sessions',
	'django.contrib.messages',
	'django.contrib.staticfiles',
	'django_forms_bootstrap',
	'modules.admin_account',  # 用户权限
	'modules.home_page',  # 我的主页
	'modules.mysite',  # 我的地盘
	'modules.organizational_structure',  # 组织架构
	'modules.organizational_structure.departments',  # 部门信息
	'modules.organizational_structure.profiles',  # 管理员信息
	'modules.organizational_structure.structures',  # 组织结构图
	'modules.project_manage',  # 项目管理
	'modules.employee_management.employee_info',  # 员工信息
	'modules.employee_management.archives_info',  # 员工档案信息
	'modules.social_security',  # 社保福利
	'modules.social_security.increase_info',  # 社保福利增员
	'modules.social_security.reduction_info',  # 社保福利减员
	'modules.social_security.social_security_detail',  # 社保明细
	'modules.settlement_pay',  # 结算发薪
	'modules.recruitment_manage',  # 招聘管理

	'modules.approval_process',  # 审批流程
	'modules.approval_process.leave',  # 审批流程，请假
	'modules.approval_process.loan',  # 审批流程，备用金
	'modules.approval_process.write_offs',  # 审批流程，报销与销账
	'modules.approval_process.wage',  # 审批流程，工资与职位调整
	'modules.approval_process.wage_replacement',  # 审批流程，工资补发申请
	'modules.approval_process.billing_pre_pay',  # 审批流程，结算与发薪
	'modules.approval_process.demand_turnover',  # 审批流程，管理人员需求与离职
	'modules.approval_process.temporary_write_offs_billing',  # 审批流程，临时工销账与开票
	'modules.approval_process.recruited_billing',  # 审批流程，待招结算与开票

	'modules.expense_manage',  # 费用管理
	'modules.personnel_operation',  # 人事操作质量
	'modules.system',  # 系统管理
	'modules.share_module',  # 公用模块
	'modules.dict_table',  # 字典表模块
	'modules.sidebar_menu',  # 页面菜单模块
	'modules.payroll_manage.payroll_detail',  # 薪资明细
	'modules.payroll_manage.payroll_gather',  # 薪资汇总

	'modules.finance.social_security_audit',  # 财务-社保审核
	'modules.finance.arrival_and_billing',  # 财务-到账与开票
	'modules.finance.loans_and_write_offs',  # 财务-借款与销账

	'modules.contract_manage',  # 合同

	# 'modules.attendance',  # 考勤
)

MIDDLEWARE_CLASSES = (
	'django.middleware.common.BrokenLinkEmailsMiddleware',
	'django.contrib.sessions.middleware.SessionMiddleware',
	'django.middleware.common.CommonMiddleware',
	'django.middleware.csrf.CsrfViewMiddleware',
	'django.contrib.auth.middleware.AuthenticationMiddleware',
	'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
	'django.contrib.messages.middleware.MessageMiddleware',
	# 'corsheaders.middleware.CorsMiddleware',
	'django.middleware.locale.LocaleMiddleware',
	'django.middleware.clickjacking.XFrameOptionsMiddleware',
	'django.middleware.security.SecurityMiddleware',
	"modules.middleware.threadlocals.ThreadLocals",
)

ROOT_URLCONF = 'ace_office.urls'

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',
				'django.core.context_processors.static',
				'django.core.context_processors.request',
			],
		},
	},
]

WSGI_APPLICATION = 'ace_office.wsgi.application'

# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/

LANGUAGE_CODE = 'zh-hans'

TIME_ZONE = 'Asia/Shanghai'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = ''
STATIC_PATH = os.path.join(BASE_DIR, 'static').replace('\\', '/')
# Additional locations of static files
STATICFILES_DIRS = (
	# Put strings here, like "/home/html/static" or "C:/www/django/static".
	# Always use forward slashes, even on Windows.
	# Don't forget to use absolute paths, not relative paths.
	'%s/%s' % (BASE_DIR, '/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',
	#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

LOGIN_REDIRECT_URL = "/accounts/login"

# session超时
SESSION_COOKIE_AGE = 3600  # 默认1小时超时
# 如果置为True的话，Django会在每次收到请求的时候保存session，即使没发生变化。会话cookie在每次请求的时候都会送出。
# 同时，每次会话cookie送出的时候，其 expires 参数都会更新。
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True  # true or false, 如果设置为true，那么关闭浏览器时候，cookie就会失

# 临时文件目录
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

# 缓存
# CACHE_BACKEND = memcached

# 时间格式
DATE_FORMAT = "Y-m-d"

# 系统报错发送admin邮件
ADMINS = (
	('XHL', '593548215@qq.com'),
)
MANAGERS = ADMINS
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.qq.com'
SERVER_EMAIL = "593548215@qq.com"
EMAIL_HOST_USER = '593548215@qq.com'
EMAIL_HOST_PASSWORD = 'xhl,.,.1991'
EMAIL_PORT = 25


