a package on top of flask-assets
Project description
flask-topassets
a package on top of flask-assets for plugin
installation
pip install flask_topassets
usage
# e.g. in flask-tomselect
from flask_topassets import TopAssets
# used in flask-tabler import
CLASS_NAME = "TomSelect"
class TomSelect(TopAssets):
def __init__(self, app=None) -> None:
if app:
self.init_app(app)
def init_app(self, app) -> None:
self.prepare(app, "tomselect")
self.bundle_js("tom-select.complete.min.js")
self.bundle_css("tom-select.tabler.min.css")
# in templates head
{{ tomselect.get_path("css") }}
# output is:
# <link rel="stylesheet" href="/tomselect/select/tom-select.tabler.min.css" />
# for javascript
{{ tomselect.get_path("js") }}
# output is:
# <script type="text/javascript" src="/tomselect/select/tom-select.complete.min.js"></script>
{% from "tomselect/helpers.html" import js_tomselect %}
<div class="mb-3">
<div class="form-label">Select</div>
<select class="form-select" id="demo" name="demo">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</div>
{{ js_tomselect("demo", plugins=["remove_button", "clear_button"]) }}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_topassets-0.1.0.20250915.tar.gz.
File metadata
- Download URL: flask_topassets-0.1.0.20250915.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d1fa45967825f62c5dd98fff598e9829eb8b0e29bc7f3091619864ff3dba32b
|
|
| MD5 |
8e0470016644a2345eefc5d2fce699a9
|
|
| BLAKE2b-256 |
c0618071ee53ec4c9e8b64a1c15f5a64171611cd08dcbd53d46358742bbc7b5c
|
File details
Details for the file flask_topassets-0.1.0.20250915-py3-none-any.whl.
File metadata
- Download URL: flask_topassets-0.1.0.20250915-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1781ac9278d32cbdff4af4656113fc7dbe26272502c90ff941b17e16738557e
|
|
| MD5 |
ecc3f62fc7b8d355f6eeb062c91dfac4
|
|
| BLAKE2b-256 |
9c7a223adcfb024a133a5aa00e570c6f76f2d442ea8a2dd383562ce4d904ccf3
|