Not shure if I understand you correctly, but if I use static linking all 
works fine.
Problem appears only with dynamic linking(like in admin templates).
Is this a feature or a kind of bug? 
really want to use django's i18n_patterns in my project, but can't 
understand how to escape from this case. ='(

вторник, 4 июня 2013 г., 17:38:05 UTC+3 пользователь Ramiro Morales написал:
>
> On Tue, Jun 4, 2013 at 6:23 AM, Ivan Tatarchuk 
> <ivan.v.t...@gmail.com <javascript:>> wrote: 
>
> > from django.conf.urls import patterns, include, url 
> > from django.conf.urls.i18n import i18n_patterns 
> > 
> > urlpatterns = patterns('', 
> >     url(r'^admin/', include(admin.site.urls)), 
> > ) 
> > 
> > urlpatterns += i18n_patterns('', 
> > #   url(r'^other/', include('apps.other.urls')), 
> > } 
> > 
> > now {% url 'admin:password_change' %} resolved as 
> 'admin/password_change' 
> > (normal behaviour) 
> > but if we uncomment line in i18n_patterns it will be resolved  as 
> > 'curr_lang/admin/password_change' 
> > 
> > Can somebody explaine my why? 
>
> Can you try to isolate reduce and isolate your environment to something 
> similar 
> to a test case so we can find the reason of that behavior? 
>
> I've just added a test to our test suite exercising (correct behavior 
> in) a similar scenario: 
>
>
> https://github.com/django/django/blob/master/tests/i18n/patterns/urls/default.py#L9
>  
>
> https://github.com/django/django/blob/master/tests/i18n/patterns/urls/included.py
>  
>
> https://github.com/django/django/blob/master/tests/i18n/patterns/tests.py#L52 
>
> The only difference is that in your case you are including the admin 
> dynamic, 
> namespaced url map so laying with some variation there would be a good way 
> to 
> get further. 
>
> Regards, 
>
> -- 
> Ramiro Morales 
> @ramiromorales 
>

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


Reply via email to