===============
Flask-Dropzone
===============
Flask-Dropzone packages `Dropzone.js
<http://dropzonejs.com>`_ 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.
NOTICE: This extension is built for simple usage, if you need more flexibility, please use Dropzone.js directly.
Basic Usage
-----------
Step 1: Initialize the extension:
.. code-block:: python
from flask_dropzone import Dropzone
dropzone = Dropzone(app)
Step 2: In your `<head>` section of your base template add the following code::
<head>
{{ dropzone.load_css() }}
</head>
<body>
...
{{ dropzone.load_js() }}
</body>
You can assign the version of Dropzone.js through `version` argument, the default value is `5.2.0`.
Step 3: Creating a Drop Zone with `create()`, and configure it with `config()`::
{{ dropzone.create(action='the_url_which_handle_uploads') }}
...
{{ dropzone.config() }}
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 `Documentation
<https://flask-dropzone.readthedocs.io/en/latest/>`_ , which you can check for more
details.
Raw data
{
"_id": null,
"home_page": "https://github.com/helloflask/flask-dropzone",
"name": "Flask-Dropzone",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "flask extension development upload",
"author": "Grey Li",
"author_email": "withlihui@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/02/77/1d3f061d38460346e703399251f5fef3b820306f8dad5d8a4f8d3aae32b6/Flask-Dropzone-2.0.0.tar.gz",
"platform": "any",
"description": "===============\nFlask-Dropzone\n===============\n\nFlask-Dropzone packages `Dropzone.js\n<http://dropzonejs.com>`_ into an extension to add file upload support for Flask.\nIt can create links to serve Dropzone from a CDN and works with no JavaScript code in your application.\n\nNOTICE: This extension is built for simple usage, if you need more flexibility, please use Dropzone.js directly.\n\nBasic Usage\n-----------\n\nStep 1: Initialize the extension:\n\n.. code-block:: python\n\n from flask_dropzone import Dropzone\n\n dropzone = Dropzone(app)\n\n\nStep 2: In your `<head>` section of your base template add the following code::\n\n <head>\n {{ dropzone.load_css() }}\n </head>\n <body>\n ...\n {{ dropzone.load_js() }}\n </body>\n\nYou can assign the version of Dropzone.js through `version` argument, the default value is `5.2.0`.\nStep 3: Creating a Drop Zone with `create()`, and configure it with `config()`::\n\n {{ dropzone.create(action='the_url_which_handle_uploads') }}\n ...\n {{ dropzone.config() }}\n\nAlso to edit the action view to yours.\n\nBeautify Dropzone\n-----------------\n\nStyle it according to your preferences through `style()` method::\n\n {{ dropzone.style('border: 2px dashed #0087F7; margin: 10%; min-height: 400px;') }}\n\nMore Detail\n-----------\n\nGo to `Documentation\n<https://flask-dropzone.readthedocs.io/en/latest/>`_ , which you can check for more\ndetails.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Upload files in Flask with Dropzone.js.",
"version": "2.0.0",
"project_urls": {
"Homepage": "https://github.com/helloflask/flask-dropzone"
},
"split_keywords": [
"flask",
"extension",
"development",
"upload"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ca275c26b675fc1552447e0f4ad46ec02ccdf3597c4b423ff6c9edb1d8bcb9bb",
"md5": "4d2f6192087223d74a540037a994d939",
"sha256": "332582669358c9ffda10a96fc986c65b993483cb87a4d7536e4256244f0e3a15"
},
"downloads": -1,
"filename": "Flask_Dropzone-2.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "4d2f6192087223d74a540037a994d939",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 46317,
"upload_time": "2024-02-18T05:37:22",
"upload_time_iso_8601": "2024-02-18T05:37:22.081959Z",
"url": "https://files.pythonhosted.org/packages/ca/27/5c26b675fc1552447e0f4ad46ec02ccdf3597c4b423ff6c9edb1d8bcb9bb/Flask_Dropzone-2.0.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "02771d3f061d38460346e703399251f5fef3b820306f8dad5d8a4f8d3aae32b6",
"md5": "6c2becd91d829b89fb65df8c5db10dff",
"sha256": "99e116db81d598438e8a985694f7748937315f99ed4c9f4a620b75a97c59ab8e"
},
"downloads": -1,
"filename": "Flask-Dropzone-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "6c2becd91d829b89fb65df8c5db10dff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47537,
"upload_time": "2024-02-18T05:37:23",
"upload_time_iso_8601": "2024-02-18T05:37:23.836035Z",
"url": "https://files.pythonhosted.org/packages/02/77/1d3f061d38460346e703399251f5fef3b820306f8dad5d8a4f8d3aae32b6/Flask-Dropzone-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-18 05:37:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "helloflask",
"github_project": "flask-dropzone",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"test_requirements": [],
"tox": true,
"lcname": "flask-dropzone"
}