Django 1.10 shows a square bracket in display of the form
<p>I'm quite new to django and i'm now creating my forms for uploading data in the database. I'm using django 1.10 and python 2.7</p>

<p>I have a upload.html in my templates. And then i </p>

<pre><code>&lt;div class="form"&gt;]
    &lt;form method="post" action="{% url 'upload' %}" enctype=multipart/form-data &gt;
        {% csrf_token %}
        &lt;!-- This line inserts a CSRF token. --&gt;
        &lt;table&gt;
            {{ form.as_table }}
            &lt;!-- This line displays lines of the form. --&gt;
        &lt;/table&gt;
        &lt;p&gt;&lt;input type="submit" value="Create" /&gt;&lt;/p&gt;
    &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>A part of my forms.py</p>

<pre><code>class Form_inscription(forms.Form):
     study = forms.ModelChoiceField(label="Choose the study of the database file", queryset=Study.objects.all(),
                               initial=Study.objects.all()[:1].get().id)
     databasefile = forms.FileField(label="Database file")
     assay = forms.ModelChoiceField(label="Choose the assay", queryset=LookUpAssay.objects.all(),
                               initial=LookUpAssay.objects.all()[:1].get().id)

     readout = forms.ChoiceField(label="Choose the readout, choose --- if assay contains all readouts", choices=readouttuple)
     rawdatafile = forms.FileField(label ="Choose the raw data file")
</code></pre>

<p>It then displays this with the square bracket. and i have no idea why. </p>

<p>]</p>

<p>Choose the study of the database file:<br>
Database file:<br>
Choose the assay:<br>
Choose the readout, choose --- if assay contains all readouts:<br>
Choose the raw data file:</p>

<p>Could someone shed a light on this weird problem?
Thanks in advance,
Dani</p>

<p>Its not your form, its your html. Theres a square bracket lurking somewhere in there:</p>

<pre><code>&lt;div class="form"&gt;] 
#                 ^
</code></pre>

python django django-forms