Mise à jour de 'Reskreen/settings.py'
This commit is contained in:
@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.0/ref/settings/
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
from Reskreen.server_config import *
|
from Reskreen.server_config import *
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
@@ -27,7 +28,6 @@ SECRET_KEY = 'django-insecure-j4jd&+4j^t_=@zr(#q@n!8e*58vkql6&_6w-t14ju8pw%ei%^s
|
|||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["rh.ambulance-clerc.ch"]
|
ALLOWED_HOSTS = ["rh.ambulance-clerc.ch"]
|
||||||
if cfg_dev_mode:
|
if cfg_dev_mode:
|
||||||
ALLOWED_HOSTS.append("127.0.0.1")
|
ALLOWED_HOSTS.append("127.0.0.1")
|
||||||
@@ -37,6 +37,7 @@ CSRF_TRUSTED_ORIGINS = ['https://rh.ambulance-clerc.ch']
|
|||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
'jazzmin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
@@ -49,12 +50,56 @@ INSTALLED_APPS = [
|
|||||||
'custom_admin.apps.CustomAdminConfig',
|
'custom_admin.apps.CustomAdminConfig',
|
||||||
'rangefilter',
|
'rangefilter',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
#'carnet_rouge.apps.CarnetRougeConfig',
|
'carnet_rouge.apps.CarnetRougeConfig',
|
||||||
'nextcloud.apps.NextcloudConfig'
|
#'nextcloud.apps.NextcloudConfig',
|
||||||
|
'django_quill',
|
||||||
|
'django_summernote',
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
|
||||||
|
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||||
|
|
||||||
|
MAX_IMAGE_PIXELS = int(1024 * 1024 * 1024 // 4 // 3)
|
||||||
|
SUMMERNOTE_THEME = 'bs4'
|
||||||
|
SUMMERNOTE_CONFIG = {
|
||||||
|
# Using SummernoteWidget - iframe mode, default
|
||||||
|
'iframe': True,
|
||||||
|
'attachment_filesize_limit': 2621440 ,
|
||||||
|
|
||||||
|
|
||||||
|
'summernote': {
|
||||||
|
# As an example, using Summernote Air-mode
|
||||||
|
'airMode': False,
|
||||||
|
|
||||||
|
|
||||||
|
# Change editor size
|
||||||
|
'width': '100%',
|
||||||
|
'height': '480',
|
||||||
|
|
||||||
|
# Use proper language setting automatically (default)
|
||||||
|
'lang': "fr-FR",
|
||||||
|
|
||||||
|
# Toolbar customization
|
||||||
|
# https://summernote.org/deep-dive/#custom-toolbar-popover
|
||||||
|
'toolbar': [
|
||||||
|
['view', ['undo','redo','fullscreen', 'codeview', 'help']],
|
||||||
|
['fontfamily',['fontsize']],
|
||||||
|
['font', ['bold', 'italic', 'underline', 'superscript', 'subscript', 'clear']],
|
||||||
|
['color', ['forecolor','backcolor']],
|
||||||
|
['para', ['ul', 'ol', 'paragraph']],
|
||||||
|
['table', ['table']],
|
||||||
|
['insert', ['link', 'picture', 'video', 'hr']],
|
||||||
|
['style', ['style']],
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DATA_UPLOAD_MAX_NUMBER_FIELDS = 2500
|
||||||
|
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
@@ -164,16 +209,16 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|||||||
|
|
||||||
JAZZMIN_SETTINGS = {
|
JAZZMIN_SETTINGS = {
|
||||||
# title of the window (Will default to current_admin_site.site_title if absent or None)
|
# title of the window (Will default to current_admin_site.site_title if absent or None)
|
||||||
"site_title": "Reskreen-Admin",
|
"site_title": "ClercNet-Admin",
|
||||||
|
|
||||||
# Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
# Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
||||||
"site_header": "Reskreen",
|
"site_header": "ClercNet",
|
||||||
|
|
||||||
# Title on the brand (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
# Title on the brand (19 chars max) (defaults to current_admin_site.site_header if absent or None)
|
||||||
"site_brand": "Reskreen",
|
"site_brand": "ClercNet",
|
||||||
|
|
||||||
# Logo to use for your site, must be present in static files, used for brand on top left
|
# Logo to use for your site, must be present in static files, used for brand on top left
|
||||||
"site_logo": "books/img/logo.png",
|
"site_logo": "img/logo.png",
|
||||||
|
|
||||||
# CSS classes that are applied to the logo above
|
# CSS classes that are applied to the logo above
|
||||||
"site_logo_classes": "img-circle",
|
"site_logo_classes": "img-circle",
|
||||||
@@ -182,10 +227,10 @@ JAZZMIN_SETTINGS = {
|
|||||||
"site_icon": None,
|
"site_icon": None,
|
||||||
|
|
||||||
# Welcome text on the login screen
|
# Welcome text on the login screen
|
||||||
"welcome_sign": "Welcome to the Reskreen admin",
|
"welcome_sign": "Welcome to the ClercNet admin",
|
||||||
|
|
||||||
# Copyright on the footer
|
# Copyright on the footer
|
||||||
"copyright": "Resk-U",
|
"copyright": "Ambulance Clerc & Resk-U",
|
||||||
|
|
||||||
# The model admin to search from the search bar, search bar omitted if excluded
|
# The model admin to search from the search bar, search bar omitted if excluded
|
||||||
"search_model": "auth.User",
|
"search_model": "auth.User",
|
||||||
@@ -210,7 +255,7 @@ JAZZMIN_SETTINGS = {
|
|||||||
{"model": "auth.User"},
|
{"model": "auth.User"},
|
||||||
|
|
||||||
# App with dropdown menu to all its models pages (Permissions checked against models)
|
# App with dropdown menu to all its models pages (Permissions checked against models)
|
||||||
{"app": "polls"},
|
{"app": "carnet_rouge"},
|
||||||
],
|
],
|
||||||
|
|
||||||
#############
|
#############
|
||||||
@@ -294,9 +339,10 @@ JAZZMIN_SETTINGS = {
|
|||||||
"language_chooser": False,
|
"language_chooser": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if cfg_dev_mode:
|
if cfg_dev_mode:
|
||||||
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
|
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
|
||||||
else:
|
else:
|
||||||
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
|
NEXTCLOUD_HOST = "cloud.ambulance-clerc.ch"
|
||||||
NEXTCLOUD_USER_DEFAULT_PASSWORD = "Mc144*1870"
|
NEXTCLOUD_USER_DEFAULT_PASSWORD = "Mc144*1870"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user