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):
287
287
os_projects = os_projects )
288
288
289
289
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
+
291
294
@main_app .route ('/tutorial/<regex(".+"):nick>/<regex(".+"):tutorial>' )
292
295
def 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 )))
297
297
298
298
@main_app .route ("/authenticate" )
299
299
def authenticate ():
You can’t perform that action at this time.
0 commit comments