Flask-Dropzone packages Dropzone.js into an extension to add file upload support for Flask. It can create links to serve Dropzone from a CDN and works with no JavaScript code in your application.
Basic Usage
Step 1: Initialize the extension:
from flask_dropzone import Dropzone dropzone = Dropzone(app)
Step 2: In your <head> section of your base template add the following code:
{{ dropzone.load() }}
You can assign the version of Dropzone.js through version argument, the default value is 5.1.1. Step 3: Creating a Drop Zone with create():
{{ dropzone.create(action_view=’upload_view’) }}
Also to edit the action view to yours.
Beautify Dropzone
Style it according to your preferences through style() method:
{{ dropzone.style(‘border: 2px dashed #0087F7; margin: 10%; min-height: 400px;’) }}
More Detail
Go to Github page , which you can check for more details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Flask-Dropzone-1.4.tar.gz.
File metadata
- Download URL: Flask-Dropzone-1.4.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1192017afe473c10389d1fe4789e03e7d3f01df71e1d7dc28f2168233480de22
|
|
| MD5 |
17f04f11c0f6330c89a5f742b1628432
|
|
| BLAKE2b-256 |
b4e2012e3eca27ecd15d8be0b0c811d46b3db0dea2f647fd20fd2123cd3fcca4
|