ctran / appengine-starter

A starter application template for the Google App Engine platform

This URL has Read+Write access

appengine-starter / controllers.py
100644 23 lines (16 sloc) 0.453 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-
 
from base import BaseController, StaticPageController
 
class HomeController(BaseController):
  """
from webtest import TestApp
from helloworld import application
 
app = TestApp(application())
 
def test_index():
response = app.get('/')
assert 'Hello world!' in str(response)
"""
  def get(self):
    self.render('templates/pages/index.html', locals())
  
urls = (
  ('/page/(.*)', StaticPageController),
)