[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


[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 clearly has found 
it, just won't show it.

Re recursive select, that's next on the todo list after displaying a simple 
image!


[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 address of 
the image directly by putting it in the address bar 
(http://127.0.0.1:8000/test2/static/images/ads/jamie.jpg), it works.. the 
image appears. It just doesnt appear in my firefox page when generated with 
the python code above.

Can anyone shed any light?


[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


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 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
>> 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 wrong?
>>
>> The app is just created using wizard, and default layout.
>>
>> Thanks
>>
>> Simon
>>
>


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+'/logout')
> profile=A('profile', _href=action+'/profile')
> password=A('change password', _href=action+'/change_password')
> bar = SPAN(auth.user.email, ' | ', profile, ' | ', password, ' |
> ', logout, _class='auth_navbar')
> else:
> login=A('login', _href=action+'/login')
> register=A('register',_href=action+'/register')
> lost_password=A('lost password',
> _href=action+'/request_reset_password')
> bar = SPAN(' ', login, ' | ', register, ' | ', lost_password,
> _class='auth_navbar')
> return bar
>


[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 
> 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 wrong?
>
> The app is just created using wizard, and default layout.
>
> Thanks
>
> Simon
>


[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 the layout.html view?

Thanks

Simon


[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 wrong?

The app is just created using wizard, and default layout.

Thanks

Simon