[web2py] Using static files in view confusion

2012-04-20 Thread Simon Pickles
Hi, New to web2py and having trouble with simple HTML in a view. In my default/index.html: {{=IMG(_src=URL('static','images/map420x200.png'))}} The first line works, rendering the map png. However, the second HTML equivalent doesnt. The bordered box appears empty then disappears. Is my path

[web2py] Modifying auth_navbar

2012-04-20 Thread Simon Pickles
Hi, I've worked out how to remove the 'forget username?' and 'Retrieve Password' entries from the navbar by editing gluon/tools.py, and restarting server. This seems a bit severe, altering web2py source code. I imagine my changes will be overwritten at next update. Is there a way to do it in

[web2py] Re: Using static files in view confusion

2012-04-20 Thread Simon Pickles
Thanks I suspected my path was a little wrong. Still got the problem that the image border appears then whole thing vanishes. On Friday, 20 April 2012 08:19:23 UTC+1, Simon Pickles wrote: > > Hi, > > New to web2py and having trouble with simple HTML in a view. In my > def

Re: [web2py] Re: Modifying auth_navbar

2012-04-20 Thread Simon Pickles
Thanks all On Apr 20, 2012 5:21 PM, "pbreit" wrote: > I ended up just coding my own navbar and sticking it in a function in > models. Now that I look at it, I probably should have used URL()s. > > def user_bar(): > action = '/user' > if auth.user: > logout=A('logout', _href=action

Re: [web2py] Re: Using static files in view confusion

2012-04-20 Thread Simon Pickles
Thanks Nice to see web2py has a helpful and lively community On Apr 20, 2012 2:24 PM, "Simon Pickles" wrote: > Thanks I suspected my path was a little wrong. > > Still got the problem that the image border appears then whole thing > vanishes. > > On Friday, 20 Apri

[web2py] Country list

2012-04-20 Thread Simon Pickles
Does web2py have any built in support for country lists, the drop down list you use while entering an address? Thx

[web2py] Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Hi I am using this code to create a crude grid of images with links: {{for a in adverts:}} {{=A(IMG(_src=URL('static', 'images/ads/' + a.advert.thumbnail), _alt="My Logo"), _href=URL('default','index'))}} This renders as: Shows up fine in IE9 but doesnt in Firefox 10. If I go to the

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Thanks for the reply. Oddly there is no missing image icon. The alt text seems to flash up then disappear. I thought there was some CSS or js weirdness going on but it makes no difference if I extend 'layout.html', ie use no CSS and js. Firebug gives a preview of the image in question so Firefox

[web2py] Re: Images work in IE9, vanish in firefox

2012-04-29 Thread Simon Pickles
Adblock plus. That was the issue. It intercepted the images and turned all the css to null. http://stackoverflow.com/questions/3558071/img-tag-greyed-out-in-firebug-hence-found-the-reason-for-image-not-showing-up Thanks for help, Antony