#28587: All Generic Views are loosing args when you pass args and kwargs into
urlpattern
-------------------------------------+-------------------------------------
     Reporter:  Adrian               |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Generic views        |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:  ListView, CBV,       |             Triage Stage:
  generic,                           |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

 Based on the documentation, I'm not sure if this is a bug. There's
 [https://docs.djangoproject.com/en/dev/topics/http/urls/#the-matching-
 grouping-algorithm a note] that says, "Here’s the algorithm the URLconf
 parser follows, with respect to named groups vs. non-named groups in a
 regular expression: If there are any named arguments, it will use those,
 ignoring non-named arguments." which seems to be what's happening here.
 The behavior isn't specific to generic views. If you use a function-based
 view, you'll see the same thing.

 I'm not sure the reason for that behavior and if changing it is feasible,
 but it does seem unintuitive. On the other hand, is there a reason you
 must mix args and kwargs in the URL pattern? Do you want to look into
 writing a patch?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28587#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.07e7d115d975f9986c750b2a7c6bc858%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to