diff options
author | 2018-04-09 10:34:00 +0100 | |
---|---|---|
committer | 2018-04-09 10:34:00 +0100 | |
commit | afc30354493ef346138281c4115118b8b0dde01b (patch) | |
tree | 9e3ee401d89a461c2372d6f16aebf6baa6367feb /pysite/base_route.py | |
parent | Contribs too picky, need new payment logos (diff) | |
parent | Added Python 3 cheat sheet to resources.json (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'pysite/base_route.py')
-rw-r--r-- | pysite/base_route.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pysite/base_route.py b/pysite/base_route.py index 494875ed..1d30669d 100644 --- a/pysite/base_route.py +++ b/pysite/base_route.py @@ -6,7 +6,7 @@ from flask import Blueprint, Response, jsonify, render_template, url_for from flask.views import MethodView from werkzeug.exceptions import default_exceptions -from pysite.constants import ErrorCodes +from pysite.constants import DEBUG_MODE, ErrorCodes from pysite.mixins import OauthMixin @@ -52,6 +52,7 @@ class BaseView(MethodView, OauthMixin): context["view"] = self context["logged_in"] = self.logged_in context["static_file"] = self._static_file + context["debug"] = DEBUG_MODE return render_template(template_names, **context) @@ -204,4 +205,5 @@ class ErrorView(BaseView): else: blueprint.errorhandler(code)(cls.as_view(cls.name)) else: - raise RuntimeError("Error views must have an `error_code` that is either an `int` or an iterable") # pragma: no cover # noqa: E501 + raise RuntimeError( + "Error views must have an `error_code` that is either an `int` or an iterable") # pragma: no cover # noqa: E501 |