Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up django-allauth 404 error?

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"

like image 345
Rami Taibah Avatar asked Jun 15 '11 23:06

Rami Taibah


1 Answers

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
like image 97
manji Avatar answered Sep 28 '22 22:09

manji