Hello!

According to example *"Serving Templates" *in tutorial 
(http://turbogears.readthedocs.org/en/rtfd2.3.0b1/turbogears/minimal/index.html)
 
I made
test.py and hello.jinja (files are in attachement).

When I run C:\Python27\python.exe  test.py 
and then open 
http://localhost:8080/hello
in Mozilla Firefox,
I see
404 Not Found
The resource could not be found.

Please, help me in fixing this error.


-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Attachment: hello.jinja
Description: Binary data

from tg import expose, TGController, AppConfig

class RootController(TGController):
    @expose()
    def index(self):
        return 'Hello World'

    @expose('hello.jinja')
    def hello(self, person=None):
        return dict(person=person)

config = AppConfig(minimal=True, root_controller=RootController())
config.renderers = ['jinja']

application = config.make_wsgi_app()

from wsgiref.simple_server import make_server

print "Serving on port 8080..."
httpd = make_server('', 8080, application)
httpd.serve_forever()

Reply via email to