Giter Site home page Giter Site logo

flask-routing-lab's Introduction

Let's build our own Ebay! - Flask Routing Lab


Today, we are creating an awesome online shop similar to Ebay!

In our project folder, we have a 'static' folder which will be used for css and js files, and a 'templates' folder where you'll find all of our templates (html files) that we are/will be using.
In today's lab, you'll only work with and edit one main Python file and 3 templates: home.html, product.html and cart.html.

First things first, fork this repo(sitory) and clone it to your desktop!

Part 1: Home

  1. Create your first app route and link it to home.html in app.py.
  2. Give home.html some life! Some things you can add:
    • Shop name
    • Description
    • Image of some things you sell
    • Sections or categories of items
    • Strech goal - try to make it as much similar as possible to this:

(Don't link anything yet, keep the href empty. Like: href="#" or href=" ")

Part 2: Product Page

  1. Create an another app route in app.py and link it to product.html.

  2. Update the "Product" link(s) in home.html according to the new app route.

  3. Give product.html some life! Some things you can add:

    • Title
    • Image
    • Description
    • Price
    • Link back to your homepage.
    • Try to make it as much similar as possible to this:

Part 3: Cart

  1. Create an another app route in app.py and link it to the template cart.html
  2. Update the "Cart" link in home.html and product.html according to the new app route.
  3. Modify the products elements in home.html and link the "Add to Cart" button to the new route that you just created.
  • We will not be creating the "Add to Cart" function today, but this will help us set it up for the upcoming sessions.
  1. Fill in some content products in the cart, for preview purposes only.
    • Try to make it as much similar as possible to this:

Bonus:

  • Add a navigation bar to all pages - and link all tabs. (if you haven't yet)
  • Add a carousel in your homepage.
  • Complete all of your pages designs, fill in the gaps of what's missing!

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.