Well, ... I know about reverse_lazy
Sorry for not explaining myself good enough:
reverse_lazy can't do:
url( 'bar/foo/(?P[0-9]*)/', *RedirectView*( url=
*reverse_lazy*('foo_stuff')
),
url( 'foo/(?P[0-9]*)/', some_view_func, name = 'foo_stuff' ),
What a RedirectView supporting URL Names (..
See https://code.djangoproject.com/ticket/15273
On 23 November 2012 23:30, Ludwig Kraatz wrote:
> Hi,
>
> is there a specific reason why the RedirectView does not have a
> "view_name" attribute and out-of-the-box supporting to reverse it?
>
> if self.url:
> url = self.url
> elif self.v
Hi,
is there a specific reason why the RedirectView does not have a "view_name"
attribute and out-of-the-box supporting to reverse it?
if self.url:
url = self.url
elif self.view_name:
url = reverse(self.view_name, kwargs=kwargs, request=request)
else:
return None
best rega