django template evaluating differently on firefox and safari
Got the strangest problem, and it does not make sense. I have been through the code like many times and at my wits end trying to figure out what the issue is. Basically testing a site with firefox and safari, they behave differently. This may make sense for Javascript or CSS.
However, this is django code that is not evaluating differently. A simple Example:
My Template code:
{% if myvar == 'var1' %}
{{ status }}
{% endif %}
The inclusion tag is a simple inclusion tag, that returns a few variables and updates the context.
In firefox if myvar evaluates and shows status variable. However the exact same code in safari does not work. It only works if you refresh the page (And no it's not caching as i have the dummy caching enabled)
开发者_Python百科Really this is making no sense at all! I Have it on a live testing server but cant post here. If you send me a message can send url.
Did some digging and the version that is working (Firefox) has the following additional HTTP HEADERs, while safari does not (so my guess is it does not check for the newer version)
'HTTP_IF_MODIFIED_SINCE', HTTP_IF_NONE_MATCH, HTTP_KEEP_ALIVE
Is myvar
something you harvested from a URL? Perhaps Firefox and Safari are sending slightly different strings?
Is it possible you have a context processor and/or middleware that is mucking with things? Both of those can create weird man-behind-the-curtain type problems -- sort of like having networking problem and not knowing that there's a firewall munching on your packets.
精彩评论