You need to make a book store web application of two pages: 1. The books page: where you show all the books in your stor
Posted: Tue May 24, 2022 8:44 am
books_data= [ {'title': 'Ballinby Boys', 'author': 'Abraham Stackhouse', 'pages': 277, 'price': 230.99, 'publisher': 'Sound & Seas Co.'}, {'title': 'Nothing But Capers', 'author': 'Amelia Wangerin Jr.', 'pages': 394, 'price': 105.99, 'publisher': 'Palimpsest Printing'}, {'title': 'Alanna Saves the Day', 'author': 'Anastasia Inez', 'pages': 384, 'price': 90.99, 'publisher': 'Palimpsest Printing'} , {'title': 'Post Alley', 'author': 'Arthur McCrumb', 'pages': 187, 'price': 59.99, 'publisher': 'Palimpsest Printing'}, {'title': 'Thatchwork Cottage', 'author': 'Arturo Hijuelos', 'pages': 640, 'price': 106.99, 'publisher': 'Cedar House Publishers'}, {'title': 'Zero over Twelve', 'author': 'Bernard Hopf', 'pages': 575, 'price': 124.99, 'publisher': 'Sound & Seas Co.'}, {'title': 'Portmeirion', 'author': 'Bianca Thompson', 'pages': 631, 'price': 264.99, 'publisher': 'Sound & Seas Co.'}, {'title': 'Rystwyth', 'author': 'Bravig Lewisohn', 'pages': 264, 'price': 232.99, 'publisher': 'Sound & Seas Co.'}, {'title': 'The Mallemaroking', 'author': 'Burton Malamud', 'pages': 704, 'price': 119.99, 'publisher': 'Palimpsest Printing'} , {'title': 'Can I Be Honest?', 'author': 'Carolyn Segal', 'pages': 401, 'price': 111.5, 'publisher': 'Etaoin Shrdlu Press'} , {'title': 'No More Lightning', 'author': 'Charles Fenimore', 'pages': 452, 'price': 182.99, 'publisher': 'Etaoin Shrdlu Press'} , {'title': '9803 North Millworks Road', 'author': 'Clifford Wolitzer', 'pages': 356, 'price': 105.5, 'publisher': 'Sound & Seas Co.'}, {'title': 'The Winchcombe Railway Museum Heist', 'author': 'Darryl Fleischman', 'pages': 371, 'price': 48.99, 'publisher': 'Cedar House Publishers'}, {'title': '(im)Mortality', 'author': 'David Beam', 'pages': 105, 'price': 69.99, 'publisher': 'Sound & Seas Co.'}, {'title': 'the life and times of an utterly inconsequential person', 'author': 'Elizabeth Herbach', 'pages': 390, 'price': 43.99, 'publisher': 'Etaoin Shrdlu Press'}, {'title': 'Banana Slug and the Lost Cow', 'author': 'Kathy Yglesias', 'pages': 493, 'price': 181.99, 'publisher': 'Cedar House Publishers'}]
books_data= [
{'title': 'Ballinby Boys', 'author': 'Abraham Stackhouse', 'pages': 277, 'price': 230.99, 'publisher': 'Sound & Seas Co.'},
{'title': 'Nothing But Capers', 'author': 'Amelia Wangerin Jr.', 'pages': 394, 'price': 105.99, 'publisher': 'Palimpsest Printing'},
{'title': 'Alanna Saves the Day', 'author': 'Anastasia Inez', 'pages': 384, 'price': 90.99, 'publisher': 'Palimpsest Printing'} ,
{'title': 'Post Alley', 'author': 'Arthur McCrumb', 'pages': 187, 'price': 59.99, 'publisher': 'Palimpsest Printing'},
{'title': 'Thatchwork Cottage', 'author': 'Arturo Hijuelos', 'pages': 640, 'price': 106.99, 'publisher': 'Cedar House Publishers'},
{'title': 'Zero over Twelve', 'author': 'Bernard Hopf', 'pages': 575, 'price': 124.99, 'publisher': 'Sound & Seas Co.'},
{'title': 'Portmeirion', 'author': 'Bianca Thompson', 'pages': 631, 'price': 264.99, 'publisher': 'Sound & Seas Co.'},
{'title': 'Rystwyth', 'author': 'Bravig Lewisohn', 'pages': 264, 'price': 232.99, 'publisher': 'Sound & Seas Co.'},
{'title': 'The Mallemaroking', 'author': 'Burton Malamud', 'pages': 704, 'price': 119.99, 'publisher': 'Palimpsest Printing'} ,
{'title': 'Can I Be Honest?', 'author': 'Carolyn Segal', 'pages': 401, 'price': 111.5, 'publisher': 'Etaoin Shrdlu Press'} ,
{'title': 'No More Lightning', 'author': 'Charles Fenimore', 'pages': 452, 'price': 182.99, 'publisher': 'Etaoin Shrdlu Press'} ,
{'title': '9803 North Millworks Road', 'author': 'Clifford Wolitzer', 'pages': 356, 'price': 105.5, 'publisher': 'Sound & Seas Co.'},
{'title': 'The Winchcombe Railway Museum Heist', 'author': 'Darryl Fleischman', 'pages': 371, 'price': 48.99, 'publisher': 'Cedar House Publishers'},
{'title': '(im)Mortality', 'author': 'David Beam', 'pages': 105, 'price': 69.99, 'publisher': 'Sound & Seas Co.'},
{'title': 'the life and times of an utterly inconsequential person', 'author': 'Elizabeth Herbach', 'pages': 390, 'price': 43.99, 'publisher': 'Etaoin Shrdlu Press'},
{'title': 'Banana Slug and the Lost Cow', 'author': 'Kathy Yglesias', 'pages': 493, 'price': 181.99, 'publisher': 'Cedar House Publishers'}
]
<body> <h1>Welcome to our book store!</h1> <h2>Please filter the books by their price range:</h2> <ul> <li><a href='/quizapp/bookfilter/low/'>Low price</a></li> <li><a href='/quizapp/bookfilter/medium/'>Medium price</a></li> <li><a href='/quizapp/bookfilter/high/'>High price</a></li> </ul> <br>
<body>
<h1>Welcome to our book store!</h1>
<h2>Please filter the books by their price range:</h2>
<ul>
<li><a href='/quizapp/bookfilter/low/'>Low price</a></li>
<li><a href='/quizapp/bookfilter/medium/'>Medium price</a></li>
<li><a href='/quizapp/bookfilter/high/'>High price</a></li>
</ul>
<br>
and what to write in the views.py page?
and what shoul be written in templates ? the html programming what is the code i should put?
here is an example of the platform that we are using and Html code:
You need to make a book store web application of two pages: 1. The books page: where you show all the books in your store to the user, and allow him/her three options to filter out the books; (Low price, Medium Price, and High price). a. Low price books are less than $100.00 b. Medium price books are between $100 and $200 c. High price books are above $200 Each filter option is a link which takes the user to the bookfilter page. The link identifies the filter type in the URL. OD Welcome to our book store! Please filter the books by their price range: Title Auther Publisher Sound & Sem Co Ballaby Boys Nothing Bat Capers Alana Saves the Day Pages Price 279 23099 39410599 Ping Piest Printing 38490.99 Post Alley Avalan Stack Asian Anastasia Iser Art McCan Aftum Bemand Banca The Ping 187599 Thatchwork Cottage Ca House Publin 640 196.99 Sound & Sew Co Zes over Twelve Puncion Rystwy Sound & Scan Co 575 124.99 81 64.99 26423299 Levi S&S Co The Mallmarking Bu Mallit Printing Can Be Homest Candys Segl Stella 704 119.99 011113 452182 356 105.5 No Maw Lighting Charles Fire F 9005 Noth Millworks Road Clified Wol The Wincheonbe Railway M Dry F Sound & Seas Ca Cale House Pad Sel & Sem Co T1 4.99 1050999 Um Mortality David Ba the life and times of an sterly incontial peron Hiheth Heach in Stelle Press Banana Shug and the Lost Cow 390 43.99 182 CHP 2. The "bookfilter' page: where the user will see the filtered books. For example the images below show the bookfilter page when the user chose the "low" and "Medium price filter options. a. The URL shows the type of filter to be applied b. At the top of the page, you need to show what type of filter the user has chosen. OD U You chose the low price books! This is the list of the filtered books: Pulber Prax Alena Seven Day Ana Pod Alley Arter Darryl Fleis The Winche Bahay M Monday 0:0 You chose the medium price books! This is the list of the filtered books: Puder Tie Nothing the Capers Thatchwork Cottage Pilip Amelia Wa At Bad Hot Cada
You chose the medium price books! This is the list of the filtered books: Title Author Publisher Pages Price Nothing But Capers Amelia Wangerin Jr. Palimpsest Printing 394 105.99 Cedar House Publishers 640 106.99 Thatchwork Cottage Zero over Twelve The Mallemaroking Sound & Seas Co. 575 124.99 Arturo Hijuelos Bernard Hopf Burton Malamud Carolyn Segal Charles Fenimore 704 119.99 Can I Be Honest? Palimpsest Printing Etaoin Shrdlu Press Etaoin Shrdlu Press 401 111.5 No More Lightning 182.99 452 356 9803 North Millworks Road Clifford Wolitzer Sound & Seas Co. 105.5 Banana Slug and the Lost Cow Kathy Yglesias Cedar House Publishers 493 181.99 All the books' data are available in the 'views.py' file.
ge 3. A urls.py o show_emp.html views.py find_emp.html company > emp> templates > find_emp.html>html>head> title 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=-edge"> <meta name="viewport" content="width-device-width, initial-scale=1.0"> <title>Employee Record Page</title> </head> <body> 10 11 12 13 <h1>Employee Information for ((user.Name))</h1> <strong>ID: </strong>({user.ID))<br> <strong>Title: </strong>(fuser.Title}}<br> <strong>Name:</strong>({user.Name))<br> <strong>Extension: </strong>({user.Extension))<br> <strong>Email: </strong>({user.Enail))<br> <strong>Salary: </strong>-((user.Salary)}<br> 14 15 16 main_page.html 17 </body> 18 </html> show_emp.html _init_py admin.py apps.py PROBLEMS OUTPUT TERMINAL python3.7-company + models.py System check identified no issues (0 silenced). tests.py views.py You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): contenttypes, sessions. F db.sqlite3 Run 'python manage.py nigrate to apply them. May 17, 2022 14:47:14 manage.py Django version 3.2.2, using settings "company.settings Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [17/May/2022 14:47:18] "GET /find_emp/1057 HTTP/1.1" 200 284 [17/May/2022 14:47:26] "GET /find emp/1057 HTTP/1.1" 200 284 [17/May/2022 14:47:36] "GET /find emp/1056 HTTP/1.1" 200 288 [17/May/2022 14:49:29] "GET /find emp/1056 HTTP/1.1" 200 505 [17/May/2022 14:49:53] "GET /find emp/1056 HTTP/1.1" 200 529 EXPLORER ✓ TUTORIAL #7 ✓ company ✓ company >__pycache___ init py asgl.py settings.py urls.py wsgi.py ✓emp >_pycache_ > migrations ✓templates <> find_emp.html > OUTLINE TIMELINE 5 6