Skip to content

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database. The system allows you to create categories and put items in those categories with a description of that item.

Notifications You must be signed in to change notification settings

phapdinh/Catalog

Repository files navigation

#Used some of Authentication and Authorization README

Git

If you don't already have Git installed, download Git from git-scm.com. Install the version for your operating system.

On Windows, Git will provide you with a Unix-style terminal and shell (Git Bash).
(On Mac or Linux systems you can use the regular terminal program.)

You will need Git to install the configuration for the VM.

VirtualBox

VirtualBox is the software that actually runs the VM. You can download it from virtualbox.org, here. Install the platform package for your operating system. You do not need the extension pack or the SDK. You do not need to launch VirtualBox after installing it.

Ubuntu 14.04 Note: If you are running Ubuntu 14.04, install VirtualBox using the Ubuntu Software Center, not the virtualbox.org web site. Due to a reported bug, installing VirtualBox from the site may uninstall other software you need.

Vagrant

Vagrant is the software that configures the VM and lets you share files between your host computer and the VM's filesystem. You can download it from vagrantup.com. Install the version for your operating system.

Windows Note: The Installer may ask you to grant network permissions to Vagrant or make a firewall exception. Be sure to allow this.

Running the Catalog App

Once it is up and running, type vagrant ssh. This will log your terminal into the virtual machine, and you'll get a Linux shell prompt. When you want to log out, type exit at the shell prompt. To turn the virtual machine off (without deleting anything), type vagrant halt. If you do this, you'll need to run vagrant up again before you can log into it.

Now that you have Vagrant up and running type vagrant ssh to log into your VM. Change to the /vagrant directory by typing cd ../../vagrant. This will take you to the shared folder between your virtual machine and host machine.

Type ls to ensure that you are inside the directory that contains application.py, database_setup.py, and two directories named 'templates' and 'static'

Now type python database_setup.py to initialize the database.

Type python lotsofitems.py to populate the database with categories and items. (Optional)

Type python application.py to run the Flask web server. In your browser visit http://localhost:8000 to view the catalog app.

If you want to log into the App, you have to create a client id for google oauth and put it into the login.html file by changing the span attribute called data-clientid field to the client id that you got from google oauth and clicking the google login button. After login, you will be able to add, edit, and delete items.

Use These links to host on Apache Server

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

https://github.com/stueken/FSND-P5_Linux-Server-Configuration

About

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database. The system allows you to create categories and put items in those categories with a description of that item.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages