Dropzone.js bindings for Lona
Project description
lona-dropzone
Dropzone.js bindings for Lona
Installation
lona-dropzone can be installed using pip
pip install lona lona-dropzone
Usage
lona-dropzone uses Lonas Bucket API.
lona_dropzone.Dropzone
accepts all arguments of a Lona Bucket to create a new Bucket on the fly.
You can also use a previously created Bucket using the keyword bucket
.
from lona.html import HTML, H1
from lona import View
from lona_dropzone import Dropzone
class DropzoneView(View):
def handle_request(self, request):
self.dropzone = Dropzone(
request=request,
on_add=self.on_add,
on_delete=self.on_delete,
)
return HTML(
H1('Dropzone'),
self.dropzone,
)
def on_add(self, file_names):
print(f'{file_names} added to {self.dropzone.bucket.get_path()}')
def on_delete(self, file_names):
print(f'{file_names} deleted from {self.dropzone.bucket.get_path()}')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lona-dropzone-0.1.tar.gz
(201.1 kB
view details)
Built Distribution
lona_dropzone-0.1-py3-none-any.whl
(210.3 kB
view details)
File details
Details for the file lona-dropzone-0.1.tar.gz
.
File metadata
- Download URL: lona-dropzone-0.1.tar.gz
- Upload date:
- Size: 201.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4166c0fc5ac619b27e8e3c60d85bb506c588cbe384b4c3df26ebd4f9db84044 |
|
MD5 | 933d90823834150ade21167c52566bb2 |
|
BLAKE2b-256 | 50036132413f523fd2d54e005547bc7df40e153777c3dd3b04f89211535cc2ad |
File details
Details for the file lona_dropzone-0.1-py3-none-any.whl
.
File metadata
- Download URL: lona_dropzone-0.1-py3-none-any.whl
- Upload date:
- Size: 210.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6df0ba3b7697ceecef597253a49ad80747cee15a192b86d62594243628c56854 |
|
MD5 | 4d83c49138ee61006d5471e04594a2f8 |
|
BLAKE2b-256 | 9fceafc1f3a28b3667a89855adc27a9eb8a15f9205b70275ed1b15bdc359fc40 |