Django achieve learning details page article Jump

1. because they do not support the blog home page to jump the article details, can only open the first article of the details page

2. it is necessary to do the following:

url article details page design, perfect view of the function logic to achieve the jump Home

/ Blog / detail => You can not specify an article

/ Blog / detail / 1 => blog unique id the only article 1

/ Blog / detail / 2 => blog article 2 of the only unique id

/ Blog / detail / 3 => blog unique id the only article 3

/blog/detail/......

Gets the URL path parameters: <>

Page Jump: href designated html

3.

 

 4.view.py

 

 5. Route

 

 the above.

Guess you like

Origin www.cnblogs.com/frantz/p/11546310.html