Skip to content

Commit

Permalink
Revert "Correction d'un '/' manquant dans la génération d'URL non loc…
Browse files Browse the repository at this point in the history
…alisée"

This reverts commit 490cafa.
  • Loading branch information
Mickaël Hoareau committed Apr 19, 2012
1 parent 490cafa commit 40e577f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions localeurl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ def locale_path(path, locale='', host=None, urlconf=None):
"""
if settings.LOCALE_RESTICT_MODE:
if not is_restricted_path(path):
return ''.join([u'/', path])
return path

locale = supported_language(locale)
if not locale:
locale = supported_language(settings.LANGUAGE_CODE)

if is_host_independent(host) and is_urlconf_independent(urlconf):
return ''.join([u'/', path])
return path
elif is_locale_independent(path):
return ''.join([u'/', path])
return path
elif is_default_locale(locale) and not localeurl_settings.PREFIX_DEFAULT_LOCALE:
return ''.join([u'/', path])
return path
else:
return ''.join([u'/', locale, path])

Expand Down

0 comments on commit 40e577f

Please sign in to comment.