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 prediction, and LinkedIn profile. The web page displayed to the user is a 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 in 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 web 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 a primary key of the selected competitor from the table. It is also worth mentioning that 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.