viewgit/index.php:465 Only variables should be passed by reference [2048]

viewgit/index.php:466 Non-static method GeSHi::get_language_name_from_extension() should not be called statically [2048]

  1. #
  2. # -*- coding: utf-8 -*-
  3.  
  4. from google.appengine.ext.webapp import template
  5. import os
  6.  
  7. template_directory = os.path.join(os.path.dirname(__file__),
  8. 'templates')
  9.  
  10. def render_template(template_name, values):
  11. template_file = os.path.join(template_directory, template_name)
  12. if not os.path.exists(template_file) and not template_file.endswith(".html"):
  13. template_file += ".html"
  14. if not os.path.exists(template_file):
  15. raise RuntimeError("No template '%s' found, aborting page rendering" % template_name)
  16.  
  17. return template.render(template_file, values)
  18.  
  19.