5001CEM_bookshop
Post-CW Note:
This code can be considered WIP and the shortfalls are better described and tested in the associated report. I was awarded 72% for this module.
Had more time been allocated, it could have been completed to its full by improving the basket functionality, UI, security and the entire backend.
Many have since been investigated throughout various projects (e.g. By adding a model based system for data and implementing a CSS framework.)
Project 2: Bookshop website
This repository contains the code for my submission of the 5001CEM Project (Bookshop) as part of my coursework
Install instructions
These are some instructions to get started with the project.
Root access to a Python Codio environment is required.
Create a Python environment on Codio and open the terminal:
- You can use the 'Open Terminal' button under the Codio project's name, or by clicking Tools > Terminal at the top.
Clone the repository and switch into its directory:
- Type
git clone https://github.coventry.ac.uk/masudm6/5001CEM_bookshop.git
to clone this repository. - Type
cd 5001CEM_bookshop
to switch into the cloned files. - Type
cd static
to switch into thestatic
folder - Type
mkdir img
to create the folderimg
for saved images. - Type
cd ..
to return to the5001CEM_bookshop
folder.
Install and activate the virtual environment:
Type the following in order:
sudo apt update
sudo apt-get install python3-venv
(Make sure to enterY
when prompted)python3 -m venv venvCODIO
(venvCODIO
is the venv name defined in the.gitignore
file.). venvCODIO/bin/activate
Install dependencies from the requirements file:
pip install -r requirements.txt
Setup and run the flask application using the integrated CLI:
- Type
export FLASK_APP=app
so flask knows where to look to run our code. - Type
flask run --host=0.0.0.0
to start the flask app.
Access the flask app:
- Click Project -> Box Info at the top.
- Copy the first link under the WEB: Dynamic Content section.
- Paste the link into a browser tab, and change the number at the end to 5000 (It is 80 by default.)
- Press enter or reload the tab, and you should now be on the index page for the website.