On Jun 24, 2008, at 9:43 PM, Sok Ann Yap wrote:
I am using resource mapper in Routes (1.9) to get rest style URL, e.g.
map.resource('message', 'messages'). The problem is that I can't show
a resource in a particular format, e.g. /messages/12.json , because
"12.json" will be assigned to the id variable while the format
variable remains empty.
Are you using the formatted named url_for? ie, url_for('formatted_message', id=12, format='json')?
This can be fixed by reversing the order of the last 2 connect lines in routes/mapper.py. Once reversed, "12" will be assigned to id and "json" will be assigned to format.
Thanks, I'll take a look at applying this today. Cheers, Ben
smime.p7s
Description: S/MIME cryptographic signature
