How to retrieve parameters in Class based view from HttpResponseRedirect (reverse ())

Hello everyone
I have a problem in my code, I have been looking for the error for weeks without success.
In my birth declaration form, I want us to be able to call up the parent registration form to register parents before if this was not done, and return to the declaration form when completed
To do this, in my template, I use

“javascript: submitForm (’{% url’ gestciv: save_reg_form_to_session ‘’ gestciv: registration_add ‘%}’)” title = "{% trans ‘Register’%}

this is declared in my url.py:

url (r’save_reg_form_to_session/(?P<dest_url> \ S +) / $ ‘, views.save_registration_form_to_session, name =’ save_reg_form_to_session ')

views.py:
“” "

def save_registration_form_to_session (request, dest_url):
“”"
View called from within the birth page to add either a father or a mother
“” "
service_post = request.POST.copy ()
service_post [‘mother’] = [item for item in service_post [‘mother’]. split (’|’) if item]
request.session [‘service_post_form’] = service_post

return HttpResponseRedirect (reverse (dest_url, args = [‘redirect_to_service’]))

This function calls the CBV RegistrationCreateView to register the parents:
class RegistrationCreateView (EntityCreateView):
template_name = ‘gestciv / registration_detail.html’
model = Registration
form_class = RegistrationForm

def get_success_url (self):
      if self.kwargs.get ('redirect_to_service', None) is not None:
    # We created the registration from the birth # page
        service_post = self.request.session ['service_post_form']
        service_post ['mother']. append (self.object.id)
        self.request.session ['service_post_form'] = service_post
        return reverse ('gestciv: nbirth_add', args = ['from_external_page'])
    return super (). get_success_url ()

But whatever I do, I never fit in the block:
if self.kwargs.get (‘redirect_to_service’, None) is not None: