GT Movies Store
Introduction
I'm Karthik, a 2nd year computer science student at Georgia Tech. I do robotics and machine learning research, right now on a multi-agent pedestrian simulator at the Intelligent Vision and Automation Lab, and before that on marine vehicle autonomy in ROS2. I mostly write Python and JavaScript, and picked up Django for this project.
The app
GT Movies Store is a Django app for a movie storefront. Anyone can browse the catalog, search it, and read reviews. Once you have an account you can write reviews, add movies to a cart, and check out into an order history.
How it's put together
Four Django apps: home, movies, cart, and
accounts. Review points at both a movie and a user so the
app knows whose it is, each Item saves the price it was bought at so old
orders don't change, and the cart lives in the session so you can add movies before
making an account.
Screens
Each screen maps to one of the user stories for the project, like browsing movies, leaving a review, or checking out:
| Screen | Route | What it does |
|---|---|---|
| Home | / |
Landing page with the store branding and a way into the catalog. |
| About | /about |
Static page describing the store. |
| Movie list | /movies/ |
Lists every movie, and filters on a case insensitive name match when you search. |
| Movie detail | /movies/<id>/ |
Shows one movie's image, description, and price, along with its reviews and the add to cart form. |
| Sign up | /accounts/signup |
Creates an account using Django's UserCreationForm, restyled to match the rest of the site. |
| Login and logout | /accounts/login/ |
Authenticates against Django's backend, with one generic error message when it fails. |
| Cart | /cart/ |
Lists what's in the session cart with a running total and a button to empty it. |
| Purchase confirmation | /cart/purchase/ |
Saves the order, clears the cart so a refresh can't order twice, and shows the order id. |
| Order history | /accounts/orders/ |
Lists the logged in user's past orders. |
| Reviews | /movies/<id>/review/... |
Lets a logged in user post a review, and edit or delete their own. |
| Report review | /movies/<id>/review/<id>/report/ |
Lets a logged in user take down a review they think is inappropriate. |
| Admin | /admin/ |
Django admin for managing the catalog, including poster uploads. |
Every page extends one base.html with the navbar and footer in it. The
navbar changes depending on whether you're logged in, swapping Login and Sign Up for
Orders and a logout link with your username on it. Layout is Bootstrap 5 with a small
stylesheet on top.
Process
I really just followed the textbook, breaking up each "work sprint" into smaller tasks I thought were managable. I basically went chapter by chapter and decided how much I could do.
The order was based on what needed what. home first to get a page
rendering, then movies since everything else refers to a movie, then
accounts because reviews and orders need a user, and cart
last. Building accounts before reviews was useful because a review needs an author
before you can check who is allowed to edit it.
For questions I mostly used the textbook. When a bug came up I would check to see what it referred to, then go back into the textbook to see if I had missed a step. Then I would reimplement the feature and see if it worked.