-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes numerous issues, read the body. #52
base: master
Are you sure you want to change the base?
Changes from 2 commits
8628e46
ac5b73e
cb89b56
f11668b
cf3dddb
ea5d707
f5dcc41
cbe1f02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.6.1 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
google_client_id= | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Students should not be storing credentials in JSON files, they should learn the ability to follow the 12 factor app and keep any configuration credentials stored in environment files so each deployment environment has its own configuration settings without having to constantly change between git commits and leave credentials exposed. |
||
google_project_id= | ||
google_client_secret= | ||
facebook_app_id= | ||
facebook_app_secret= | ||
app_secret_key= | ||
debug= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.idea/ | ||
__pycache__/ | ||
pyrepo/ | ||
*.pyc | ||
.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.6.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Restaurants and Menus | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seriously, no readme file? Each directory should have a readme file that explains all of the setup. |
||
|
||
The first step is to setup the `.env` file to hold all of the environment variables that are needed to connect to the APIs. To do so, run `cp .env.example .env`, which will copy the example file to the .env file. This file is not committed to the Git repo. | ||
|
||
After signing up for an app on facebook and google, fill in the values in their appropriate places in the `.env` file. These will automatically cascade to the rest of the app. | ||
|
||
The database used by default is restaurantmenuwithusers.db. To change to another database engine, look in the `database_setup.py` file and change the engine to whatever is appropriate for your use case. | ||
|
||
To start using the program, run: | ||
```shell | ||
pip install -r requirements.txt | ||
``` | ||
|
||
This will install all of the dependencies. | ||
|
||
To re-run the base seeds, run `python lotsofmenus.py`. | ||
|
||
To start up the app, run either: | ||
|
||
```shell | ||
export FLASK_APP=project.py | ||
flask run | ||
``` | ||
|
||
Or | ||
```shell | ||
python project.py | ||
``` |
This file was deleted.
This file was deleted.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the code is going to be incompatible between Python 2 and 3, then you should create a separate branch for each of those and remove the master branch. The code I've rewritten should be cross-compatible.