June 2018
Beginner
508 pages
13h 8m
English
In the urls.py module, we tie each view to a URL. There are many ways of doing this. I chose the simplest one, which works perfectly for the extent of this exercise, but you may want to explore this subject more deeply if you intend to work with Django. This is the core around which the whole website logic will revolve; therefore, you should try to get it down correctly. Note that the urls.py module belongs to the project folder:
# regex/urls.pyfrom django.contrib import adminfrom django.urls import pathfrom django.contrib.auth import views as auth_viewsfrom django.urls import reverse_lazyfrom entries.views import HomeView, EntryListView, EntryFormViewurlpatterns = [ path('admin/', admin.site.urls), path('entries/', ...Read now
Unlock full access