Closed agrif closed 13 years ago
Extra backends setting must point to the "directory", like INSTALLED_APPS
, try with:
SOCIAL_AUTH_IMPORT_BACKENDS = (
'social_github.backends',
)
Ah! I had tried that, but it looked like it failed. Knowing that it was the right thing to do let me to figure out what was actually wrong: I didn't have a BACKENDS
dictionary in github.py.
Thanks for the help!
Once I get this done, I could file a pull request for the GitHub contrib backend if you could use it.
I'm trying to write a GitHub OAuth2 backend, and I'm writing it inside an app in my root django directory. I've already tested that django-social-auth works fine with the built-in Google OpenID backend, and now I'm working on getting it to recognize my GitHub backend. I've added these to my settings.py:
In this case, my backend is named
GitHubBackend
, and is in 'social_github/backends/github.py'. Both 'social_github/' and 'social_github/backends/' have a 'init.py' file.My problem is, when accessing 'http://localhost:8000/login/github/', I get an
AttributeError: 'module' object has no attribute '__path__'
. Here's the full traceback:I have no idea what I'm doing wrong, and the documentation for
SOCIAL_AUTH_IMPORT_BACKENDS
isn't very in-depth. It looks like it's having trouble finding the__path__
attribute on my 'social_github.backends.github' module, but that should be there automatically since it's in a package.If you could help me figure this out, that would be great. If you need any more information I would be happy to provide it.