I'm using the standard routing module with pylons to try and setup a
default route for the home page of my website.

I've followed the instructions in the docs and here 
http://routes.groovie.org/recipes.html
but when I try http://127.0.0.1:5000/ I just get the 'Welcome to
Pylons' default page.

My config/routing.py file looks like this

from pylons import config from routes import Mapper

def make_map():
    """Create, configure and return the routes Mapper"""
    map = Mapper(directory=config['pylons.paths']['controllers'],
             always_scan=config['debug'])
    map.minimization = False

    map.connect('/error/{action}', controller='error')
    map.connect('/error/{action}/{id}', controller='error')

    # CUSTOM ROUTES HERE
    map.connect( '', controller='main', action='index' )
    map.connect('/{controller}/{action}')
    map.connect('/{controller}/{action}/{id}')

    return map

I've also tried map.connect( '/', controller='main', action='index' )

and (using http://127.0.0.1:5000/homepage/)

map.connect( 'homepage', controller='main', action='index' )

But nothing works at all. I know its reloading my config file as I
used paster serve --reload development.ini to start the server

system info

$ paster --version
PasteScript 1.7.3 from /Library/Python/2.5/site-packages/
PasteScript-1.7.3-py2.5.egg (python 2.5.1 (r251:54863, Feb  6 2009,
19:02:12))

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to