bottle-pypugjs-0.1.1.post6
توضیحات
Este es un plugin de bottle para poder usar la libreria de pypugjs en las vistas
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bottle-pypugjs-0.1.1.post6 |
| نام | bottle-pypugjs |
| نسخه کتابخانه | 0.1.1.post6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Lorenzo A. Garcia Calzadilla |
| ایمیل نویسنده | lorenzogarciacalzadilla@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/bottle-pypugjs/ |
| مجوز | MIT |
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.
نیازمندی
| مقدار | نام |
|---|---|
| - | bottle |
| >=5.8.1 | pypugjs |
نحوه نصب
نصب پکیج whl bottle-pypugjs-0.1.1.post6:
pip install bottle-pypugjs-0.1.1.post6.whl
نصب پکیج tar.gz bottle-pypugjs-0.1.1.post6:
pip install bottle-pypugjs-0.1.1.post6.tar.gz