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 there is no
better way) that this parameter should accept callable too and something
like this would be possible:
class MyView(CreateView):
success_url = lambda: reverse(
'foo:bar'
)
Should I create a feature request ticket or should I read the docs more
carefully? :)
Kind regards,
Martin Tirsel
--
You received this message because you are subscribed to the Google Groups "Django
developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.