by Sacha Wharton
This is the fifth project in the Udacity Full Stack Web Developer Nanodegree. The application is for adding books with there relevant details such as title, publisher, cover image and so forth with your favourite browser. It uses a third party login namely Google Sign-In which once signed in will then allow you to perform CRUD operations. A JSON endpoint has been provided to query book information.
Python 2.x (The Python executable should be in your default path, which the Python installer sets) Flask Web Framework Bootstrap Vagrant Virtual Box
A requirements.txt file has been created for all package dependencies.
The project contains the following files and folders:
- static - all static content
- templates - all html templates
- database_setup.py - database creation
- project.py - main Python script to run the application
- Install Oracle Virtualbox from here
- Install Vagrant from here
- Use this link to configure and run the virtual machine here
- Download the data from here and copy the item_catalogue_2 folder into the Vagrant directory
- Navigate to the Vagrant folder on the virtual machine
- Run pip install -r requirements.txt (this installs all the required packages)
- Run database_setup.py (this will create the sqlite3 database with all the relevant tables)
- Run project.py (this will start the webserver on port 5000)
- Browse to http://localhost:5000 with your favourite browser
I have implemented CSRF to protect CRUD operations. I have decided to pull book cover images from Amazon by using there image location. I felt this would be a better use of resources should the database grow very large by not having to store the images in the database itself.
I based the README on this template forum I can recommend DB Browser for SQLite here