﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17734	302 redirect to standard language for non-i18n URL's when returning 404.	petar@…	Jannis Leidel	"I'm using [Tastypie] to supply an API for my project. This API should be a language independent URI, while some other applications have language dependent URI's. This leaves me with the following URLConf:

{{{
from django.utils.translation import ugettext_lazy as _
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls.i18n import i18n_patterns

urlpatterns = patterns('',
    url(r'^api/', include(v1_api.urls)),
)

urlpatterns += i18n_patterns('',
    url(_(r'^something/'), include('something.urls')),
)
}}}

When I raise a `404` in the API, the `LocaleMiddleware` detects this and tries to redirect to `/en/api/[..]`. I think this happens because `is_language_prefix_patterns_used` always returns `True` because it loops through '''all''' the URL's in the URLConf and finds a locale URL. However, the URL for the API is not an Locale URL.

[Tastypie]: https://github.com/toastdriven/django-tastypie"	Bug	closed	Internationalization	dev	Release blocker	fixed	urlconf, i18n	Orne Brocaar Jannis Leidel	Accepted	1	0	0	0	0	0
