Muffin-Jade
Muffin-Jade – Jade template engine for Muffin framework.
Requirements
python >= 3.3
Installation
Muffin-Jade should be installed using pip:
pip install muffin-jade
Usage
Add muffin_jade to PLUGINS in your Muffin Application configuration.
Options
JADE_CACHE_SIZE – Cache size for compiled templates (100)
JADE_ENCODING – Templates’ encoding (UTF-8)
JADE_PRETTY – Pretty output (True)
JADE_TEMPLATE_FOLDERS – List of pathes to templates folder ([templates])
Views
# Register custom context provider
# could be a function/coroutine
@app.ps.jade.ctx_provider
def custom_context():
return { 'VAR': 'VALUE' }
# Register a function into templates
@app.ps.jade.register
def sum(a, b):
return a + b
@app.register('/')
def index(request):
""" Check for user is admin. """
local_context = {'key': 'value'}
return app.ps.jade.render('index.jade', **local_context)
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/muffin-jade/issues
Contributing
Development of Muffin-Jade happens at: https://github.com/klen/muffin-jade
Contributors
klen (Kirill Klenov)
License
Licensed under a MIT license.
Metadata
Release files for muffin-jade 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| muffin-jade-0.0.8.tar.gz | 5.4 kB | Without provenance | Details for muffin-jade-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| muffin_jade-0.0.8-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for muffin_jade-0.0.8-py2.py3-none-any.whl |
Total release size: 11.7 kB
Release files / muffin-jade-0.0.8.tar.gz
| Download URL | muffin-jade-0.0.8.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10f8ef7d5c91369c9f6f94a1def31fea5e608448273be6d863b45b30d11f9f62
|
|
BLAKE2b-256 checksum How to use checksums |
4a060a772d02ae4d571953c81a196f80244a65b894358d2362296fac88d6a7c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / muffin_jade-0.0.8-py2.py3-none-any.whl
| Download URL | muffin_jade-0.0.8-py2.py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b3bc98813816072f728e94eabd1ef7d0c6bbcfc6d1d4f98763b32fc3b0f6f889
|
|
BLAKE2b-256 checksum How to use checksums |
7a061dc3889f169803136d2dd7b7892bfacc8ecabefb38fdf0c94992a5a25fda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for muffin-jade 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.