Setting up the Address mapper

Setting up the Address mapper

The web site is established with a url mapper file (urls.py) when you look at the task folder. It is more usual to defer mappings to the associated application while you can use this file to manage all your URL mappings.

Start locallibrary/locallibrary/urls.py and note the instructional text which describes a number of the how to make use of the Address mapper.

The Address mappings are handled through the urlpatterns variable, that will be A python directory of path() functions. Each path() function either associates A address pattern up to a particular view, that will be presented once the pattern is matched, or with another directory of URL pattern evaluation code (in this second instance, the pattern becomes the “base URL” for habits defined within the target module). Continue reading