Hi all. I apologize for a simple question.

I'm doing a lesson
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/request_response.htm
 
<http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/request_response.html>

Why am I getting a 404 error when calling http://0.0.0.0:6543/plain.

My *__init__.py*
from pyramid.config import Configurator


def main(global_config, **settings):
    config = Configurator(settings=settings)
    config.add_route('home', '/')
    config.add_route('plain', '/plain')
    config.scan('.views')
    return config.make_wsgi_app()


My *views.py*
from pyramid.httpexceptions import HTTPFound
from pyramid.response import Response
from pyramid.view import view_config




class TutorialViews:
    def __init__(self, request):
        self.request = request


    @view_config(route_name='home')
    def home(self):
        return HTTPFound(location='/plain')


    @view_config(route_name='plain')
    def plain(self):
        name = self.request.params.get('name', 'No Name Provided')


        body = 'URL %s with name: %s' % (self.request.url, name)
        return Response(
            content_type='text/plain',
            body=body
        )

I have config.add_route('plain', '/plain') and return HTTPFound(location=
'/plain'), but 404 not found ((( 

Where did I go wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/6bb0f921-f3da-45a8-b71e-cbb3397ed94f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to