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:
14
apps.py
Normal file
14
apps.py
Normal 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)
|
Reference in New Issue
Block a user