title: Django REST Framework doesn't display value in PUT form
body: <p>Yesterday I posted a <a href="https://stackoverflow.com/questions/47630356/using-the-reserved-word-class-as-field-name-in-django-and-django-rest-framewor">question</a> and found a solution to that problem. The solution however caused another issue.<br />
  Please take a look at the question, so I don't have to duplicate the contents.</p>
  <p>In the Browsable API the value for 'class_name' is not displayed in the PUT form.</p>
  <p>The rendered HTML looks like this:</p>
  <pre><code>&lt;div class=&quot;form-group &quot;&gt;
    &lt;label class=&quot;col-sm-2 control-label &quot;&gt;
      Class
    &lt;/label&gt;
  
    &lt;div class=&quot;col-sm-10&quot;&gt;
      &lt;input name=&quot;class_name&quot; class=&quot;form-control&quot; type=&quot;text&quot;&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>For the other fields it displays the value properly, for example:</p>
  <pre><code>&lt;div class=&quot;form-group &quot;&gt;
    &lt;label class=&quot;col-sm-2 control-label &quot;&gt;
      Order
    &lt;/label&gt;
  
    &lt;div class=&quot;col-sm-10&quot;&gt;
      &lt;input name=&quot;order&quot; class=&quot;form-control&quot; value=&quot;Carnivora&quot; type=&quot;text&quot;&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here are screenshots illustrating the problem:
  <a href="https://i.stack.imgur.com/q5Dgw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q5Dgw.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/P7WPy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P7WPy.png" alt="enter image description here" /></a></p>
  <p>You can see that the value for the key &quot;class&quot; is there. The name of the input element as well the field name in the model is &quot;class_name&quot;.</p>
  <p>I poked around the source code and found out that the form is rendered in the file <code>renderers.py</code> in the following order:</p>
  <ul>
  <li>In the class <code>BrowsableAPIRenderer</code> the method <code>get_context</code> creates the form and calls the method <code>get_rendered_html_form</code>.</li>
  <li>The method <code>get_rendered_html_form</code> calls the method <code>render_form_for_serializer</code>.</li>
  <li>The method <code>render_form_for_serializer</code> calls the method <code>render</code> of the class <code>HTMLFormRenderer</code>.</li>
  </ul>
  <p>But I still don't know where to interfere and what should I change.</p>
  <p>Also I tried to implement the method <code>to_internal_value</code> in the serializer, but this is only for the deserialization and has nothing to do with the form rendering.</p>
  <p>Does anyone have an idea where the problem lies and what could be done?</p>
  <h3>UPDATE</h3>
  <p>I have created GitHub <a href="https://github.com/cezar77/so_question_47654662" rel="nofollow noreferrer">repo</a> with the code. You can clone it or fork it and try to help me.<br />
  Many thanks!</p>