On Feb 22, 2011, at 11:47 PM, Johann Spies wrote:
> On 17 February 2011 21:33, Jonathan Lundell <jlund...@pobox.com> wrote:
> On Feb 17, 2011, at 10:37 AM, Johann Spies wrote:
> > What are the actual URLs for the images in question? As they appear in the 
> > page source at the browser, I mean.
> >
> >
> > 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"
> 
> It should "just work". Can you double-check your names?
> 
> Also, please try it (with files in static/images) with routing turned off 
> (rename routes.py and restart web2py).
> 
> If that doesn't resolve things, I'll try a more extended test at my end.
> 
> Without the routes.py file I can work with the image in static/images but not 
> when routes.py is active.

With routes.py in place, can you access something in static/images with their 
full (unshortened) URL?

And is this still the routers dict you're using? Anything besides BASE?

   # base router                                                                
                                             
    BASE = dict(                                                                
                                              
        default_application = 'kb',                                             
                                              
        domains = {                                                             
                                              
                 'kbase.sun.ac.za' : 'kb',                                      
                                              
                'kbase' : 'kb',                                                 
                                              
                'sadcpublications.sun.ac.za' : 'sadec'                          
                                              
                },                                                              
                                              
        applications = ['kb', 'sadec'],
        controllers = 'DEFAULT'                                                 
                                              
    ),                                       

Reply via email to