[Chicago] Pylons/Groovie Routes Help

Daniel Griffin dgriff1 at gmail.com
Wed Apr 30 01:49:17 CEST 2008


Hi,
I have been working on Pylons for a while now and have run into 1 serious
issue. I cannot figure out Routes. Can someone help me figure out routes for
the following?

users pk - username
- view(no key needed)
- new/edit/delete(key needed)
- find jobs for this user

jobs - pk is batch + job + date entered
- view(no key needed)
- new/edit/delete(key needed)
- assorted other stuff

quickview
 - summary view(no key needed)

I dont really have a routes file to post since it is entirely broken, the
keys cannot be changed and eventually there will be many entries needed.
When I started and only had users the following worked

    map.connect(':controller/:action/:id')
    map.connect(':controller/:action/:name',
controller='gecsuser',action='list')
    map.connect(':name', controller='gecsuser', action='list', name='Dan')

when I added

  map.connect(':controller/:action/:jobnum/:batch/:submitted',
controller='gecsjob',action='index')
    map.connect(':jobnum', controller='gecsjob', action='index',
jobnum='job')
    map.connect(':batch', controller='gecsjob', action='index', batch='job')
    map.connect(':submitted', controller='gecsjob', action='index',
submitted='9999-12-31 23:59:59')

everything broke. How do I make this work?

Thanks
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20080429/edb2f899/attachment.htm>


More information about the Chicago mailing list