May 2020
Intermediate to advanced
404 pages
10h 52m
English
Create a new file, called urls.py, in the billboard folder, as shown:
from django.urls import pathfrom django.contrib.auth.decorators import login_requiredfrom . import viewsurlpatterns = [ path('', login_required(views.board), name='View Board'), path('add', login_required(views.addbill), name='Add Bill'), path('login', views.loginView, name='Login'), path('logout', views.logoutView, name='Logout'),]
Save this as webapp/billboard/urls.py. Notice that we have imported some views items to this route handling file. Also, we have used the login_required method. This indicates that we can start working on the authentication of the website.
Read now
Unlock full access