-
Notifications
You must be signed in to change notification settings - Fork 1
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
Made all code pep8 conformant #23
base: master
Are you sure you want to change the base?
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -5,7 +5,7 @@ | |||||
import json | ||||||
|
||||||
|
||||||
##* WEB APP ## | ||||||
# WEB APP # | ||||||
app = Flask(__name__) | ||||||
# app.config.from_object('config') | ||||||
|
||||||
|
@@ -16,30 +16,32 @@ def home(): | |||||
|
||||||
return render_template("index.html", quote=quote, author=author) | ||||||
|
||||||
|
||||||
@app.route("/api/date") | ||||||
def date(): | ||||||
return json.dumps({"date": helper.getDateReadable()}) | ||||||
|
||||||
|
||||||
@app.route("/api/cal") | ||||||
def cal(): | ||||||
return parse_calendar.parse_all_calendars() | ||||||
|
||||||
#! TESTING LINE | ||||||
# TESTING LINE | ||||||
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. Should this not be indented to the first level? 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. Much of a muchness, lets have it indented then 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.
Suggested change
|
||||||
with open("examplecal.json") as file: | ||||||
data = json.load(file) | ||||||
return data | ||||||
|
||||||
|
||||||
|
||||||
@app.route("/api/menu") | ||||||
def menu(): | ||||||
return parse_menu.main() | ||||||
|
||||||
#! TESTING LINE | ||||||
# TESTING LINE | ||||||
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. 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. Gotcha, I'll do that in future 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.
Suggested change
|
||||||
with open("examplemenu.json") as file: | ||||||
data = json.load(file) | ||||||
return data | ||||||
|
||||||
|
||||||
@app.route("/api/quote") | ||||||
def quote(): | ||||||
quote, author = helper.getQuote() | ||||||
|
@@ -49,4 +51,4 @@ def quote(): | |||||
# Run as flask app (locally only) for testing. | ||||||
# Production level runs gunicorn (WSGI server) | ||||||
if __name__ == "__main__": | ||||||
app.run(debug=True) | ||||||
app.run(debug=True) |
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.
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.
What was the change here, I think I'm missing something