Final Exam V2 - HOROSCOPE
You are building a web application that will show horoscope for different signs. The user can select a sign from the first page or search for a sign, once the user picks a sign, the horoscope is displayed on the next page. If the sign is not found - show an error. second page also allows user to search for another sign.
Queries to use in the program
- Name the .py file with your first and last name, if you are placing your files in a folder, then there should be only one .py file and folder must be named with your name as well
- Using one of: WSGI, HTTPServer, Flask (I used WSGI) servers
- For extra 10% of the exam grade:
(5%) create a data visualization for your project using either TKINTER or HTML/public web services (ex. Google Charts). Display one horoscope on the canvas or any other visualization of choice. Has to use horoscope data.
(5%) test program and handle SQL injection (submit a proof of SQL injection handled in the program - comment it) - Grade breakdown
Connection to database and database operations work correctly - 25%
Web Page is displayed as expected - 25%
Web page to server operation works correctly - 25%
Exceptions/Errors as described below are handled correctly - 15%
Code is clean, well commented and does not contain unneeded copy-pasted chunks (Python code only, I don't care for HTML) - 10%
You are building a web application that will show horoscope for different signs. The user can select a sign from the first page or search for a sign, once the user picks a sign, the horoscope is displayed on the next page. If the sign is not found - show an error. second page also allows user to search for another sign.
Queries to use in the program
- to select all existing signs: SELECT sign FROM horoscope
- to search for a sign: SELECT sign, description FROM horoscope where sign like '%ARIES%'
- to display a horoscope for a sign: SELECT description FROM horoscope where upper(sign)= 'ARIES'
INITIAL PAGE: