On Wednesday 07 June 2017 16:19:46 Damian Myerscough wrote:
> When trying this using the Django test web server I am still unable to
> catch this error. When try the same query
> using a shell I can catch the exception.
> The above exception ((2003, "Can't connect to MySQL server on
> '127.0.0.1' (61)")) was the direct cause of the following exception:
>
> File
> "/Users/damian/env36/lib/python3.6/site-packages/django/core/handlers/
> exception.py" in inner
> 41. response = get_response(request)
>
> File
> "/Users/damian/env36/lib/python3.6/site-packages/django/core/handlers/
> base.py" in _get_response
> 187. response =
> self.process_exception_by_middleware(e, request)
>
> File
> "/Users/damian/env36/lib/python3.6/site-packages/django/core/handlers/
> base.py" in _get_response
> 185. response = wrapped_callback(request,
> *callback_args, **callback_kwargs)
>
> File
> "/Users/damian/Development/mirustatus/mirustatus/accounts/utils.py"
> in as_view
> 10. if request.user.is_authenticated():
That's the line of code you need to wrap, which is probably earlier in the code then your incidents filter.
--
Melvyn Sopacua
No comments:
Post a Comment