@albertalexandrov

KeyError at / 'vk' в django-allauth?

Всем привет!

Возникла проблема при делпое сайта на хостинг (на локальном django-allauth==0.35.0, python==3.6 все норм).

django-allauth==0.32.0, python==3.5.

Трейcбэк:

Environment:

Template error:
In template /home/httpd/vhosts/yakhshisarova.ru/private/realestate/templates/authentication_links.html, error at line 3
   Reverse for 'vk_login' not found. 'vk_login' is not a valid view function or pattern name.
   1 : {% load socialaccount %}
   2 : 
   3 : <a href=" {% provider_login_url 'vk' method='oauth2' %} ">Войти с помощью ВКонтакте</a>
   4 : 

Traceback:

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/httpd/vhosts/yakhshisarova.ru/private/realestate/realestate/index/views.py" in index
  15.         'filters_form': filters_form

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/shortcuts.py" in render
  36.     content = loader.render_to_string(template_name, context, request, using=using)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/loader.py" in render_to_string
  62.     return template.render(context, request)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render
  175.                     return self._render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in _render
  167.         return self.nodelist.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render
  943.                 bit = node.render_annotated(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render_annotated
  910.             return self.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/loader_tags.py" in render
  155.             return compiled_parent._render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in _render
  167.         return self.nodelist.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render
  943.                 bit = node.render_annotated(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render_annotated
  910.             return self.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/loader_tags.py" in render
  194.                 return template.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render
  177.                 return self._render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in _render
  167.         return self.nodelist.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render
  943.                 bit = node.render_annotated(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/template/base.py" in render_annotated
  910.             return self.render(context)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/allauth/socialaccount/templatetags/socialaccount.py" in render
  46.         return provider.get_login_url(request, **query)

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/allauth/socialaccount/providers/oauth2/provider.py" in get_login_url
  10.         url = reverse(self.id + "_login")

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/urls/base.py" in reverse
  88.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))

File "/home/httpd/vhosts/yakhshisarova.ru/private/venv/lib/python3.5/site-packages/django/urls/resolvers.py" in _reverse_with_prefix
  632.         raise NoReverseMatch(msg)

Exception Type: NoReverseMatch at /
Exception Value: Reverse for 'vk_login' not found. 'vk_login' is not a valid view function or pattern name.


Прошу подсказать, в чем может быть проблема...
  • Вопрос задан
  • 350 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы