﻿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
27063	i18n_patterns() matches too much of the URL as the language code	Keith Hackbarth	nobody	"I'm having two issues on using a regex based url pattern with ""prefix_default_language"" that I was hoping to shed some insight on. 

My url.py file:

{{{
urlpatterns += i18n_patterns(
    url(r'^(?P<city>.+-parking)/?$', CityView.as_view()),
    prefix_default_language=False
)
}}}

Issue 1: Regex that also match language prefixs

If a city that matches my regex but begins with a language prefix, it shows a 404. 
For example: ""/de-moines-parking"" shows a 404. But ""de/de-moines-parking"" returns a 200. Also, cities that don't match one of my enabled languages match as well ""/boise-parking"" for example.

Issue 2: Stacking

Also the urls will stack languages, for example, ""/de/fr/it/de-moines-parking"" is loading a successful page instead of a 404.

Any insight? Is this a bug or am I missing something obvious in my regex? Prior to Django 1.10, I used solid_i18n_patterns plugin and did not have these issues. I posted on #django-users but no one responded.

Thanks in advance,

Keith"	Bug	closed	Internationalization	1.10	Normal	fixed		Krzysztof Urbaniak	Ready for checkin	1	0	0	0	0	0
