Does it help?

return super(SampleUpdateView, self).get(request, project_name, *args, 
**kwargs)



W dniu czwartek, 14 września 2017 13:25:06 UTC+2 użytkownik Adrian Jasiński 
napisał:
>
>
>
> When I have in my urlpatterns args and kwargs in any of generic views then 
> the view is loosing args (it's returning empty tuple)
>
> Simple example of url:
>
>
> url(r"^(\w+)/test1/(?P<pk>[0-9]+)/list/$", SamplesUpdateView.as_view(), 
> name='update_view'),
>
>
> Simple code for my view:
>
> class SamplesUpdateView(UpdateView):
>     model = Sample
>
>     def get(self, request, project_name, *args, **kwargs):
>         print("project_name", project_name)
>         return super().get(request, project_name, *args, **kwargs)
>  
>
> It works ok when I pass only args or kwargs into url.
>
>
> THE PROBLEM occurs in ALL generic view (CreateView, UpdateView, 
> DeleteVIew, ListView).
> I can't find it myself why it's happening. I consider it a bug and added 
> ticket for it:
>
> https://code.djangoproject.com/ticket/28587
>
> Any help in this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/657eae49-106d-4b1e-b0c8-076e45d41962%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to