Felipe,
Sorry, I'm quite busy these days.
Here is the beginning of something, but I'd prefer to avoid the 'myurl'
function. I'm not a dev' so you'll probably jump looking at that.
The base idea was to use only 'mypatterns' for obtainning the same
results we handwritten previously, including
for you time and attention, if an new solution raises, it would be
great!
Felipe
On Friday, February 7, 2014 2:29:18 PM UTC-2, Felipe Mesquita de Oliveira
wrote:
>
> Hi all,
>
>
> I'm trying to work with translated URL's, but the behavior I'm getting is
> not the one I
Felipe,
Well, if you don't prefix your urls with language code, Django will try
to match translated urls in the language retained for the session [1]
(black-box guessing).
I see multiple options, but the following is the less messy and seems to
fit your requirements:
# myproject.urls
Michel,
Thanks for you reply.
My ideia was to make it without the '/es/' or '/en/' starting the url.
Let's say a user share an 'es' link to an american user.
Like this: '/ayuda/'
I wanted the american user to be able to open it using language defined in
user's session ('en').
Thanks in
Hello,
I don't know where you're trying the troublesome reverse but maybe the
following can help.
# myproject.urls
from django.conf.urls import patterns, url
from django.utils.translation import ugettext_lazy as _
from django.conf.urls.i18n import i18n_patterns
from help.views import
Hi all,
I'm trying to work with translated URL's, but the behavior I'm getting is
not the one I expected.
Part of the code is below:
from django.utils.translation import ugettext_lazy as _
urlpatterns += patterns('',
url(_(r'^help/$'), HelpView.as_view(), name='HelpView
6 matches
Mail list logo