Jason R. Coombs  committed 5755606

Corrected URL in example. Fixes #1125

  • Participants
  • Parent commits 97d9798
  • Branches default

Comments (0)

Files changed (1)

File sphinx/source/concepts/dispatching.rst

     request content. All of these implementation-specific issues are hidden
     behind the Web interface; their nature cannot be assumed by a client that
     only has access through the Web interface.
     `Roy Fielding <>`_
 When you wish to serve a resource on the Web, you never actually serve the
 ```` object. If this object is exposed (or alternatively, its
 ``index`` method is), it will be called for that URL.
-In our HelloWorld example, adding the ``http://onepage/`` mapping
+In our HelloWorld example, adding the ``http://localhost/onepage/`` mapping
 to ``OnePage().index`` could be done like this::
     class OnePage(object):
     class HelloWorld(object):
         onepage = OnePage()
         def index(self):
             return "hello world" = True
     def foo(self):
         return 'Foo!' = True
+ = foo
 In the example, ```` contains a function object, named ``foo``. When
     <form action="doLogin" method="post">
-        <input type="text" name="username" value="" 
+        <input type="text" name="username" value=""
             size="15" maxlength="40"/>
-        <input type="password" name="password" value="" 
+        <input type="password" name="password" value=""
             size="10" maxlength="40"/>
         <p><input type="submit" value="Login"/></p>
         <p><input type="reset" value="Clear"/></p>
         def blog(self, year, month, day):
             ... = True
     root = Root()
 So the URL above will be mapped as a call to::
         def default(self, year, month, day):
             ... = True
     class Root: pass
     root = Root() = Blog()
     class PageHandler(object):
         """Callable which sets response.body."""
         def __init__(self, callable, *args, **kwargs):
             self.callable = callable
             self.args = args
             self.kwargs = kwargs
         def __call__(self):
             return self.callable(*self.args, **self.kwargs)