Difference between revisions of "Set up Login System in Django"
(Created page with "=Update urls.py= You will need to add the following to your urls.py file: <syntaxhighlight lang=python> from django.contrib import admin from django.urls import path, includ...") |
(No difference)
|
Revision as of 17:25, 12 April 2019
Update urls.py
You will need to add the following to your urls.py file:
from django.contrib import admin
from django.urls import path, include # might need to add just include
from django.views.generic.base import TemplateView # add this line
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('django.contrib.auth.urls')), # add this line
path('', TemplateView.as_view(template_name='home.html'), name='home'), # add this line
]