1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-06-29 09:50:54 +02:00

Send a mail to webmasters when an error occurs (in production mode)

This commit is contained in:
Yohann D'ANELLO
2020-04-25 19:29:01 +02:00
parent 256ac0a7f2
commit e59001b1b5
3 changed files with 56 additions and 0 deletions

14
apps.py Normal file
View File

@ -0,0 +1,14 @@
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.apps import AppConfig
from django.core.signals import got_request_exception
class ScriptsConfig(AppConfig):
name = 'scripts'
def ready(self):
from . import signals
print("scripts are ready")
got_request_exception.connect(signals.send_mail_on_exception)