[Answered ]-Django-registration and activation failure

2👍

Here is the docstring for the function activate:

On unsuccessful activation, will render the template
registration/activate.html to display an error message; to
override thise, pass the argument template_name (see below).

The default url captured:

              url(r'^activate/(?P<activation_key>\w+)/$',
                   activate,
                   {'backend': 'registration.backends.default.DefaultBackend'},
                   name='registration_activate'),

On success, the activate view redirects to a success URL, therefore the only purpose of the activate.html template is on failure.

Update: looking at the instructions, it even says this explicitly in the “templates required” section:

registration/activate.html

Used if account activation fails. With
the default setup, has the following
context:

activation_key
The activation key used during the activation attempt.

0👍

I think django-registration does not handle this properly. Perhaps it is a good idea to file a bug with the upstream code.

Had a to write some template code here as a work around.
https://github.com/arky/pootle/commit/8e7f771499206cb6c636a80bc8156db1ecd722b1

👤Arky

Leave a comment