Hi guys,

i got a strange problem, I have made a simple application picking up
data from a database, including an upload field for small photos.
This works perfectly if hosted in the classic way, for example if my
server name is stock and the application is stock (...), if I access
http://stock/stock it works !

Then, as this is not pretty, i added a route:

routers = dict(
        BASE = dict(
                domains = {
                        'stock': 'stock'
                }
        )
)

and now, I can access this application at http://stock , but...
Now the link to download the images aren't correct anymore:

the link accessed from http://stock/stock : <img src="/stock/download/
stockItems.photo.bc4b40cb067d4cb8.696d677265732e6a706567.jpeg"
class="photo">

the link accessed from http://stock : <img src="/download/
stockItems.photo.bc4b40cb067d4cb8.696d677265732e6a706567.jpeg"
class="photo">

and the view code :
                <td class='center noedit'>
                    {{if item.photo:}}<img
src="{{=URL(a='stock',f='download',args=item.photo)}}" class="photo"/
>{{pass}}
                </td>
(as you can see, I tried adding the application in the URL
generator..)

Could someone point me where to look at to make it work ? :)

Thanks in advance !!

Reply via email to