Jonathan has done some awesome work with routing, and I hit my first 
problem. I have a table called auth_user_extended, which I use to store 
extended information not included in the default auth_user table. One of the 
fields in this table is an upload field called picture. The actual file in 
the uploads folder is named:

auth_user_extended.picture.####.png (hash marks indicate unique id)

Whenever I use {{=URL('download', row.picture)}} in a view, the resulting 
URL translates the file name into:

/download/auth-user-extended.picture.####.png (notice the dashes instead of 
the underscores)

I don't know if this is the fault of the router, or the URL() component, but 
it will cause a problem whenever an upload field is used in a table with 
underscores. As a temporary workaround, instead of using:

<img src="{{=URL('default/download', row.auth_user_extended.picture)}}" />

I am using replace(), like so:

<img src="{{=URL('default/download', 
row.auth_user_extended.picture).replace('-', '_')}}" />

Reply via email to