/ / Dropzone-Formular wird nicht angezeigt - Django, Dropzone.js

Das Dropzone-Formular wird nicht angezeigt - django, dropzone.js

Ich versuche, das Dropzone-Formular einer Django-Vorlage hinzuzufügen, und es wird nicht angezeigt. Ich habe mit Djangos statisch importiert und den Ordner dist aus heruntergeladen http://www.dropzonejs.com/ und verwendet

<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>

wie von der Website angewiesen.

<html>
{% extends "base.html" %}
{% block head %}
<head>
{% load staticfiles %}
<script src="{% static "/dropzone/dropzone.js" %}"></script>
<link href="{% static "/dropzone/dropzone.css" %}" rel="stylesheet">
<link href="{% static "/dropzone/basic.css" %}" rel="stylesheet">
</head>
{% endblock %}

{% block body %}
<body>

<form action="/file-upload" class="dropzone" id="my-awesome-dropzone">

</form>
</body>
{% endblock %}
</html>

Ich weiß, es ist kein Problem mit Static in Django, da ich Bootstrap mit Static in diesem Projekt arbeite.

Antworten:

0 für die Antwort № 1

Versuchen Sie, die Dropzone mit Jquery zu initialisieren

 <script>
$(".dropzone").dropzone();
</script>