Hallo Jonathan, On 2 March 2011 01:42, Jonathan Lundell <jlund...@pobox.com> wrote:
> On Feb 17, 2011, at 10:37 AM, Johann Spies wrote: > > src="/kb/static/DSC_1403.png" (I moved the image from /kb/static/images to > /kb/static - now it works. > > I would still like to know how to get imgages in static/images to work with > this routing system. > > > src="/sadec/static/sadc.png" > > > Have you made any progress with this? I still haven't been able to > reproduce the problem, using the standard web2py apps, all of which have > several static subdirectories. > > No. It is a production server so I do not want to experiment a lot. When I remove routes.py the server serves the pictures in the subdirectory /static/images/ but when I use routes.py the images have to be in /static. So I just moved them to static. Here is my routes.py (the routers part) routers = dict( # base router BASE = dict( default_application = 'kb', domains = { 'kbase.sun.ac.za' : 'kb', 'kbase' : 'kb', 'sadcpublications.sun.ac.za' : 'sadec' }, applications = ['kb', 'sadec', 'ada', 'admin'], controllers = 'DEFAULT' ), # 'admin' application router admin = dict( controllers = [], # don't remove controller names from admin URLs map_hyphen = False, # don't map hyphens to underscores ), ) Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a