1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-24 06:28:49 +02:00

First play with websockets

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2023-03-22 15:24:15 +01:00
parent 30efff0d9d
commit b9ce4c737c
10 changed files with 171 additions and 3 deletions

View File

@ -42,6 +42,8 @@ ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = [
'daphne',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@ -51,6 +53,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'django.forms',
'channels',
'crispy_forms',
'crispy_bootstrap5',
'django_filters',
@ -111,6 +114,7 @@ TEMPLATES = [
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
ASGI_APPLICATION = 'tfjm.asgi.application'
WSGI_APPLICATION = 'tfjm.wsgi.application'
@ -249,6 +253,13 @@ FORBIDDEN_TRIGRAMS = [
"SEX",
]
# TODO: Use a redis server in production
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels.layers.InMemoryChannelLayer"
}
}
if os.getenv("TFJM_STAGE", "dev") == "prod": # pragma: no cover
from .settings_prod import * # noqa: F401,F403
else: