I've replaced 
urlpatterns = i18n_patterns("",
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    ("^admin/", include(admin.site.urls)),
)
with
urlpatterns = patterns("",
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    ("^admin/", include(admin.site.urls)),
)
in urls.py and it solved the problem.

Is it correct solution? Can I have any problems with this solution in the 
future?
I'm sorry, may be it is easy question, but I'm not Django pro. Please help 
to understand)
Thnx.

понедельник, 25 января 2016 г., 21:56:49 UTC+3 пользователь 
[email protected] написал:
>
> Hi guys,
>
> I have a site with USE_I18N = True and only one language - russian.
> There is no language code in any url created by CMS and it is OK.
> But when I try to get nonexistent page it redirects me to 404 page with 
> language code. Why?
> Here is a log:
> [Mon Jan 25 18:38:11 2016] GET /sdasdasasdasda => generated 0 bytes in 66 
> msecs (HTTP/1.1 301) 5 headers in 202 bytes (1 switches on core 0)
> [Mon Jan 25 18:38:11 2016] GET /sdasdasasdasda/ => generated 0 bytes in 
> 205 msecs (HTTP/1.1 302) 3 headers in 125 bytes (1 switches on core 0)
> [Mon Jan 25 18:38:11 2016] GET /ru/sdasdasasdasda/ => generated 7028 bytes 
> in 137 msecs (HTTP/1.1 404) 4 headers in 131 bytes (1 switches on core 0)
>
> Is there any way to avoid this behavior? I want to render 404 page without 
> /ru component
>
> Thnx.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to