This page lists the milestone requirements for Milestone 8 of the CC 410 Restaurant Project. Read the requirements carefully and discuss any questions with the instructors or TAs.
The CC 410 Restaurant Project project for this semester is centered around building a point of sale (POS) system for a fictional restaurant named Starfleet Subs, based in the Star Trek universe.
The eighth milestone involves moving into the web by creating a data-driven website to display the menu and some other information about the restaurant.
This milestone must follow these professional coding standards:
__init__.py
and __main__.py
are exempt.application
plugin. The project should compile without errors.starfleetsubs.gui
package do not require type hints in Python, though you may continue to use them if they are helpful. Any errors from Mypy originating in these classes will be ignored.flake8-docstrings
and pep8-naming
plugins. Code should conform to PEP 8 style with Google style docstrings.Add a Web Framework to the existing project.
python-dotenv
to use a .flaskenv
file.Warning
Java Users - You will need to remove the 'org.junit.jupiter:junit-jupiter-api:5.6.2'
entry from the testImplementation
section of the dependencies. It conflicts with the version provided by Spring.
Python Users - You may ignore any type errors from flask_classful
by adding #type: ignore
after the import line.
starfleetsubs.web
package.starfleetsubs.web.MenuController
class to act as the controller. It should include the following routes:
/
- a home page for the application./about
- an about page with the text given at the bottom of the page./menu
- a page that includes the entire menu (all predefined combos, entrees, sides, and drinks).
Menu
class to collect these items.Menu
class as desired.Create a base layout file including the following:
- Starfleet Subs
Create the following template files to match the routes listed above:
index.html
contains an <h1> tag with the title “Starfleet Subs” and the following text in a paragraph (you may add additional text as desired):Welcome to Starfleet Subs! Our motto: to boldly eat a sandwich where no sandwich has been eaten before!
about.html
contains an <h1> tag with the title “About Starfleet Subs” and the following text in a paragraph (you may add additional text as desired):Starfleet Subs was developed as part of the CC 410 course at Kansas State University by <your name here>.
menu.html
contains the following content:
menu-item
. It should include:
Tip
You can format currency values directly in your templates! See Formatting Currencies in Spring using Thymeleaf for Java or using the familiar Python String.format() function as demonstrated in this StackOverflow comment.
Completing this project is estimated to require 2 - 5 hours.
Tip
A rough estimate for this milestone would be around 500 lines of new or updated code, the majority of which is HTML. -Russ
This assignment will be graded based on the rubric below:
The following deductions apply:
This is not an exhaustive list of possible deductions. The instructors will strive to provide reasonable and fair grading, but we can’t predict all possible defects. It is up to the student to ensure that the project is complete and correct before submission.
Submit this assignment by creating a release on GitHub and uploading the release URL to the assignment on Canvas. You should not submit this Codio project or mark it as complete in Codio, in case you need to come back to it and make changes later.
Below is a screenshot from the model solution for some web design inspiration.