diff options
author | 2010-12-14 22:12:20 +0000 | |
---|---|---|
committer | 2010-12-14 22:12:20 +0000 | |
commit | 6dfcc10986e3823f25753115a054cf4edfbea868 (patch) | |
tree | 26aca5d70fee892186b8f06047a90f680ca7d863 | |
parent | Include base split code. (diff) | |
download | gentoo-ads-6dfcc10986e3823f25753115a054cf4edfbea868.tar.gz gentoo-ads-6dfcc10986e3823f25753115a054cf4edfbea868.tar.bz2 gentoo-ads-6dfcc10986e3823f25753115a054cf4edfbea868.zip |
More splitting.
-rw-r--r-- | gentoo_ads/ads/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gentoo_ads/ads/views.py b/gentoo_ads/ads/views.py index 03acc1b..141ecaf 100644 --- a/gentoo_ads/ads/views.py +++ b/gentoo_ads/ads/views.py @@ -18,10 +18,12 @@ def serve_ads(request): def _build_lang_array(request): accept_langs = [settings.DEFAULT_ADS_LANG] if META_LANG_KEY in request.META: + accept_langs_raw = request.META[META_LANG_KEY] # Ignore priority for now, hopefully they are in the correct order # TODO: reorder per HTTP language RFC - #accept_langs = [re.sub(';q=[0-9.]+', '' ,_).strip() for _ in request.META[META_LANG_KEY].split(',')] - accept_langs = [_.strip() for _ in request.META[META_LANG_KEY].split(',')] + #accept_langs = [re.sub(';q=[0-9.]+', '' ,_).strip() for _ in accept_langs_raw.split(',')] + #accept_langs = [_.strip() for _ in accept_langs_raw.split(',')] + accept_langs = accept_langs_raw.split(',') # Handle dialects #for _ in accept_langs: # if '-' in _: |