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 hashes)
Built Distribution
lona_dropzone-0.1-py3-none-any.whl
(210.3 kB
view hashes)
Close
Hashes for lona_dropzone-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6df0ba3b7697ceecef597253a49ad80747cee15a192b86d62594243628c56854 |
|
MD5 | 4d83c49138ee61006d5471e04594a2f8 |
|
BLAKE2b-256 | 9fceafc1f3a28b3667a89855adc27a9eb8a15f9205b70275ed1b15bdc359fc40 |