Guest User

Untitled

a guest
May 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. > -PROJECT DIR
  2. > -APP
  3. > -API
  4. > -HANDLERS
  5. > home.py
  6. > -TEMPLATES
  7. > home.html
  8. - flask_app.py
  9. > app.yaml
  10. > appengine.config.pu
  11.  
  12. from flask import render_template
  13. from app.flask_app import app
  14.  
  15. @app.route('/')
  16. def home():
  17. return render_template('home.html')
  18.  
  19. runtime: python27
  20. api_version: 1
  21. threadsafe: true
  22.  
  23. handlers:
  24. - url: /.*
  25. script: app.flask_app.app
  26.  
  27. import appengine_config
  28. import logging
  29.  
  30. from app import app_secret_key
  31. from flask import Flask
  32. from flask_wtf.csrf import CSRFProtect
  33.  
  34.  
  35.  
  36. app = Flask(__name__)
  37. app.config.from_object(__name__)
  38. CSRF_PROTECT = CSRFProtect(app)
  39.  
  40.  
  41. if appengine_config.GAE_DEV:
  42. logging.warning('Using a dummy secret key')
  43. app.secret_key = 'my_dummy_secret_key'
  44. app.debug = True
  45. else:
  46. app.secret_key = app_secret_key.secret_key
Add Comment
Please, Sign In to add comment