How can be shown manyTomany field values into a single text box in django template
<p>I want to show manytomany field value into a single  input textbox in django template.
My output is
ABC /n
Abc /n
BVC /n</p>

<p>i want like ABC ,Abc,BVC</p>

<p>my code sample is this</p>

<pre><code>    &lt;div class='col-sm-8'&gt;
{% for car in cars %}&lt;br/&gt;
      &lt;input type='text' class='form-control' name='cars' placeholder='Select cars' value= {{car}}&gt; 
{% endfor %}
      &lt;/div&gt;
</code></pre>

<p>I want to show the output in Textbox field</p>

<p>You can do it:</p>

<p>from python: (views.py)</p>

<pre><code>...
data_input = ', '.join([car for car in cars])
...
</code></pre>

<p>and in your template:</p>

<pre><code>  &lt;div class='col-sm-8'&gt;
     &lt;input type='text' class='form-control' name='cars' placeholder='Select cars' value= "{{ data_input }}"&gt; 
  &lt;/div&gt;
</code></pre>

python html django