Passing an integer through the url to make a product page

From TRCCompSci - AQA Computer Science
Revision as of 13:05, 24 September 2019 by Admin (talk | contribs) (Created page with "We will make it so the product is passed through the url, and then used to display just that product. So we could use'/product/1' to display the produce with the id number of...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We will make it so the product is passed through the url, and then used to display just that product. So we could use'/product/1' to display the produce with the id number of 1.

urls.py

We need to define a new path in the 'urlpatterns':

views.py

template