Skip to content

Commit

Permalink
minor clean up helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 20, 2012
1 parent 2844c94 commit 857647e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ckan/lib/helpers.py
Expand Up @@ -22,10 +22,9 @@
from routes import url_for as _routes_default_url_for
from alphabet_paginate import AlphaPage
from lxml.html import fromstring
from i18n import get_locales
# get_available_locales not used here but passed to template context
from i18n import get_available_locales
import i18n

get_available_locales = i18n.get_available_locales

try:
from collections import OrderedDict # from python 2.7
Expand Down Expand Up @@ -69,7 +68,7 @@ def _add_i18n_to_url(url_to_amend, **kw):

default_locale = False
locale = kw.pop('locale', None)
allowed_locales = ['default'] + get_locales()
allowed_locales = ['default'] + i18n.get_locales()
if locale and locale not in allowed_locales:
locale = None
if locale:
Expand Down

0 comments on commit 857647e

Please sign in to comment.