Skip to main content

Bootstrap 4.0 for Pyramid

Project description

Build Status Github Repo Pypi Version Pypi License Pypi Wheel Pypi Versions

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_bootstrap

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyramid_bootstrap-4.1.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

pyramid_bootstrap-4.1.0-py2.py3-none-any.whl (1.2 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyramid_bootstrap-4.1.0.tar.gz.

File metadata

File hashes

Hashes for pyramid_bootstrap-4.1.0.tar.gz
Algorithm Hash digest
SHA256 874396f0d3ab0c3b4293acaec426b9abcfa4fe801473ba2643bdb19298991499
MD5 40ba9a8d82aac582017b9e68f35e2b4d
BLAKE2b-256 898adeac05b8658343d4fba44ced95088719145ff872e02a3dde4fc99fed3bd7

See more details on using hashes here.

File details

Details for the file pyramid_bootstrap-4.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyramid_bootstrap-4.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8b4fb0663e20043dfa8601c414eebdc6485df92ea0e2540dc6285cba328d34fd
MD5 b898401eb72af4f1199989d1fbdfc941
BLAKE2b-256 b5f2e50128f9785a063d67b16d81b3ef1a97a5fd195b7388bfb37c258732fbfe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page