I have looked everywhere on the internet for an answer to this problem but cannot find anything. I run into this issue whenever I try to access /accounts/login/
I have added the ID and secret key to my django admins page and added localhost:8000 to my Sites model as well as my Facebook app.
I do not only run into this problem when developing custom applications. I also run into this issue when I clone the allauth repo from github and follow the installation steps with the example application. Help would be much appreciated.
I just cloned the allauth repository, entered client id and secret key in the admin site, and added localhost to my sites. I logged out of admin and tried navigating to accounts/login/ but got the response below:
Request Method: GET
Request URL: http://localhost:8000/accounts/login/
Django Version: 1.10.5
Exception Type: NoReverseMatch
Exception Value:
Reverse for 'facebook_login' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Exception Location: C:...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py in _reverse_with_prefix, line 392
Python Executable: C:...\AppData\Local\Programs\Python\Python36-32\python36.exe
Python Version: 3.6.0
My installed apps are:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.openid',
'example.demo'
)
The template that gives me this response when rendered is snippets/provider_list.html.
{% load socialaccount %}
{% get_providers as socialaccount_providers %}
{% for provider in socialaccount_providers %}
{% if provider.id == "openid" %}
{% for brand in provider.get_brands %}
<li>
<a title="{{brand.name}}"
class="socialaccount_provider {{provider.id}} {{brand.id}}"
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}"
>{{brand.name}}</a>
</li>
{% endfor %}
{% endif %}
<li>
<a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}"
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{provider.name}}</a>
</li>
{% endfor %}
More specifically it is the url in the second list element:
<li>
<a title="{{provider.name}}" class="socialaccount_provider {{provider.id}}"
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{provider.name}}</a>
</li>
It seems that "{% provider_login_url ... %}" is the issue.
I would also give you the urls.py and views.py files but I have only used the {% url "name_of_url" %} format to reference urls and not the format above so I do not even know what {% provider_login_url %} is doing necessarily.
I have not changed any of the code. Everything is exactly from the files cloned from allauth.