Opened 7 years ago

Last modified 7 years ago

#28587 closed Bug

ListView cleaning ar — at Initial Version

Reported by: Adrian Owned by: nobody
Component: Generic views Version: 1.11
Severity: Normal Keywords: ListView, CBV, generic,
Cc: Adrian Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When I have in my urlpatterns args and kwargs the ListView is loosing args (it's returning empty tuple)

url(r"^(\w+)/test1/(?P<pk>[0-9]+)/list/$", SamplesListView.as_view(), name='list_view'),

Simple code for my view:

class SamplesListView(ListView):
    model = Sample
    template_name = 'samples/samples_list.html'

    def get(self, request, project_name, *args, **kwargs):
        print("project_name", project_name)
        return super().get(self, request, project_name, *args, **kwargs)

It works ok when I pass only args or kwargs into url.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top