Bootstrap 4.0 for Pyramid
Project description
Maintainer
Joe Black | me@joeblack.nyc | github
Introduction
Pyramid extension that bundles all bootstrap 4 resources, including font-awesome. Allows for locally hosted development and CDN hosted production.
Also includes master layout template for jinja2 and chameleon template languages.
Installation
pip3 install pyramid_bootstrap4
Usage
App Factory Config
Include in your pyramid config either through .ini file, ZCML, or in python, ex:
config.include('pyramid_bootstrap')
Example templates
home.jinja2
{% extends "pyramid_bootstrap:/templates/bs4/layout.jinja2" %}
{% block title %}Quick Tutorial: {{ name }}{% endblock title %}
{% block content %}
<h1>Hi {{ name }}</h1>
{% endblock content %}
home.pt
<metal:macro use-macro="master">
<metal:slot fill-slot="title">
<title>Quick Tutorial: ${name}</title>
</metal:slot>
<metal:slot fill-slot="content">
<h1>Hi ${name}</h1>
<p>Chameleon is an XML-based templating language</p>
</metal:slot>
</metal:macro>
Changes
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 pyramid_bootstrap4-4.1.0.tar.gz
.
File metadata
- Download URL: pyramid_bootstrap4-4.1.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57b01bf9b56317050bf060b32e864dab904da198b64e741c776526957d7c686 |
|
MD5 | e0ec041e519d98b9b8651ece867dd4b8 |
|
BLAKE2b-256 | 66f412ea0be2d65a61f9f770ca785157886a653dfd2bcf958b870243e13a8a01 |
File details
Details for the file pyramid_bootstrap4-4.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pyramid_bootstrap4-4.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c1bd753351753fd0a279d589d023f88070200addc23da82a374006393d71f7a |
|
MD5 | 0a0ed8a67e6bdb81295c68facff39b0d |
|
BLAKE2b-256 | 7a64f36a51faa19229d6c45058e7b8af1e8c95d89eaf919470c9620cbc590c1d |