service.py

changeset 50
2cf22291a4f4
parent 49
5b288b0ac271
child 53
1c934953c3e6
equal deleted inserted replaced
49:5b288b0ac271 50:2cf22291a4f4
228 def index(): 228 def index():
229 return redirect('stop_cluster/kauppatori') 229 return redirect('stop_cluster/kauppatori')
230 230
231 @app.route('/pysäkki/<reference>') 231 @app.route('/pysäkki/<reference>')
232 def redirect_pysäkki(reference): 232 def redirect_pysäkki(reference):
233 return redirect('../stop/' + str(reference)) 233 return redirect('stop/' + str(reference))
234 234
235 @app.route('/pysäkkiryhmä/<reference>') 235 @app.route('/pysäkkiryhmä/<reference>')
236 def redirect_pysäkkiryhmä(reference): 236 def redirect_pysäkkiryhmä(reference):
237 return redirect('../stop_cluster/' + str(reference)) 237 return redirect('stop_cluster/' + str(reference))
238 238
239 @app.route('/ajovuoro/<reference>') 239 @app.route('/ajovuoro/<reference>')
240 def redirect_ajovuoro(reference): 240 def redirect_ajovuoro(reference):
241 return redirect('../trip/' + str(reference)) 241 return redirect('trip/' + str(reference))
242 242
243 @app.route('/static/<path:path>') 243 @app.route('/static/<path:path>')
244 def static_file(path): 244 def static_file(path):
245 return send_from_directory(path.join('static', path)) 245 return send_from_directory(path.join('static', path))
246 246

mercurial