I am trying to get django-allauth to work for a project. In my Django project, lets call it yali, I did a git clone.
I then moved the folder /django-allauth/allauth to root /yali. and then deleted django-allauth and all the licenses, READMEs ...etc
According to documentation, there are three things I should do:
I should add this to settings.py:
TEMPLATE_CONTEXT_PROCESSORS = (
...
"allauth.context_processors.allauth",
"allauth.account.context_processors.account"
)
AUTHENTICATION_BACKENDS = (
...
"allauth.account.auth_backends.AuthenticationBackend"开发者_运维技巧,
)
INSTALLED_APPS = (
...
'emailconfirmation',
'uni_form',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.twitter',
'allauth.openid',
'allauth.facebook',
And then add this to urls.py
(r'^accounts/', include('allauth.urls')))
Doing so, gives me a 404 when navigating to http://localhost:8000/account
What am I missing here? The documentation is somewhat unclear here and even potentially wrong. It instructs to point urls.py to "accounts", while there is no "accounts" folder but "account"
The folder name has nothing to do with the url. The urls of your apps are defined in urls.py
. You can put what you want, but you must use those same urls when navigating in the browser.
In your case, you must navigate to:
http://localhost:8000/accounts
If you have defined urls as:
(r'^anything/', include('allauth.urls')))
you should navigate to:
http://localhost:8000/anything
精彩评论