Задать вопрос

Тел: +7 965 3737 888

432

Просмотров

2

Ответов

Message exception

This exception is util when you want to raise an exception but want its message be shown as a message to the user, with no error 500 or 404 pages.

To use it, just append the middleware in the MIDDLEWARE_CLASSES setting and raises HttpMessage when necessary.

Вопрос полезен? Да0/Нет0
file_3297.py(383.0б)
None

Ответы (2):

Ответguettli:30.10.2008
Ответ полезен? Да0/Нет0

This recipe catches all errors. "except HttpMessage" is missing in process_exception().

Ответamitu:15.10.2008
Ответ полезен? Да0/Нет0

It can go in infinite loop. May be some query string parameter can be used to circumvent that.