python - Django 1.10 - NoReverseMatch at /login/ when trying to render login page -
this question has answer here:
- what noreversematch error, , how fix it? 1 answer
- error noreversematch 1 answer
this question has been asked many times couldn't figure out problem.
i started development django
. developing log app authenticate users project using django in-built authentication system.
i facing error when rendering login page through project.urls
.
url(r'^login/$', views.login, {'template_name': 'login.html', 'authentication_form': loginform}),
i used loginform
customize html fields bootstrap
css classes.
here app views.py -
@login_required(login_url="login/") def home(request): return render(request, "home.html")
if user not logged in login_required
redirect user login page. getting error when rendering login page in login.html file -
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
when remove login_required
, home page works.
can please elaborate issue?
Comments
Post a Comment