2017-09-10 14:53:02 +00:00
|
|
|
# -*- mode: python; coding: utf-8 -*-
|
2017-01-15 23:01:18 +00:00
|
|
|
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
|
|
|
# se veut agnostique au réseau considéré, de manière à être installable en
|
|
|
|
# quelques clics.
|
|
|
|
#
|
|
|
|
# Copyright © 2017 Gabriel Détraz
|
|
|
|
# Copyright © 2017 Goulven Kermarec
|
|
|
|
# Copyright © 2017 Augustin Lemesle
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License along
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
2016-07-04 23:15:51 +00:00
|
|
|
"""
|
|
|
|
Django settings for re2o project.
|
|
|
|
|
|
|
|
Generated by 'django-admin startproject' using Django 1.8.13.
|
|
|
|
|
|
|
|
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, ...)
|
|
|
|
import os
|
2017-06-17 19:26:18 +00:00
|
|
|
from .settings_local import *
|
2016-07-04 23:15:51 +00:00
|
|
|
|
|
|
|
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.8/howto/deployment/checklist/
|
|
|
|
|
2016-07-06 21:03:13 +00:00
|
|
|
# Auth definition
|
|
|
|
|
|
|
|
PASSWORD_HASHERS = (
|
|
|
|
're2o.login.SSHAPasswordHasher',
|
|
|
|
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
|
|
|
|
)
|
|
|
|
|
2016-07-08 01:12:28 +00:00
|
|
|
AUTH_USER_MODEL = 'users.User'
|
2016-12-14 02:48:50 +00:00
|
|
|
LOGIN_URL = '/login/'
|
2016-07-08 18:11:53 +00:00
|
|
|
LOGIN_REDIRECT_URL = '/'
|
2016-07-08 01:12:28 +00:00
|
|
|
|
2016-07-06 21:03:13 +00:00
|
|
|
|
2016-07-04 23:15:51 +00:00
|
|
|
# Application definition
|
|
|
|
|
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.admin',
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
'bootstrap3',
|
|
|
|
'users',
|
|
|
|
'machines',
|
|
|
|
'cotisations',
|
|
|
|
'topologie',
|
|
|
|
'search',
|
2016-07-19 01:12:48 +00:00
|
|
|
're2o',
|
2017-06-25 22:50:55 +00:00
|
|
|
'preferences',
|
2016-07-04 23:15:51 +00:00
|
|
|
'logs',
|
2016-07-21 14:58:59 +00:00
|
|
|
'rest_framework',
|
|
|
|
'reversion'
|
2016-12-27 17:41:46 +00:00
|
|
|
) + OPTIONNAL_APPS
|
2016-07-04 23:15:51 +00:00
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
|
|
'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.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
'django.middleware.security.SecurityMiddleware',
|
|
|
|
)
|
|
|
|
|
|
|
|
ROOT_URLCONF = 're2o.urls'
|
|
|
|
|
|
|
|
TEMPLATES = [
|
|
|
|
{
|
|
|
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
|
|
'DIRS': [
|
|
|
|
os.path.join(BASE_DIR, 'templates').replace('\\', '/'),
|
|
|
|
],
|
|
|
|
'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',
|
2016-12-12 12:32:18 +00:00
|
|
|
'django.template.context_processors.request',
|
2016-07-10 02:02:48 +00:00
|
|
|
're2o.context_processors.context_user',
|
2016-07-04 23:15:51 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
WSGI_APPLICATION = 're2o.wsgi.application'
|
|
|
|
|
|
|
|
|
|
|
|
# Internationalization
|
|
|
|
# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
|
|
|
|
2016-07-05 14:30:46 +00:00
|
|
|
LANGUAGE_CODE = 'fr-fr'
|
2016-07-04 23:15:51 +00:00
|
|
|
|
2016-07-05 14:30:46 +00:00
|
|
|
TIME_ZONE = 'Europe/Paris'
|
2016-07-04 23:15:51 +00:00
|
|
|
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
2016-07-25 21:54:40 +00:00
|
|
|
DATABASE_ROUTERS = ['ldapdb.router.Router']
|
|
|
|
|
2016-07-04 23:15:51 +00:00
|
|
|
|
|
|
|
# django-bootstrap3 config dictionnary
|
|
|
|
BOOTSTRAP3 = {
|
|
|
|
'jquery_url': '/static/js/jquery-2.2.4.min.js',
|
|
|
|
'base_url': '/static/bootstrap/',
|
|
|
|
'include_jquery': True,
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOTSTRAP_BASE_URL = '/static/bootstrap/'
|
|
|
|
|
|
|
|
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.
|
|
|
|
os.path.join(
|
|
|
|
BASE_DIR,
|
|
|
|
'static',
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
MEDIA_ROOT = '/var/www/re2o/static'
|
|
|
|
|
2016-07-04 23:15:51 +00:00
|
|
|
STATIC_URL = '/static/'
|
2016-07-08 15:54:06 +00:00
|
|
|
|
2016-07-08 17:29:25 +00:00
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
|
2016-07-10 14:39:21 +00:00
|
|
|
|
|
|
|
RIGHTS_LINK = {
|
2016-07-27 00:39:19 +00:00
|
|
|
'cableur' : ['bureau','infra','bofh','trésorier'],
|
2016-07-10 14:39:21 +00:00
|
|
|
'bofh' : ['bureau','trésorier'],
|
|
|
|
}
|
|
|
|
|
2016-12-27 17:41:46 +00:00
|
|
|
GRAPH_MODELS = {
|
|
|
|
'all_applications': True,
|
|
|
|
'group_models': True,
|
|
|
|
}
|