The url for the app is https://superstore.pythonanywhere.com/
This is website store that I built that allows the user to replicate the functionality off any online web store. For example it allows the user to browse through the store, add items to a basket, update or delete the items in your basket, add and delete items to the store's database (you have to be an admin to do so), checkout by filling in your details and picking the method of payment.
Although you need to be admin in order to add or delete the items from the database, I have added an admin dashboard that does not require authorization to view certain things. From this dashboard you can check the number of items left, customers purchased orders and so much more.
Disclaimer The is not a real store but a demonstration store and because of that it does not take any real money, credit cards, etc but it does replicate the buying functionality found in any web store. The pictures used were taking from Topshop and the NeXT website in order to demonstrate the functionality of the store.
- Python 3.6
- Flask
- HTML
- Bootstrap
- Sqlite3
- SQLAlchemy
- Bootstrap
-
Create a virtual environment optional
-
Create a name for your directory
-
Go into your new directory
-
Clone the repository by using the command git clone followed by a . The full stop at end copies all the folder and directories and sub-directories into the your chosen directory without creating the based folder.
-
Type the command "pip install -r requirements.txt" (making sure you are in the root directory) this will install all the dependencies on your virtual environment
-
(First time use only) Open a command terminal make sure you are in the forum root folder and type the command:
- python app.py db init
- python app.py db migrate
- python app.py db upgrade
- Next open a python terminal and type the following command
- from create_app import db
- db.create_all()
-
Next we need to create our admin user. Make you are in the root store folder open a terminal and type
- python "create_admin.py" file and this should create your password.
-
Open the settings.py and enter the full path to imgs folder. The path will be different depending if it is on a Windows, Mac or Linux. Windows you must use double slash "\" and "/" for Mac or Linux. Regardless of what OS the final path must end either with "/imgs" or "\imgs"
-
Next run the command ** flask run** If you get an error type in the command
- set FLASK_APP=app.py
- ** flask run **
-
Open a browser of your choice and type in http://127.0.0.1:5000 and watch app go
-
To use a demonstration of the app go to https://superstore.pythonanywhere.com/
-
For any bugs found hit me up at "[email protected]"