Prevent lang flag being appended to static urls

This commit is contained in:
str4d
2012-09-17 21:31:08 +00:00
parent 6eda93580e
commit 0eab5f512a

View File

@@ -55,6 +55,10 @@ def pull_lang(endpoint, values):
def set_lang(endpoint, values): def set_lang(endpoint, values):
if not values: if not values:
return return
if endpoint == 'static':
# Static urls shouldn't have a lang flag
# (causes complete reload on lang change)
return
if 'lang' in values: if 'lang' in values:
return return
if hasattr(g, 'lang'): if hasattr(g, 'lang'):