Skip to content

masudm6/5001CEM_bookshop

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

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 the static folder
  • Type mkdir img to create the folder img for saved images.
  • Type cd .. to return to the 5001CEM_bookshop folder.

Install and activate the virtual environment:

Type the following in order:

  1. sudo apt update
  2. sudo apt-get install python3-venv (Make sure to enter Y when prompted)
  3. python3 -m venv venvCODIO (venvCODIO is the venv name defined in the .gitignore file.)
  4. . 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:

  1. Click Project -> Box Info at the top.
  2. Copy the first link under the WEB: Dynamic Content section.
  3. Paste the link into a browser tab, and change the number at the end to 5000 (It is 80 by default.)
  4. Press enter or reload the tab, and you should now be on the index page for the website.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published