A simple Create-Read-Update-Delete Python Flask application for displaying local restaurant menus. This application incorporates SQLAlchemy (running locally on top of a SQLite database), along with OAuth2.0 authentication through Google. The app is initially read only, but the user can edit the restaurant and menu items after logging in through Google's Oauth2.0 process using Flask-OAuthlib.
- Clone this repository, and cd into it.
- Pip install the requirements.txt
- Run populateDB.py to create the database
- Create a developer account with Google, and get an ID and SECRET for OAuth2 authentication.
- Add a config.py file like the one below to the top level directory, including your ID and Secret.
- Run main.py
$ git clone https://github.com/psthomas/crud-restaurant $ cd path/to/clone $ pip install -r requirements.txt -t lib/ --ignore-installed $ python populateDB.py $ python main.py
Configuration File Example
Create config.py file, similar to this in top level directory:
## ## config.py ## GOOGLE_ID = "your-google-id" GOOGLE_SECRET = "your-google-secret" DEBUG = False SECRET_KEY = "imsosecret"