title: Passing a parameter to a class based view from a redirect
body: <p>I have a class based view (<code>RegistrationView</code>) which I'd like to pass a parameter value to upon redirect, as per the following.</p>
  
  <pre><code># views.py
  def hook(request):
      return HttpResponseRedirect(reverse('registration_register',
                                      kwargs={'initial': {'email': 'user@example.com'}}))
  </code></pre>
  
  <p>Where my accompanying URL pattern for this is defined as:</p>
  
  <pre><code># urls.py
  urlpatterns = [
      url(r'^account/register/$',
          RegistrationView.as_view(form_class=RegistrationForm), 
          name='registration_register'),
  ]
  </code></pre>
  
  <p>And <em>initial</em> is a valid parameter value in <code>RegistrationView</code>.</p>
  
  <p>However, when I run this, I hit the following error, as I have not defined the argument in my urls (and I don't want to have to define the parameter in the url path if possible).</p>
  
  <blockquote>
    <p>Reverse for 'registration_register' with arguments '()' and keyword arguments '{'initial': {'email': 'user@example.com'}}' not found. 1 pattern(s) tried: ['account/register/$']</p>
  </blockquote>
  
  <p>I came across the following <a href="https://stackoverflow.com/questions/25947125/httpreponse-redirect-to-class-based-view">query</a> which discusses passing keyword arguments to class based views, however, I have not been able to get it to work with the above code. </p>
  
  <p>Conceptually what I am trying to achieve is the equivalent of the below, except using a <code>HttpRedirect</code> instead of generating a straight response.</p>
  
  <pre><code>def hook(request):
      return RegistrationView.as_view(
           form_class=RegistrationForm, initial={'email': 'user@example.com'})(request)
  </code></pre>
  
  <p>Is anyone able to advise how I can redirect to my view with this <em>initial</em> parameter value?</p>