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 %}
```
============
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.
Source Distribution
flask-macros-0.1.5.tar.gz
(3.5 kB
view details)
File details
Details for the file flask-macros-0.1.5.tar.gz
.
File metadata
- Download URL: flask-macros-0.1.5.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f44400de378863179a180dee41e74b19c2168b9f6b6502bd617fa59ba1fd4e |
|
MD5 | 556256062130dec367cdf0de80a43690 |
|
BLAKE2b-256 | 52f400989ff7a8f715c74e87de8a0d583410505d59198eafed93b506ce4dfdc9 |