I can succesfully Upload a file using:
<form method="post" enctype="multipart/form-data">.
However I can not combine this method with logging in my user.
I want to login my user using the render_form method:
{{ render_form(form, novalidate=True)}}
However, I can't find a way to support uploading a file with this method.
I can succesfully Upload a file using:
<form method="post" enctype="multipart/form-data">.
However I can not combine this method with logging in my user.
I want to login my user using the render_form method:
{{ render_form(form, novalidate=True)}}
However, I can't find a way to support uploading a file with this method.
{% macro render_form(form, action) %}
{% from "_formhelpers.html" import render_field %}
<div id="Product" class="variant-block" style="display: block;">
{% from "_formhelpers.html" import render_field %}
{% import "bootstrap/wtf.html" as wtf %}
{{ wtf.quick_form(form,enctype="multipart/form-data") }}
</div>
{% endmacro %}
More info. here: https://bootstrap-flask.readthedocs.io/en/stable/macros/