Presents error messages to the user without the use of werkzeug debug messages. In addition, users can create the SECRETS.json file via a web form provided if the file does not already exist.#32
Open
KillianDavitt wants to merge 5 commits intodefaultnamehere:masterfrom
KillianDavitt:master
Open
Presents error messages to the user without the use of werkzeug debug messages. In addition, users can create the SECRETS.json file via a web form provided if the file does not already exist.#32KillianDavitt wants to merge 5 commits intodefaultnamehere:masterfrom KillianDavitt:master
KillianDavitt wants to merge 5 commits intodefaultnamehere:masterfrom
KillianDavitt:master
Conversation
added 3 commits
July 23, 2016 20:23
…to create the secrets.json file via a web form. In addition, errors with authentication are now displayed in the web page proper, instead of via a werkzeug debug error. Debug mode can now be turned off by the standard user as it is not neccessary to display error messages. Templates are now seperated into a base template which provides basic styling and the actual content for different pages is placed in their own html file which extends the base.html
app.py
Outdated
| profiles = stalker.get_profiles() | ||
| return render_template("main.html", profiles=profiles) | ||
|
|
||
| global stalker |
Owner
There was a problem hiding this comment.
I cannot, in good conscience, merge a PR that uses global in this way.
added 2 commits
July 25, 2016 12:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creation of the secrets file
One additional endpoint '/create_secret' which the user can post to from a provided web form to create the SECRETS.json file. This is a more user friendly way of creating the file.
A user is presented with the web form if the file does not already exist.
Templates
templates are now separated with a base.html providing the styling and 2 separate other html files providing the content for the pages.
Error messages
If there is a problem with the users auth details and the api cannot login, then, the user is presented with a error message in a fashion that fits the style of the site and no longer via a werkzeug error message. Because of this, debug has been turned off as it is not neccesary if the user is not engaging in further development of the app.