[Answered ]-Django-registration class-based views with different templates and parameters

2👍

Variable template name can be passed to a TemplateView class in two ways:

  • redefining get_template_names method

Returns a list of template names to be used for the request. Must return a list. May not be called if render_to_response is overridden.

  • passing template_name to as_view method:
TemplateView.as_view(template_name='some_template_name')

Last option is to overwrite get_success_url method of RegistrationView class, which by default is simply (omitting docstring)

def get_success_url(self, request, user):
    return ('registration_complete', (), {})

But from your question I can’t guess where from template_name have to be passed.

👤alko

Leave a comment