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=""khtml-block-placeholder">
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...


Reply via email to