Home:ALL Converter>Is it possible to implement django login-authentication with out writing my own template?

Is it possible to implement django login-authentication with out writing my own template?

Ask Time:2015-07-24T17:49:27         Author:Gaurav Tomer

Json Formatter

my project's urls.py:

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url('^', include('django.contrib.auth.urls')),
]

and, my app url's are:

from django.conf.urls import include, url


urlpatterns = [
    url(r'^login/$', django.contrib.auth.views.login, {'template_name': 'login.html'}, name='login'),
    url(r'^logout/$', django.contrib.auth.views.logout, {'template_name': 'logout.html'}, name='logout'),
]

I'm learning about django authentication. As after reading some docs, I've made a sample app and tried to implement the django authentication system on it.

Is there any built-in django template for these built in views. I've tried it without writing my own template but it throws exception. When I add my login template it works fine.

Is it possible to implement django-authentication with out writing my own 'login.html' template? Is django really having any built-in one? If it is, then how can I include it in my app?

Thanks! in advance

Author:Gaurav Tomer,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31607373/is-it-possible-to-implement-django-login-authentication-with-out-writing-my-own
yy