Hi,
so I should read more carefully :)) I use Django for two years but I don't
remember that I saw the reverse_lazy function before :) Yes, you can
override it but it is not very DRY.
Thanks,
Martin
On Sun, 08 Apr 2012 23:53:01 +0200, Andrew Ingram
wrote:
Hi
Hi Martin,
There are (as of Django 1.4) already two solutions to this:
1 - override get_success_url(). the default behaviour of this method is to just
return self.success_urll, but obviously it can be modified to return whatever
you like
2 - use reverse_lazy (Django 1.4) instead of reverse
Hello,
I just started to use class based views and I came to the CreateView and
success_url argument. This argument has to be string what leads to typing
URLs in views instead of using reverse() function (you have no access to
urls through reverese() in view initialization). I think (if