Explorar o código

fixes a bug where TurboGears Fortune template was being initialized multiple times

Keith Newman %!s(int64=10) %!d(string=hai) anos
pai
achega
7e76ec8813
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      frameworks/Python/turbogears/app.py

+ 1 - 1
frameworks/Python/turbogears/app.py

@@ -84,7 +84,7 @@ class RootController(TGController):
         fortunes.sort(key=attrgetter("message"))
         for f in fortunes:
             f.message = bleach.clean(f.message)
-            template = env.get_template("fortunes.html")
+        template = env.get_template("fortunes.html")
         return template.render(fortunes=fortunes)
 
 config = AppConfig(minimal=True, root_controller=RootController())