Closed c0per closed 4 years ago
Actually, you can set the variable before pass it to custom_init
in Jinja with {% set %}
. What's your JS code look like?
Ah I see. It's some js preloading images already stored on server, when editing images for a specific item.
btw I'm starting to use Flask based on your book. Keep up the great works. It's a good book for beginners.
I want to use some custom init in dropzone. I can only come up with only one bad way. Since Jinja doesn't support statements (if, for) in
{{ dropzone.config(custom_init = '') }}
because it's a variable, I have to put up some js code using python in Flask view functions. Any better way?