On Jun 4, 2007, at 4:19 PM, Matt Feifarek wrote:

> A route map recently stopped working when I upgraded an app to a  
> newer version of pylons.
>
> Here's the map:
> map.connect('projects/:refno/download/:filename',  
> controller='projects', action='download')
>
> This should handily catch and route an uri such as:
> http://localhost:5000/projects/FS5639/download/file.txt
>
> It does not. The controller/action is not called ... it passes  
> through and ends up in a 404.
>
> If I hard code it like this:
> map.connect('projects/:refno/download/file.txt',  
> controller='projects', action='download', filename='file.txt')
> Then it does dispatch correctly.
>
> The 'download' method of 'projects' does take 'refno' and  
> 'filename' as function parameters.
>
> It might be unicode related... as when I dump request.environ 
> ['pylons.routes_dict' ] to console, I get unicode strings in all of  
> the data, but no combination of puttings 'u' in front of my strings  
> in the map.connect() seems to help.
>
> Any clues?

This is a bug in Routes, the current trunk has fixed this bug, which  
you can install with:
easy_install -U Routes==dev

A release will be out in the next few days as well.

Cheers,
Ben
--~--~---------~--~----~------------~-------~--~----~
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