title: How to get object at CreatView
body: <p>There is a form that is rendered by url</p>
  
  <pre><code>url(r'kredit/(?P&lt;credit_slug&gt;[-\.\w\d]+)/$', CreditDetail.as_view(), name='credit_detail'),
  </code></pre>
  
  <h1>urls</h1>
  
  <pre><code>url(r'kredit/(?P&lt;credit_slug&gt;[-\.\w\d]+)/$', CreditDetail.as_view(), name='credit_detail'),
  url(r'kredit_request/$', CreditOnlineRequestView.as_view(), name='credit_request'),
  </code></pre>
  
  <p>The form is processed in the <code>CreditOnlineRequestView(CreateView)</code> view.
  It is necessary to pull out the credit_slug from <code>CreditDetail</code> view in it (here the form was drawn)
  ​</p>
  
  <h1>views</h1>
  
  <pre><code>class CreditDetail(FormView):
      form_class = CreditPaymentForm
      template_name = 'credits/credit_detail.html'
  ​
      def get_initial(self):
          initial = super(CreditDetail, self).get_initial()
          initial['request'] = self.request
          return initial
  ​
      def get(self, *args, **kwargs):
          request_form = CreditOnlineRequestForm(self.request.GET or None, prefix="request")
  ​
  ​
  class CreditOnlineRequestView(CreateView):
      form_class = CreditOnlineRequestForm
      model = CreditOnlineRequest
      template_name = 'credits/credit_listing.html'
      prefix = 'request'
  ​
      def form_valid(self, form, **kwargs):
          credit_request = form.save(commit=False)
          credit_request.credit = credit                     #???
          return super(CreditOnlineRequestView, self).form_valid(form)
  ​
      def form_invalid(self, form):
          errors = dict([(k, v[0]) for k, v in form.errors.items()])
          return errors
  </code></pre>
  
  <h1>forms</h1>
  
  <pre><code>class CreditOnlineRequestForm(forms.ModelForm):
      class Meta:
          model = CreditOnlineRequest
          exclude = ['credit']           #this field must be define
  ​
      def __init__(self, *args, **kwargs):
          super(CreditOnlineRequestForm, self).__init__(*args, **kwargs)
          #???
  </code></pre>
  
  <p>What are the options? I think, either through the <code>cache</code>, or through pulling out the <code>previous page</code> to do, but this is somehow not very humane, as for me. The best option, as for me, is to transfer the credit instance to a <code>hidden form field</code> in the <code>CreditDetail</code> view, but I don’t know how to do it yet.</p>