File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -287,13 +287,13 @@ def user_profile(nick):
287287 os_projects = os_projects )
288288
289289
290- @cache .cached (timeout = 10000 )
290+ @cache .cached (timeout = 10000 , unless = request_force_non_cache )
291+ def find_tutorial (slug ):
292+ return Tutorial .query .filter_by (slug = slug ).first ()
293+
291294@main_app .route ('/tutorial/<regex(".+"):nick>/<regex(".+"):tutorial>' )
292295def tutorial (nick , tutorial ):
293- slug = "{}/{}" .format (nick ,tutorial )
294- tutorial_obj = Tutorial .query .filter_by (slug = slug ).first ()
295-
296- return render_base_template ("tutorial.html" , tutorial = tutorial_obj )
296+ return render_template ("tutorial.html" , tutorial = find_tutorial ("{}/{}" .format (nick , tutorial )))
297297
298298@main_app .route ("/authenticate" )
299299def authenticate ():
You can’t perform that action at this time.
0 commit comments