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]
# # -*- coding: utf-8 -*- # # Pages needed for the application from google.appengine.ext import webapp, db from utils import render_template from movies import Movie import cgi # Set the number of movies to display in the home page max_next_movies = 10 class MainPage(webapp.RequestHandler): """MainPage loaded when the user first arrives at the site""" def get(self): # Try to load best movies at the moment being best_movies = Movie.all().order("-rating") # Prepare context for the template context = { 'best_movies': best_movies, } # Write template to the caller self.response.out.write(render_template('index', context)) class AddMoviePage(webapp.RequestHandler): """AddMoviePage gets called with a post request to add a new movie to the database""" def post(self): title = cgi.escape(self.request.get('title')) # Create a new movie with the selected title movie = Movie(title = title, seen = False) movie.put()