File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
part2/reverse_flask_herd/project Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 33
44app = Flask (__name__ )
55
6- app .config ['DEBUG' ] = False
6+ app .config ['DEBUG' ] = True
77
88
99@app .route ('/' )
@@ -13,8 +13,8 @@ def get_string():
1313
1414@app .route ('/reverse_string' , methods = ['POST' ])
1515def reverse_string ():
16- str_to_reverse = request .form ['str_to_reverse' ]
1716 return render_template (
1817 'result.html' ,
19- result = str_to_reverse [::- 1 ]
18+ original_str = request .form ['str_to_reverse' ],
19+ result = request .form ['str_to_reverse' ][::- 1 ]
2020 )
Original file line number Diff line number Diff line change 55 < title > </ title >
66</ head >
77< body >
8+ Original string: < strong > {{ original_str }}</ strong >
9+ < br >
810 Reversed string: < strong > {{ result }}</ strong >
11+ < br >
12+ < br >
13+ < a href ="/ "> Try again</ a >
914
1015</ body >
1116</ html >
You can’t perform that action at this time.
0 commit comments