django-rest-auth facebook NoReverseMatch: обратное значение для 'socialaccount_signup' с аргументами '()' и ключевыми словами-аргументами '{}' не найдено. 0 шаблон (ы)

Я использую django_rest_auth для входа в Facebook.

Я всегда получаю эту ошибку, когда я пытаюсь войти в систему через Facebook API

/ Rest_auth/facebook/

Я попробовал этот пост, не помогло.

[04/Dec/2016 12:55:42] "POST /rest-auth/facebook/ HTTP/1.1" 500 126046
Internal Server Error: /rest-auth/facebook/
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Python27\lib\site-packages\django\core\handlers\base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Python27\lib\site-packages\django\views\decorators\csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "C:\Python27\lib\site-packages\django\views\generic\base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "C:\Python27\lib\site-packages\rest_framework\views.py", line 474, in dispatch
    response = self.handle_exception(exc)
  File "C:\Python27\lib\site-packages\rest_framework\views.py", line 434, in handle_exception
    self.raise_uncaught_exception(exc)
  File "C:\Python27\lib\site-packages\rest_framework\views.py", line 471, in dispatch
    response = handler(request, *args, **kwargs)
  File "C:\Python27\lib\site-packages\rest_auth\views.py", line 81, in post
    self.serializer.is_valid(raise_exception=True)
  File "C:\Python27\lib\site-packages\rest_framework\serializers.py", line 214, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "C:\Python27\lib\site-packages\rest_framework\serializers.py", line 411, in run_validation
    value = self.validate(value)
  File "C:\Python27\lib\site-packages\rest_auth\registration\serializers.py", line 107, in validate
    complete_social_login(request, login)
  File "C:\Python27\lib\site-packages\allauth\socialaccount\helpers.py", line 145, in complete_social_login
    return _complete_social_login(request, sociallogin)
  File "C:\Python27\lib\site-packages\allauth\socialaccount\helpers.py", line 161, in _complete_social_login
    ret = _process_signup(request, sociallogin)
  File "C:\Python27\lib\site-packages\allauth\socialaccount\helpers.py", line 27, in _process_signup
    url = reverse('socialaccount_signup')
  File "C:\Python27\lib\site-packages\django\core\urlresolvers.py", line 600, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "C:\Python27\lib\site-packages\django\core\urlresolvers.py", line 508, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'socialaccount_signup' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

1 ответ

Решение

Попробуйте включить этот URL в ваш файл URL:

url(r'^accounts/', include('allauth.urls'), name='socialaccount_signup'),
Другие вопросы по тегам