I have a legacy application using django 1.4.2 and python-social-auth.
I have the app installed
INSTALLED_APPS = (
...
'social.apps.django_app.default',
...
)
The backends:
AUTHENTICATION_BACKENDS = (
'social.backends.facebook.FacebookAppOAuth2',
'social.backends.facebook.FacebookOAuth2',
'social.backends.google.GoogleOAuth',
'social.backends.google.GoogleOAuth2',
'social.backends.google.GoogleOpenId',
'django.contrib.auth.backends.ModelBackend',
)
More settings...
SOCIAL_AUTH_FACEBOOK_ID = ''
SOCIAL_AUTH_FACEBOOK_SECRET = ''
SOCIAL_AUTH_ENABLED_BACKENDS=('facebook', 'google')
SOCIAL_AUTH_DEFAULT_USERNAME= lambda u: slugify(u)
And in my root url :
urlpatterns += patterns('',
url('', include('social.apps.django_app.urls', namespace='social'))
But I still get this error:
Template error:
In template /home/matias/Proyectos/apuntes/copias/templates/login.html, error at line 9
9 : <p>Ingresá con tu cuenta de <a class="login facebook" href=" {% url 'social:begin' 'facebook' %} {% if request.GET.next %}?next={{ request.GET.next }}{% endif %}">Facebook</a> </p>
Exception Type: NoReverseMatch at /login
Exception Value: u"'social" is not a registered namespace
I don't know what's missing. As far as I can tell I have everything right.
The quoting in the error messages worries me. But the urls.py is fine so maybe it's django formatting being funny.
Any pointer?