Thanks Michele.

/rune 

On 7. des. 2005, at 12.57, Michele Cella wrote:


I've added your proposal to this ticket:


So we can keep track of this.

Ciao
Michele

Rune Hansen wrote:
I'd like to include a new variable in stdvars -> hash_random

Why, because of IE's caching of GET requests. This is particularly
annoying when working with XMLHttpRequests.

With a hash_random variable you can construct URLs with std.url like
this:
<a href=""margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(Yes, this can also be solved , rather awkwardly, with _javascript_)

def hash_random(seed=None):
     _r = random.Random(seed)
     return md5.new(str(time.time()*_r.random())).hexdigest()

I haven't given much thought on just how "random" this random
generator is, but it should be more than good enough for this
particular use.

"""
view.py

import md5
import random
215a217,220

def hash_random(seed=None):
    _r = random.Random(seed)
    return md5.new(str(_r.random())).hexdigest()
255c260,261
<         locale = get_locale())
---
        locale = get_locale(),
        hash=hash_random)
"""

regards
/rune

---------------------------------------------------------------------
Behind the firewall, nobody can hear you scream...


---------------------------------------------------------------------

Behind the firewall, nobody can hear you scream...


Reply via email to