Si l'envoi de mail ne marche pas, on ignore
This commit is contained in:
parent
75471bac38
commit
6a85c30c18
@ -171,12 +171,15 @@ def page_not_found(request, exception=None):
|
||||
|
||||
|
||||
def internal_server_error(request):
|
||||
mail_admins(
|
||||
request.site.name + _(": error 500"),
|
||||
_("An internal error has occurred on site {} at address {}.").format(
|
||||
request.site.name, request.build_absolute_uri()
|
||||
),
|
||||
)
|
||||
try:
|
||||
mail_admins(
|
||||
request.site.name + _(": error 500"),
|
||||
_("An internal error has occurred on site {} at address {}.").format(
|
||||
request.site.name, request.build_absolute_uri()
|
||||
),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
return render(request, "page-erreur.html", status=500, context={"error": 500})
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user