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. # Pages needed for the application
  5.  
  6. from google.appengine.ext import webapp, db
  7. from utils import render_template
  8. from movies import Movie
  9. import cgi
  10.  
  11. # Set the number of movies to display in the home page
  12. max_next_movies = 10
  13.  
  14. class MainPage(webapp.RequestHandler):
  15. """MainPage loaded when the user first arrives at the site"""
  16.  
  17. def get(self):
  18. # Try to load best movies at the moment being
  19. best_movies = Movie.all().order("-rating")
  20.  
  21. # Prepare context for the template
  22. context = {
  23. 'best_movies': best_movies,
  24. }
  25.  
  26. # Write template to the caller
  27. self.response.out.write(render_template('index', context))
  28.  
  29. class AddMoviePage(webapp.RequestHandler):
  30. """AddMoviePage gets called with a post request to add a new movie to
  31. the database"""
  32.  
  33. def post(self):
  34. title = cgi.escape(self.request.get('title'))
  35. # Create a new movie with the selected title
  36. movie = Movie(title = title, seen = False)
  37. movie.put()