Chive / django-multiupload

Dead simple drop-in multi file upload field for Django forms using HTML5's multiple attribute.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: render() got an unexpected keyword argument 'renderer'

Dheirya opened this issue · comments

My form is:

class CreateTest(forms.ModelForm):

    attachments = MultiFileField(min_num=1, max_num=3, max_file_size=1024*1024*5)

When trying out the package, I got this type error:

Request Method: GET
Request URL: http://127.0.0.1:8000/post/s/new/

Template error:
In template /Users/vaibhav/PycharmProjects/social_app_blog_deploy/venv/lib/python3.8/site-packages/crispy_forms/templates/bootstrap4/field.html, error at line 42
   render() got an unexpected keyword argument 'renderer'
   32 :                     {% crispy_field field 'class' 'form-check-input' %}
   33 :                 {% endif %}
   34 :                 <label for="{{ field.id_for_label }}" class="{%if use_custom_control%}custom-control-label{% else %}form-check-label{% endif %}{% if field.field.required %} requiredField{% endif %}">
   35 :                     {{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
   36 :                 </label>
   37 :                 {% include 'bootstrap4/layout/help_text_and_errors.html' %}
   38 :             {% elif field|is_file and use_custom_control  %}
   39 :                 {% include 'bootstrap4/layout/field_file.html' %}
   40 :             {% else %}
   41 :                 <div class="{{ field_class }}">
   42 :                      {% crispy_field field %} 
   43 :                     {% include 'bootstrap4/layout/help_text_and_errors.html' %}
   44 :                 </div>
   45 :             {% endif %}
   46 :         {% endif %}
   47 :     </{% if tag %}{{ tag }}{% else %}div{% endif %}>
   48 :     {% if field|is_checkbox %}
   49 :         {% if label_class %}
   50 :             </div>
   51 :         {% endif %}
   52 :         </div>

Exception Type: TypeError at /post/s/new/
Exception Value: render() got an unexpected keyword argument 'renderer'

Resolved in 4937d69