Design Bootstrap Front page ( increase )
- from v3 Chinese document —— Components —— panel , Copy wheel :
- from v3 Chinese document —— overall situation CSS style —— Forms , Copy wheel :
relation Mysql( increase )
- html code , Add a statement to the form ,method = "post"
Don't write action ="" when , Send to the page itself by default POST - views.py code ,GET Open the page when ;POST To modify Mysql And jump to the query page
relation Mysql( Delete )
- html code ,“ Delete ” Button jumps to band nid Numbered delete page
- views.py code , from GET request get To nid, modify Mysql And jump to the query page
relation Mysql( Change ), It's a little complicated
- Design Bootstrap Front page ( Change )—— And “ page ( increase )” Almost unanimously
- urls.py code , Use regular , take nid Put it in the middle of the link
- html( check ) code ,“ edit ” Button to jump to this line id In the edit page
- views.py code , Receive GET When asked , Get... Directly nid, Get relevant data from the database , Pass on to html
- views.py code , Receive POST When asked , modify Mysql
- html( Change ) code , obtain nid Relevant database data , On display in form Inside
source :BV1NL41157 Wu Peiqi 《2022 B Station the most detailed django3 course (django From introduction to practice )》P24-P28