Pull requests

#57 Declined
Repository
alasdair
Branch
success_url
Repository
ubernostrum
Branch
default

Allow changing of success_url for simple and default backends

Author
  1. Alasdair Nicol
Reviewers
Description

The docs for the default backend suggest you should be able to set success_url for its RegistrationView or subclasses.

Upon successful registration – not activation – the default redirect is to the URL pattern named registration_complete; this can be overridden in subclasses by changing success_url or implementing get_success_url()

However, the get_success_url method does not check the value of self.success_url.

This pull request allows setting success_url in the RegistrationView and ActivationView for the base views, and simple and default backends.

I have updated the docs as required, but the pull request still requires tests. I would be happy to write tests if you are happy with the approach I have taken in the patch.

For the tests, I was planning to add test urls to https://bitbucket.org/ubernostrum/django-registration/src/8f242e35ef7c004e035e54b4bb093c32bf77c29f/registration/tests/urls.py?at=default. However, the current url patterns in the file appear to be for the function based views, and are not currently used in any tests. Should I convert them to use the new class based views and write tests to exercise them, or can I remove them, and simply add urls to test my success_url changes?

  • Learn about pull requests

Comments (0)