Skip to content

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

Conversation

@KillianDavitt
Copy link

@KillianDavitt KillianDavitt commented Jul 23, 2016

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.

Killian Davitt 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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot, in good conscience, merge a PR that uses global in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants