# HG changeset patch # User k0s # Date 1256844532 14400 # Node ID 4dcb932065e4ded5ee5950801d6132fd60a1408a # Parent 4ebaf68f22725ea33413aea96d7d72a40c8bc3e5 finish dispatching version of webob_view diff -r 4ebaf68f2272 -r 4dcb932065e4 setup.py --- a/setup.py Thu Oct 29 15:11:05 2009 -0400 +++ b/setup.py Thu Oct 29 15:28:52 2009 -0400 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '' +version = '0.5' setup(name='webob_view', version=version, @@ -12,13 +12,12 @@ keywords='', author='Jeff Hammel', author_email='jhammel@openplans.org', - url='http://www.openplans.org/people/k0s', + url='http://k0s.org', license='GPL', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, - install_requires=[ 'PasteScript', - ], + install_requires=[ 'PasteScript' ], entry_points=""" # -*- Entry points: -*- [paste.paster_create_template] diff -r 4ebaf68f2272 -r 4dcb932065e4 webob_view/template/+package+/dispatcher.py --- a/webob_view/template/+package+/dispatcher.py Thu Oct 29 15:11:05 2009 -0400 +++ b/webob_view/template/+package+/dispatcher.py Thu Oct 29 15:28:52 2009 -0400 @@ -22,5 +22,7 @@ if h.match(request): handler = h(request) break + else: + handler = exc.HTTPNotFound res = handler() return res(environ, start_response) diff -r 4ebaf68f2272 -r 4dcb932065e4 webob_view/template/+package+/handlers.py --- a/webob_view/template/+package+/handlers.py Thu Oct 29 15:11:05 2009 -0400 +++ b/webob_view/template/+package+/handlers.py Thu Oct 29 15:28:52 2009 -0400 @@ -30,7 +30,7 @@ def __call__(self): name = self.request.GET.get('name', 'world') retval = """
Hello, -
""" +""" return Response(content_type='text/html', body=retval % name) @@ -41,7 +41,7 @@ return request.method == 'POST' def __call__(self): - name = 'foo' # XXX get from self.request.POST + name = self.request.POST.get('name', 'world') name = escape(name) self.redirect(self.link('/?name=%s' % name))