Check if SECRET_KEY is set

This commit is contained in:
mvantellingen
2011-02-13 23:02:24 +01:00
parent 0058a48ee2
commit 47376ecf71

View File

@@ -35,6 +35,12 @@ class DebugToolbarExtension(object):
if not app.debug:
return
if not app.config.get('SECRET_KEY'):
raise RuntimeError(
"The Flask-DebugToolbar requires the 'SECRET_KEY' config "
"var to be set")
self.app.before_request(self.process_request)
self.app.after_request(self.process_response)