A simple course catalog. Working example here: https://bay-course-catalog.herokuapp.com
Users can add courses and organize them by school and category.
Users are able to create accounts or log in through OAuth providers.
Item Catalog project for Udacity Full Stack Nanodegree, built with Flask framework, using Flask-SQLAlchemy.
Python 2.7.x
All other dependencies will be installed during setup below.
- Clone this repository to your local machine
cd
tocourse_catalog/course_catalog
- [Optional, but highly recommended] Create a new virtual environment using virtualenv.
virtualenv venv
. venv/bin/activate
- Run
pip install --editable .
This will install all needed dependencies. - Create an instance directory to store database and configuration files:
mkdir instance
- Copy the default config file to the
instance
directory:
cp course_catalog/default_config.py instance/config.py
- Open the newly created
config.py
and add a SECRET_KEY as well as IDs and Secret Keys for all OAuth providers - Start python in your terminal. Run the code below to create the database:
from course_catalog.course_catalog import *
init_db()
- Run the following in your command line to assign the flask app:
export FLASK_APP=course_catalog
- Turn on debug mode on development only. If it is production, turn this off (0):
export FLASK_DEBUG=1
- Start the application with
flask run
- Open
localhost:5000
in your browser
To run testing suite:
python tests/test_course_catalog.py
- Add additional functionality.
- Finetune this README file.
- Add to the testing suite.