-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
account - 404 when going to a @login_required page #47
Comments
Here's a workaround but it's probably not the right fix. |
Ok, it seems I need to use |
I've create a pull request against the docs. Is there a way we can get rid of this login_decorator and use Django's built-in instead? |
I believe that @brosner's version in DUA handles some extra things like handing |
When using the account starter app, if I hit a @login_required page I get a 404. It looks like it's trying to redirect me to
/accounts/login/
which doesn't exist. Here's how to recreate the bug:mkvirtualenv testloginurl
pip install pinax-cli
pinax start account testloginurl
cd testloginurl
pip install -r requirements.txt
./manage.py migrate
./manage.py loaddata sites
add this import to
testloginurl/urls.py
:from django.contrib.auth.decorators import login_required
add this line to urlpatterns in
testloginurl/urls.py
:url(r"^protected$", login_required(TemplateView.as_view(template_name="homepage.html")), name="protected"),
./manage.py runserver
Go to http://localhost:8000/protected <- See the 404
The text was updated successfully, but these errors were encountered: