title: Django how to set value of hidden input in template
body: <p>How to set value of <code>who</code> and <code>image</code> in template?</p>
  
  <pre><code>class CommentForm(ModelForm):
      who = forms.CharField(widget=forms.HiddenInput())
      image = forms.ImageField(widget=forms.HiddenInput())
  
      class Meta:
          model = Comments
          fields = ['who', 'image', 'content']
  </code></pre>
  
  <p>It doesn't work (raw text):</p>
  
  <pre><code>&lt;form method='POST' action=''&gt;
      {% csrf_token %}
      {% render_field comment_form.content class="form-control form-control-sm" placeholder='Comment..' %}
      {% render_field comment_form.who class="form-control form-control-sm" value='{{ request.user.profile.pk }}' %}
      {% render_field comment_form.image class="form-control form-control-sm" value='{{ image.pk }}' %}
      &lt;input class="btn btn-primary btn-sm" type="submit" value="Add comment"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My <code>views.py</code>:</p>
  
  <pre><code>class ProfileView(DetailView):
      comment_form = CommentForm()
      queryset = Profile.objects.all()
      context_object_name = 'me'
      template_name = 'profile.html'
  
      def get_context_data(self, **kwargs):
          context = super(ProfileView, self).get_context_data(**kwargs)
          context['comment_form'] = self.comment_form
          return context
  </code></pre>