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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2036439.ZDf84KajOk%40devstation. For more options, visit https://groups.google.com/d/optout.