Skip to main content

macros for flask projects

Project description

flask-macros
============

a collection of bootstrap3 jinja2 macros for use with flask apps

to use:

```python
from flask import Flask
from flask_macros import Macro

app = Flask(__name__)
macro = Macro(app)
```
now you can import any file from flask_macros/templates/macros/*.html
ie:
```jinja2
{% import 'forms.html' as form_macros with context %}
```
or just use the jinja global _macro

either
```jinja2
{% set form_macros = _macros.forms %}
{% call form_macros.form_group() %}
{{ formstuff }}
{% endcall %}
```
or
```jinja2
{% call _macros.forms.form_group() %}
{{ formstuff }}
{% endcall %}
```

Project details


Download files

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

Files for flask-macros, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size flask-macros-0.1.5.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page