title: How do I pass an additional object to a Django form so I can render some fields in the template?
body: <p>I have a form in Django where site visitors can submit "gear" to be included in a person's set of gear. Here's the URL to the change form:</p>
  
  <pre><code># urls.py
  
  path('person/&lt;slug:slug&gt;/gear/submit/', GearSubmitView.as_view(), name='forms/submit_gear'),
  </code></pre>
  
  <p>You can see that the person for whom the gear is being submitted is represented by a slug in the URL.</p>
  
  <p>Here's the first part of the <code>CreateView</code>:</p>
  
  <pre><code># views.py
  
  class GearSubmitView(LoginRequiredMixin, CreateView):
      """Allows for third-party submissions for a pro's gear collection."""
      template_name = 'forms/submit_gear.html'
      form_class = GearSubmitForm
      success_message = 'Success: Submission added.'
  </code></pre>
  
  <p>And the form:</p>
  
  <pre><code># forms.py
  
  class GearSubmitForm(forms.ModelForm):
      class Meta:
          model = PersonProduct
          fields = ['product', 'version', 'setup_note', 'usage_start_date', 'evidence_link', 'evidence_text']
  </code></pre>
  
  <p>where <code>PersonProduct</code> is a junction table between my <code>Person</code> and <code>Product</code> models.</p>
  
  <p>And the template:</p>
  
  <pre><code># submit_gear.html
  
  {% extends '_base.html' %}
  {% load crispy_forms_tags %}
  
  {% block content %}
      &lt;div class="container"&gt;
          &lt;h2 id="content-header"&gt;Submit Gear For {{ person.full_name }}&lt;/h2&gt;
          {% crispy form %}
      &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <p>where you can see what I'm trying to do. <strong>I want to insert the name of the person represented by the slug in the URL in the form template</strong>.</p>
  
  <p>How can I do it?</p>