#29842: For some reason self.client.get("/") return a Resolve404 error even with
the LocaleMiddleware
-------------------------------+--------------------------------------
     Reporter:  Rémy Hubscher  |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  closed
    Component:  Uncategorized  |                  Version:  2.1
     Severity:  Normal         |               Resolution:  worksforme
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by Rémy Hubscher):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Ok I build an app from scratch with Django master and I tried to reproduce
 without success so far.


 {{{
 from django.conf.urls import url
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib import admin
 from django.http import HttpResponse, Http404
 from django.urls import path


 def index(request):
     return HttpResponse("ok")


 def handle_url(request, wordpress_url):
     raise Http404("No mapping found for {}".format(wordpress_url))


 urlpatterns = [
     url(r'^admin/', admin.site.urls),
 ]

 urlpatterns += i18n_patterns(
     path("", index, name="index"),
 )

 urlpatterns += [path("<path:wordpress_url>", handle_url)]

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29842#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.8e316b92fa2a8cf86ff84a494ee8f0eb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to