GithubHelp home page GithubHelp logo

bjarkithordarson / t-220-vln2 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 11.34 MB

Verklegt námskeið 2 - Vor 2023 - Háskólinn í Reykjavík

CSS 35.81% HTML 7.62% Python 23.27% JavaScript 33.29% Procfile 0.01%

t-220-vln2's Introduction

T-220-VLN2

Verklegt námskeið 2 - Vor 2023 - Háskólinn í Reykjavík

Getting started

Virtual environment

First setup

Setup the virtual environment. You only need to do this once. Do this in the project directory.

cd /path/to/project
python -m venv venv

Activate

Activate the virtual environment. You need to do this every time you start writing code:

Mac/Linux

source /path/to/project/venv/bin/activate

Load data (if setting up a new database)

cd pizzalair
python manage.py loaddata data.json
Windows
/path/to/project/venv/scripts/activate.ps1

Install

cd /path/to/project
pip install -r requirements.txt

Starting the server

Run the commands:

cd pizzalair
python manage.py runserver --insecure

Open http://localhost:8000

Test Users

Username Password Notes
admin admin Superuser. Has access to /admin.
Robert mediumhardpassword Has 10000 amount of loyalty points
Hall realeasypassword Has 1000 amount of loyalty points
Enrique realyhardpassword Has 250 amount of loyalty points
PizzaLover67 ilovepizza67 Has 13500 amount of loyalty points
FeedmePizza PizzaIsMylife420 Has 6900 amount of loyalty points
Dade vinna1234 Has 5500 amount of loyalty points

Functionality

Requirements

Requirement Notes
Layout page The layout was written from scratch by us.
Edit profile /users/profile
Product catalouge /products/pizza, /products/offers, /products/merch, /products/<category_slug>
Shopping cart /cart
Product details Products have a long description, more images (pizzas have a crust inspector) and a title
Buy a product - Contact We called it billing info. Get to it by putting an item in your cart and clicking checkout.
Buy a product - Payment Step Fully implemented
Buy a product - Review Step Fully implemented
Buy a product - Confirmation step Fully implemented
Buy a product - Navigation between steps Fully implemented
Additional requirements See next chapter.
PostgreSQL In the cloud.
Model API We made full use of Django's model API.
MTV pattern We followed the MTV paradigm.
Git Github was used as a repository.
Exception handling Data validation is handled through the models. No validation is made client-side without corresponding server-side validation.
Offer site /products/offers

Additional functionality

Loyalty Points

Users earn loyalty points when orders are made. Certain products (merch) can only be bought using Loyalty Points.

Merch

Bought using Pizza Lair's own LP currency.

Crust Inspector

Pizza crusts can be inspected by hovering over the pizza picture. Crust lovers rejoyce!

Fully customizable offers

Offers are fully customizable. An offer consists of an Offer object, which has one or more OfferTemplates. When an offer is added to the cart, an OfferInstance is created according to the OfferTemplates specified in the Offer. An offer is added to the cart via a CartOfferItem.

CSS written by us

We took the chance to deepen our CSS knowledge by struggling through so many flex boxes. It may not be the most optimal CSS, but we love the final product and the experience it gave us.

Fully implemented admin site

The content is fully customizable through the admin site at /admin.

Super adorable 404 and 500 error pages

Just look at it :3

If we had more time

No JavaScript

There is partially (50-ish %) implemented functionality to make the whole website work without JavaScript.

Deployment

We thought about deploying the app for fun. We might. The lair.pizza domain is available by the way ;)

Stats

  • Cups of coffees: 40
  • Cans of monster: 15
  • Pizzas eaten: 2
  • Reports written: 2
  • Hours worked: 150
  • Merge conflicts: Too many
  • Lost progress: Some
  • Number of AI-generated dragon images: All of them.

Links

t-220-vln2's People

Contributors

bjarkithordarson avatar spicybeard avatar rebekkaloga avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.