Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > -PROJECT DIR
- > -APP
- > -API
- > -HANDLERS
- > home.py
- > -TEMPLATES
- > home.html
- - flask_app.py
- > app.yaml
- > appengine.config.pu
- from flask import render_template
- from app.flask_app import app
- @app.route('/')
- def home():
- return render_template('home.html')
- runtime: python27
- api_version: 1
- threadsafe: true
- handlers:
- - url: /.*
- script: app.flask_app.app
- import appengine_config
- import logging
- from app import app_secret_key
- from flask import Flask
- from flask_wtf.csrf import CSRFProtect
- app = Flask(__name__)
- app.config.from_object(__name__)
- CSRF_PROTECT = CSRFProtect(app)
- if appengine_config.GAE_DEV:
- logging.warning('Using a dummy secret key')
- app.secret_key = 'my_dummy_secret_key'
- app.debug = True
- else:
- app.secret_key = app_secret_key.secret_key
Add Comment
Please, Sign In to add comment