forked from gae-init/gae-init
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwelcome.py
More file actions
37 lines (28 loc) · 1.02 KB
/
Copy pathwelcome.py
File metadata and controls
37 lines (28 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# coding: utf-8
import flask
import config
from main import app
###############################################################################
# Welcome
###############################################################################
@app.route('/')
def welcome():
return flask.render_template('welcome.html', html_class='welcome')
###############################################################################
# Sitemap stuff
###############################################################################
@app.route('/sitemap.xml')
def sitemap():
response = flask.make_response(flask.render_template(
'sitemap.xml',
lastmod=config.CURRENT_VERSION_DATE.strftime('%Y-%m-%d'),
))
response.headers['Content-Type'] = 'application/xml'
return response
###############################################################################
# Warmup request
###############################################################################
@app.route('/_ah/warmup')
def warmup():
# TODO: put your warmup code here
return 'success'