File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 15
15
"""App Engine app to serve as an endpoint for App Engine queue samples."""
16
16
17
17
# [START cloud_tasks_appengine_quickstart]
18
- from flask import Flask , request
18
+ from flask import Flask , render_template , request
19
19
20
20
app = Flask (__name__ )
21
21
@@ -25,7 +25,7 @@ def example_task_handler():
25
25
"""Log the request payload."""
26
26
payload = request .get_data (as_text = True ) or '(empty payload)'
27
27
print ('Received task with payload: {}' .format (payload ))
28
- return 'Printed task payload: {}' . format ( payload )
28
+ return render_template ( "index.html" , payload = payload )
29
29
# [END cloud_tasks_appengine_quickstart]
30
30
31
31
Original file line number Diff line number Diff line change
1
+ <!--
2
+ Copyright 2022 Google LLC
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
12
+ -->
13
+ <!DOCTYPE html>
14
+ < html >
15
+ < head >
16
+ < title > Tasks Sample</ title >
17
+ </ head >
18
+ < body >
19
+ < p > Printed task payload: {{ payload }}</ p >
20
+ </ body >
21
+ </ html >
You can’t perform that action at this time.
0 commit comments