Just found out that if I put the same code on base.html it works fine, the
problem is when I tried to change l10n\_language_selection_form.html

but still not sure why


On Fri, Apr 5, 2013 at 4:07 PM, אברהם סרור <[email protected]> wrote:

> Hi,
>
> I'm trying to add django-localeurl to my satchmo store, I followed the
> instructions here and it worked fine.
> Now I'm trying to add a change language link
> I tried the django-localeurl example:
>
> {% for lang in LANGUAGES %}
>             {% ifequal lang.0 LANGUAGE_CODE %}
>                 <li class="selected">{{ lang.1 }}</li>
>             {% else %}
>                 <li><a href="{{ request.path|chlocale:lang.0 }}">{{ lang.1
> }}</a></li>
>             {% endifequal %}
>         {% endfor %}
>
> but I get AssertionError URL must start with SCRIPT_PREFIX
> looks like request.path is always returning an empty string. the most
> relevant thing I could find was
> http://stackoverflow.com/questions/6764765/request-is-missing-from-context
> but it didn't solve my problem.
>
> anyone still using django-localeurl? it looks like abandoned, maybe it
> isn't compatible with django 1.4.5?
>
> thanks
> avraham
>
> On Wednesday, June 24, 2009 4:04:01 PM UTC+3, bobwaycott wrote:
>>
>> That's good to know. Thanks.
>>
>> On Tue, Jun 23, 2009 at 6:51 PM, Christopher Hart <[email protected]>wrote:
>>
>>> Oh yeah:
>>>
>>> You also need to change any links to the homepage from "{{ shop_base
>>> }}/" to "{{ shop_base }}/{{ LANGUAGE_CODE }}".
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Jun 23, 2009 at 5:51 PM, Christopher Hart <[email protected]>wrote:
>>>
>>>> After some fussing about we were able to get django-localeurl working
>>>> correctly.
>>>>
>>>> Solution took a bit of searching to find: http://osdir.com/ml/**
>>>> DjangoUsers/2009-06/msg00668.**html<http://osdir.com/ml/DjangoUsers/2009-06/msg00668.html>
>>>>
>>>> Basically, localeurl.middleware.**LocaleURLMiddleware should come
>>>> before
>>>> django.middleware.common.**CommonMiddleware in MIDDLEWARE_CLASSES, but
>>>> after everything else. If it is placed after CommonMiddleware,
>>>> APPEND_SLASH is broken as explained in the django-localeurl docs.
>>>> http://django-localeurl.**googlecode.com/svn/tags/**
>>>> release-1.3/docs/.build/html/**installation.html#id1<http://django-localeurl.googlecode.com/svn/tags/release-1.3/docs/.build/html/installation.html#id1>
>>>>
>>>> Here is what we have and it seems to work correctly:
>>>>
>>>> MIDDLEWARE_CLASSES = (
>>>>    "django.contrib.sessions.**middleware.SessionMiddleware",
>>>>    "django.middleware.locale.**LocaleMiddleware",
>>>>    "django.contrib.auth.**middleware.**AuthenticationMiddleware",
>>>>    "django.middleware.doc.**XViewMiddleware",
>>>>    #The next middleware is required if you want to use satchmo
>>>>    #to serve multiple simultaneous shops.
>>>>    "threaded_multihost.**middleware.**ThreadLocalMiddleware",
>>>>    "satchmo.shop.SSLMiddleware.**SSLRedirect",
>>>>    "satchmo.recentlist.**middleware.**RecentProductMiddleware",
>>>>    "localeurl.middleware.**LocaleURLMiddleware",
>>>>    "django.middleware.common.**CommonMiddleware",
>>>> )
>>>>
>>>> Using Django 1.0.2 & Satchmo 0.8.1.
>>>>
>>>
>>>
>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to