Este es un plugin de bottle para poder usar la libreria de pypugjs en las vistas
Project description
Bottle PyPugjs Template
Este es un plugin de bottle para poder usar la libreria de pypugjs en las vistas
Inicio rapido
El plugin de bottle-pypugjs permite usar la tres formas que bottle define para manejar los templates
from bottle import route, install
from bottle.ext.pypugjs import template, view, Plugin
# Usando la funcion template
@route('/index')
def index():
return template('index.pug')
# Usando el decorador view
@route('/index')
@view('index.pug')
def index():
return {}
app.install(Plugin())
# Usando el argumento *template* en la ruta que provee el plugin
@route('/index', template='index.pug')
def index():
return {}
Con estos ejemplos se resume el funcionamiento del plugin.
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
File details
Details for the file bottle-pypugjs-0.1.1.post6.tar.gz
.
File metadata
- Download URL: bottle-pypugjs-0.1.1.post6.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a960427cb83636bda5332a2effe13ff7e3963d653a015d08e4fe6cdaf8b88a1 |
|
MD5 | 1f3b313924b675df461c37c5cf23c045 |
|
BLAKE2b-256 | 2e819803ef29b2e1739965d627aae240d6bb232c20a3c8fb0e4b0485fe0deb34 |
File details
Details for the file bottle_pypugjs-0.1.1.post6-py3-none-any.whl
.
File metadata
- Download URL: bottle_pypugjs-0.1.1.post6-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099f21d283a559e2beb9a6a48403132021e0eb19e1f69cac9e71da9cafa6db58 |
|
MD5 | 5ec59c744403b84d1a7012134c2aad64 |
|
BLAKE2b-256 | b44a34a863e7c64f06bdea14f73248e42f5e8a1cf12852e326697ec0b6edb9f7 |