The web app utilizes best practices in code organization and UI/UX. To prevent unnecessary code reuse and to maintain consistent formatting, a base HTML file is extended to all other HTML files. The Home page is an example of the user-friendly aesthetics used throughout the app. When interacting with the web app, Create, Read, Update, and Delete (CRUD) operations are performed on the database table containing the competitors.
- The Join Competition page allows the user to enter the competition by providing their name, Bitcoin price forecast, and LinkedIn profile. The web page displayed to the user is a specific Django template rendered by a view and linked to the model containing the attributes to be stored in the database. When the user selects "Submit," their information is saved as a single row of the sqlite3 database file.
- The Competition Board page displays the names and price predictions of all competitors. If an individual competitor is selected, all of their details are displayed on a subsequent page. The retrieval of competitor information is made possible by the "show_competition" and "selection" functions in the Views file. The "selection" function is passed the primary key of the selected competitor from the table. Lastly, the web page paths are saved in the URL patterns file.
- The user has the ability to update or delete any competitor. Each of these operations requires a specific function found in the Views file. If the user selects the "Delete" button, a Confirmation page is displayed.