Skip to content

anton-kachurin/udacity-item-catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Material Design Resource Catalog

This project is a part of Udacity Full-Stack Developer Nanodegree.

It presents an application that provides a list of items (demonstrational resources related to Material Design in this case) within a variety of categories as well as provide a user registration (via Google+ and Facebook oAuth2) and authentication system.

Registered users have an ability to post, edit and delete their items.

This work is a RESTful web application built on Python framework Flask and SQLAlchemy ORM.

Installation

Assuming Ubuntu is used:

  1. Install Flask, PostgreSQL with its PL/Python extension, SQLAlchemy, and pip:
sudo apt-get -qqy update &&
sudo apt-get -qqy upgrade &&
sudo apt-get -qqy install postgresql python-psycopg2 postgresql-plpython &&
sudo apt-get -qqy install python-flask python-sqlalchemy &&
sudo apt-get -qqy install python-pip
  1. Required pip packages:
sudo pip install bleach &&
sudo pip install oauth2client &&
sudo pip install requests &&
sudo pip install httplib2 &&
sudo pip install redis &&
sudo pip install passlib &&
sudo pip install itsdangerous &&
sudo pip install flask-httpauth
  1. After copying files to the server, create a database and populate it:
sudo su postgres
psql

CREATE USER catalog WITH PASSWORD 'password';
CREATE DATABASE catalog;

\c catalog

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO catalog;
CREATE EXTENSION plpythonu;
UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'plpythonu';
\q
exit

./populate_db.py

alternatively, if some items are also required:

./populate_db.py -i

  1. Create config.py file with the content:
DEBUG = True # or False for production
SECRET_KEY = 'a-secret-key-of-your-choice-here'
  1. Create files g_client_secrets.json(must be generated and downloaded from Google Developer's Console) and fb_client_secrets.json(generate credentials at Facebook for Developers).
nano fb_client_secrets.json
{
  "web": {
    "app_id": "your-app-id",
    "app_secret": "your-app-secret"
  }
}
  1. Run the project:

python project.py

Privacy Policy

This website requires the following information from the user: name, email address and profile picture. This information is used only for registration and authentication, and will never be aggregated and given to any third party (unless required by law).

It also will not be used to contact users by the website owner without asking for explicit consent.

License

Anton Kachurin, 2017, Apache License v2.0

Credits

Material design alphabet

Icon pack by Jurre Houtkamp

Material design icons

About

Flask application with CRUD operations via SQLAlchemy ORM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published