Bump Django version to 2.2
This commit is contained in:
parent
fa2e1279c4
commit
36f3d8d6ef
2 changed files with 64 additions and 73 deletions
|
@ -12,7 +12,7 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
@ -22,7 +22,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = '_u5q4-^1qgkqg=i5o5ha*xkd@82#l$e+%m)$v+4y#t-5!g-%g2'
|
SECRET_KEY = "_u5q4-^1qgkqg=i5o5ha*xkd@82#l$e+%m)$v+4y#t-5!g-%g2"
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
@ -33,66 +33,63 @@ ALLOWED_HOSTS = []
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'django.contrib.admin',
|
"django.contrib.admin",
|
||||||
'django.contrib.auth',
|
"django.contrib.auth",
|
||||||
'django.contrib.contenttypes',
|
"django.contrib.contenttypes",
|
||||||
'django.contrib.sessions',
|
"django.contrib.sessions",
|
||||||
'django.contrib.messages',
|
"django.contrib.messages",
|
||||||
'django.contrib.staticfiles',
|
"django.contrib.staticfiles",
|
||||||
'django.contrib.sites',
|
"django.contrib.sites",
|
||||||
'django.contrib.humanize',
|
"django.contrib.humanize",
|
||||||
|
"django_nyt",
|
||||||
'django_nyt',
|
"mptt",
|
||||||
'mptt',
|
"sekizai",
|
||||||
'sekizai',
|
"sorl.thumbnail",
|
||||||
'sorl.thumbnail',
|
"widget_tweaks",
|
||||||
'widget_tweaks',
|
"shared", # Do not move, so templates in `shared` can override
|
||||||
|
# thoses in `wiki`
|
||||||
'shared', # Do not move, so templates in `shared` can override
|
"wiki",
|
||||||
# thoses in `wiki`
|
"wiki.plugins.attachments",
|
||||||
'wiki',
|
"wiki.plugins.notifications",
|
||||||
'wiki.plugins.attachments',
|
"wiki.plugins.images",
|
||||||
'wiki.plugins.notifications',
|
"wiki.plugins.macros",
|
||||||
'wiki.plugins.images',
|
"allauth_ens",
|
||||||
'wiki.plugins.macros',
|
"allauth",
|
||||||
|
"allauth.account",
|
||||||
'allauth_ens',
|
"allauth.socialaccount",
|
||||||
'allauth',
|
"allauth_ens.providers.clipper",
|
||||||
'allauth.account',
|
|
||||||
'allauth.socialaccount',
|
|
||||||
'allauth_ens.providers.clipper',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
"django.middleware.security.SecurityMiddleware",
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
'django.middleware.common.CommonMiddleware',
|
"django.middleware.common.CommonMiddleware",
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'WikiENS.urls'
|
ROOT_URLCONF = "WikiENS.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||||
'DIRS': [],
|
"DIRS": [],
|
||||||
'APP_DIRS': True,
|
"APP_DIRS": True,
|
||||||
'OPTIONS': {
|
"OPTIONS": {
|
||||||
'context_processors': [
|
"context_processors": [
|
||||||
'django.template.context_processors.debug',
|
"django.template.context_processors.debug",
|
||||||
'django.template.context_processors.request',
|
"django.template.context_processors.request",
|
||||||
'django.contrib.auth.context_processors.auth',
|
"django.contrib.auth.context_processors.auth",
|
||||||
'django.contrib.messages.context_processors.messages',
|
"django.contrib.messages.context_processors.messages",
|
||||||
"sekizai.context_processors.sekizai",
|
"sekizai.context_processors.sekizai",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = 'WikiENS.wsgi.application'
|
WSGI_APPLICATION = "WikiENS.wsgi.application"
|
||||||
|
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
|
@ -101,9 +98,9 @@ SITE_ID = 1
|
||||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
"default": {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
"ENGINE": "django.db.backends.sqlite3",
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,26 +110,20 @@ DATABASES = {
|
||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
"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',
|
|
||||||
},
|
},
|
||||||
|
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",},
|
||||||
|
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",},
|
||||||
|
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'fr-fr'
|
LANGUAGE_CODE = "fr-fr"
|
||||||
|
|
||||||
TIME_ZONE = 'Europe/Paris'
|
TIME_ZONE = "Europe/Paris"
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
|
@ -144,13 +135,13 @@ USE_TZ = True
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = "/static/"
|
||||||
|
|
||||||
|
|
||||||
# Email
|
# Email
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/email/
|
# https://docs.djangoproject.com/en/1.11/topics/email/
|
||||||
|
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||||
|
|
||||||
|
|
||||||
# Authentication
|
# Authentication
|
||||||
|
@ -158,15 +149,15 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
# https://django-allauth.readthedocs.io/en/latest/index.html
|
# https://django-allauth.readthedocs.io/en/latest/index.html
|
||||||
|
|
||||||
AUTHENTICATION_BACKENDS = [
|
AUTHENTICATION_BACKENDS = [
|
||||||
'allauth.account.auth_backends.AuthenticationBackend',
|
"allauth.account.auth_backends.AuthenticationBackend",
|
||||||
]
|
]
|
||||||
|
|
||||||
ACCOUNT_ADAPTER = 'shared.allauth_adapter.AccountAdapter'
|
ACCOUNT_ADAPTER = "shared.allauth_adapter.AccountAdapter"
|
||||||
SOCIALACCOUNT_ADAPTER = 'shared.allauth_adapter.SocialAccountAdapter'
|
SOCIALACCOUNT_ADAPTER = "shared.allauth_adapter.SocialAccountAdapter"
|
||||||
|
|
||||||
HOME_URL = reverse_lazy('wiki:root')
|
HOME_URL = reverse_lazy("wiki:root")
|
||||||
|
|
||||||
LOGIN_URL = '/_profil/login/'
|
LOGIN_URL = "/_profil/login/"
|
||||||
LOGIN_REDIRECT_URL = HOME_URL
|
LOGIN_REDIRECT_URL = HOME_URL
|
||||||
ACCOUNT_LOGOUT_REDIRECT_URL = HOME_URL
|
ACCOUNT_LOGOUT_REDIRECT_URL = HOME_URL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Django==1.11.*
|
Django==2.2.*
|
||||||
# django-allauth-ens==1.0.0b2
|
# django-allauth-ens==1.0.0b2
|
||||||
git+https://git.eleves.ens.fr/cof-geek/django-allauth-ens.git@Qwann/small_fixes
|
git+https://git.eleves.ens.fr/klub-dev-ens/django-allauth-ens.git
|
||||||
wiki==0.3.1
|
wiki==0.5
|
||||||
|
|
Loading…
Reference in a new issue