Skip to content

A simple web application for an e-commerce store using Python, Flask, jQuery, Bootstrap, Jinja2 and SQLite

Notifications You must be signed in to change notification settings

haxamxam/Flask-Python-E-Commerce-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Flask E-Commerce Website

A simple e-commerce website using Flask, Jinja2, SQLite, jQuery, Bootstrap and Python.

The application loads a gallery of clothing items that includes: image, name, price, and a small form to add clothing items to shopping cart. The clothing information is stored in a SQLite database and is displayed using Bootstrap's card class.

The application contains filters that were implemented through SQLite queries so that the user can scroll through the items according to different categories such as, Shirts, Pants, Shoes, Price etc.

accessibility text

The application can be visited here:

https://sampleclothing.herokuapp.com/

Installation

Use the package manager pip to install the dependencies.

Go in the same directory as the requirements.txt file and run the following

pip install -r requirements.txt

Usage

There are two ways to run the application the application

Run as Python application

Go to the same directory as the main application and run the following

python wsgi.py

Run as Flask application

Go to the same directory as the main application and run the following

set FLASK_APP=application.py
flask run

Deploying on Heroku

The entry point to the application is in wsgi.py file

from application import app

if __name__ == "__main__":
    app.run()

We then need to create a Procfile to deploy to Heroku

web: gunicorn wsgi:app

Create the Heroku application

Use the HerokuCLI to deploy the application to Heroku

heroku login
git init
heroku create sampleclothing
git add.
git commit -am "First python app"
git push heroku master

Once the files are deployed your application will be visible and can be visited. In our case the application is deployed at the link below:

https://sampleclothing.herokuapp.com/

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

A simple web application for an e-commerce store using Python, Flask, jQuery, Bootstrap, Jinja2 and SQLite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published