Permalink
Browse files

enable easy debug

  • Loading branch information...
1 parent c4411d9 commit 7d6ca07cbb4d8bafaea630dbcd81ba4a546442ce @Carreau Carreau committed Aug 5, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +1 −0 .slugignore
  3. +6 −1 app.py
View
@@ -1,3 +1,4 @@
+.debug
*.pyc
.DS_Store
*.un~
View
@@ -1,3 +1,4 @@
+.debug
README.md
hlog
LISCENCE
View
7 app.py
@@ -110,4 +110,9 @@ def fetch_and_render(id):
if __name__ == '__main__':
# Bind to PORT if defined, otherwise default to 5000.
port = int(os.environ.get('PORT', 5000))
- app.run(host='0.0.0.0', port=port)
+ debug = os.path.exists('.debug')
+ if debug :
+ print 'DEBUG MODE IS ACTIVATED !!!'
+ else :
+ print 'debug is not activated'
+ app.run(host='0.0.0.0', port=port, debug=debug)

0 comments on commit 7d6ca07

Please sign in to comment.