Добрый день!Попробовал, но у меня выдаёт ошибку global name 'original_login' is not definedпри попытки авторизации.def login(request): u""" Вызывает соответствующее представление Django, анализирует результат. В случае ошибки генерирует сообщение и возвращает пользователя на прежнюю страницу. """ response = original_login(request) if isinstance(response, HttpResponseRedirect): return response else: messages.error(request, _(u'Your credentials are wrong. Sorry.')) return_to = request.REQUEST.get(REDIRECT_FIELD_NAME, reverse('frontend:index')) return HttpResponseRedirect(return_to)