├── examples ├── basic │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── csrf │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── in-form │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── click-upload │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── large-file │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── complete-redirect │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── custom-options │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── multiple-dropzone │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── parallel-upload │ ├── uploads │ │ └── .gitkeep │ ├── templates │ │ └── index.html │ └── app.py ├── requirements.txt └── README.rst ├── docs ├── changelog.rst ├── examples.rst ├── _static │ ├── flask-dropzone.png │ └── flask-dropzone-small.png ├── _templates │ ├── sidebarlogo.html │ └── sidebarintro.html ├── _themes │ ├── flask │ │ ├── theme.conf │ │ ├── relations.html │ │ ├── layout.html │ │ └── static │ │ │ └── flasky.css_t │ ├── flask_small │ │ ├── theme.conf │ │ ├── layout.html │ │ └── static │ │ │ └── flasky.css_t │ ├── README │ ├── LICENSE │ └── flask_theme_support.py ├── api.rst ├── Makefile ├── make.bat ├── index.rst ├── basic.rst ├── advanced.rst ├── conf.py └── configuration.rst ├── docs_requirements.txt ├── MANIFEST.in ├── test_requirements.txt ├── resources └── validation.png ├── setup.cfg ├── tox.ini ├── flask_dropzone ├── utils.py ├── static │ └── dropzone.min.css └── __init__.py ├── README.md ├── LICENSE.txt ├── setup.py ├── .github └── workflows │ └── tests.yaml ├── README.rst ├── .gitignore ├── CHANGES.rst └── test_flask_dropzone.py /examples/basic/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/csrf/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/in-form/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/click-upload/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/large-file/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/complete-redirect/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/custom-options/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/multiple-dropzone/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/parallel-upload/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/changelog.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CHANGES.rst 2 | -------------------------------------------------------------------------------- /docs_requirements.txt: -------------------------------------------------------------------------------- 1 | flask-sphinx-themes 2 | . 3 | -------------------------------------------------------------------------------- /docs/examples.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../examples/README.rst 2 | -------------------------------------------------------------------------------- /examples/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | Flask-Dropzone 3 | Flask-WTF -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | graft flask_dropzone/static 2 | include *.txt, *.md, *.rst 3 | -------------------------------------------------------------------------------- /test_requirements.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | flake8 3 | flask-wtf 4 | setuptools 5 | -------------------------------------------------------------------------------- /resources/validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helloflask/flask-dropzone/main/resources/validation.png -------------------------------------------------------------------------------- /docs/_static/flask-dropzone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helloflask/flask-dropzone/main/docs/_static/flask-dropzone.png -------------------------------------------------------------------------------- /docs/_static/flask-dropzone-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helloflask/flask-dropzone/main/docs/_static/flask-dropzone-small.png -------------------------------------------------------------------------------- /docs/_templates/sidebarlogo.html: -------------------------------------------------------------------------------- 1 |
5 | -------------------------------------------------------------------------------- /docs/_themes/flask/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = flasky.css 4 | pygments_style = flask_theme_support.FlaskyStyle 5 | 6 | [options] 7 | index_logo = '' 8 | index_logo_height = 120px 9 | touch_icon = 10 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | license_file = LICENSE.txt 3 | 4 | [bdist_wheel] 5 | universal = 1 6 | 7 | [coverage:run] 8 | source = flask_dropzone 9 | branch = true 10 | 11 | [flake8] 12 | exclude = static, build, docs 13 | max-line-length = 119 14 | -------------------------------------------------------------------------------- /docs/_themes/flask_small/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | stylesheet = flasky.css 4 | nosidebar = true 5 | pygments_style = flask_theme_support.FlaskyStyle 6 | 7 | [options] 8 | index_logo = '' 9 | index_logo_height = 120px 10 | github_fork = '' 11 | -------------------------------------------------------------------------------- /docs/api.rst: -------------------------------------------------------------------------------- 1 | API Reference 2 | ============== 3 | 4 | Dropzone Object in Template 5 | ---------------------------- 6 | .. module:: flask_dropzone 7 | 8 | .. autoclass:: _Dropzone 9 | :members: 10 | :undoc-members: 11 | 12 | Utils 13 | ----- 14 | 15 | .. module:: flask_dropzone.utils 16 | 17 | .. autofunction:: get_url 18 | .. autofunction:: random_filename 19 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py37, py38, py39, py310, py311, py312, lint 3 | skip_missing_interpreters = true 4 | skipsdist = true 5 | 6 | [testenv] 7 | deps = 8 | -r test_requirements.txt 9 | commands = 10 | coverage run --source=flask_dropzone setup.py test 11 | coverage report 12 | 13 | [testenv:lint] 14 | deps = 15 | flake8 16 | commands = 17 | flake8 flask_dropzone test_flask_dropzone.py 18 | -------------------------------------------------------------------------------- /examples/csrf/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |3 | Upload files in Flask application with Dropzone.js. 4 |
5 |
19 | {% endif %}
20 | {% endblock %}
21 | {% block sidebar1 %}{% endblock %}
22 | {% block sidebar2 %}{% endblock %}
23 |
--------------------------------------------------------------------------------
/docs/_themes/flask/layout.html:
--------------------------------------------------------------------------------
1 | {%- extends "basic/layout.html" %}
2 | {%- block extrahead %}
3 | {{ super() }}
4 | {% if theme_touch_icon %}
5 |
6 | {% endif %}
7 |
8 | {% endblock %}
9 | {%- block relbar2 %}{% endblock %}
10 | {% block header %}
11 | {{ super() }}
12 | {% if pagename == 'index' %}
13 | Upload completed.
' 40 | 41 | 42 | if __name__ == '__main__': 43 | app.run(debug=True) 44 | -------------------------------------------------------------------------------- /examples/basic/app.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | :author: Grey Li