Sorry, my fault. I confused args and vars.

Thank you 

Enviado via iPhone

Em 06/10/2010, às 00:54, mdipierro <[email protected]> escreveu:

> Is this better?
> 
> {{response.files.append(URL(request.application,'static','css/
> home.css',vars=dict(version=random.random())))}}
> 
> On Oct 5, 5:48 pm, Bruno Rocha <[email protected]> wrote:
>> Hi,
>> 
>> Sometimes is useful to pass a random argument to a CSS file, matters of
>> cache, when you change something in your style and wants the user to have
>> the site updated without the need to clean the cache
>> 
>> What I need is that CSS file will called as .../blablabla.css?version=12345
>> (ther argument does not matter, but browser will not use cached version)
>> 
>> I tried in layout.html:
>> 
>> <code>
>> {{response.files.append(URL(request.application,'static/css','home.css?version=12345'))}}
>> {{response.files.append(URL(request.application,'static/css','home.css',args='12345'))}}
>> </code>
>> 
>> and
>> 
>> <code>
>> import random
>> {{response.files.append(URL(request.application,'static/css','home.css',args=[random.random()]))}}
>> {{response.files.append(URL(request.application,'static/css','home.css',args=str(random.random())))}}
>> </code>
>> 
>> But web2py does not loads CSS in this way.

Reply via email to