Re: RedirectView supporting View-Names

2012-11-25 Thread Ludwig Kraatz
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 (..

Re: RedirectView supporting View-Names

2012-11-23 Thread Simon Meers
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

RedirectView supporting View-Names

2012-11-23 Thread Ludwig Kraatz
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