i'm triying to use dropzone in my django app, I followed many examples but none of them worked for me can you please help me
Js code :
<script src="https://code.jquery.com/jquery-1.12.4.min.js"
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.3.0/min/dropzone.min.css" rel="stylesheet" type="text/css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.3.0/min/dropzone.min.js" type="text/javascript"></script>
<script type="text/javascript">
Dropzone.autoDiscover = false;
$(document).ready(function(){
$('#myDropzone').dropzone({
url: "{% url 'dashboard/import' %}",
addRemoveLinks: true,
success: function (file, response) {
console.log("Successfully uploaded");
},
error: function (file, response) {
console.log("something goes wrong");
}
});
});
</script>
HTML code :
<form action="{% url 'dashboard/import' %}" class="dropzone">
{% csrf_token %}
</form>
I've got an TypeError: $(...).dropzone is not a function