#The Library
This application was created as my submission for project 3 of Udacity's Full Stack Nanodegree program. The objective of project 3 is to develop a web application that provides a list of items within a variety of categories and to integrate third party user registration and authentication. I decided to make an application called The Library where users can create collections of books to share with their friends.
##Important Files
File | Description |
---|---|
library.py | This is the main Python file which uses the Flask framework to build a dynamic website. |
library_setup.py | This Python file will create a PostgreSQL database at a specified location. |
boxOfBoxes.py | A Python file that will populate the The Library with some test data. |
requirements.txt | Lists all required dependencies for The Library. |
templates Folder | Stores all HTML templates for the application. |
static Folder | Stores all dependencies/resources for the HTML templates. |
####Prerequisites:
Prerequisite | Documentation | Download |
---|---|---|
Git | docs | download |
Virtual Box | docs | download |
Vagrant | docs | download |
Python 2.7 | docs | download |
Vagrant | docs | download |
Python Library | Documentation |
---|---|
Flask | docs |
SQLAlchemy | docs |
Requests | docs |
Httplib2 | docs |
oauth2client.client | docs |
####Installation Steps:
- Open terminal:
- Windows: Use the Git Bash program (installed with Git) to get a Unix-style terminal.
- Other systems: Use your favorite terminal program.
- Change to the desired parent directory
- Example:
cd Desktop/
- Using Git, clone the VM configuration from Udacity:
- Run:
git clone http://github.com/udacity/fullstack-nanodegree-vm fullstack
- This will create a new directory titled fullstack that contains all of the necessary configurations to run this application.
- Move to the vagrant folder by executing:
cd fullstack/vagrant/
- Using Git, clone this project:
- Run:
git clone https://github.com/gravic07/the_library.git the_library
- This will create a directory inside the vagrant directory titled the_library.
- Run Vagrant by executing:
vagrant up
- SSH into Vagrant by executing:
vagrant ssh
- Move to the the_library directory by executing:
cd /vagrant/the_library/
- Create a local database be executing:
python library_setup.py
- This will create a PostgreSQL database within the the_library directory entitled theArchive.db
- (Optional) Populate the database with some test information by executing:
python boxOfBoxes.py
- Deploy the app by executing:
python library.py
Once the installation steps are complete, you are ready to open the application.
- Open a browser and enter the url http://localhost:5000.
- If you run into issues at this point, ensure that nothing else is already using port 5000.
- The application should now be running and fully functional
In the off chance someone would like to contribute to this project, follow the usual steps:
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Created by gravic07
Licensed under the MIT License (MIT)
Copyright (c) [2015] [gravicDesign]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.