Assorted useful flask views, blueprints, Jinja2 template filters, and templates/macros
Project description
[](https://travis-ci.org/christabor/flask_extras)
[](https://scrutinizer-ci.com/g/christabor/flask_extras/?branch=master)
[](https://codeclimate.com/github/christabor/flask_extras)
# Flask Extras
Assorted useful flask views, blueprints, Jinja2 template filters, and templates/macros.
## Overall setup
As of `3.4.0`, filters and templates will automatically be registered and available through the following simple command:
```python
from flask_extras import FlaskExtras
app = Flask('myapp')
FlaskExtras(app)
```
For the old way, check out [this page](wiki/old_setup.md)
```html
{% from 'macros.html' import list_group, objects2table %}
```
See [macros](macros.md) page for details.
## Using views
Import them like usual:
```python
from flask_extras.views import (
statuses,
)
```
*Note:* each view must have a valid template in your apps templates dir. See each view for the required names and locations.
*Note:* each view has configuration helpers to inject or configure your app. See source for details.
#### Statuses
Provides views for common status codes. Usage:
```python
app = statuses.inject_error_views(app)
```
[](https://scrutinizer-ci.com/g/christabor/flask_extras/?branch=master)
[](https://codeclimate.com/github/christabor/flask_extras)
# Flask Extras
Assorted useful flask views, blueprints, Jinja2 template filters, and templates/macros.
## Overall setup
As of `3.4.0`, filters and templates will automatically be registered and available through the following simple command:
```python
from flask_extras import FlaskExtras
app = Flask('myapp')
FlaskExtras(app)
```
For the old way, check out [this page](wiki/old_setup.md)
```html
{% from 'macros.html' import list_group, objects2table %}
```
See [macros](macros.md) page for details.
## Using views
Import them like usual:
```python
from flask_extras.views import (
statuses,
)
```
*Note:* each view must have a valid template in your apps templates dir. See each view for the required names and locations.
*Note:* each view has configuration helpers to inject or configure your app. See source for details.
#### Statuses
Provides views for common status codes. Usage:
```python
app = statuses.inject_error_views(app)
```
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_extras-3.4.0.tar.gz
(8.9 kB
view details)
File details
Details for the file flask_extras-3.4.0.tar.gz.
File metadata
- Download URL: flask_extras-3.4.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3260576a81e6c0063d1c616213655fc675c25af6d07ec3a38112c212cfa2f60e
|
|
| MD5 |
f7aa6f140e14a354acc49c7fb66816e1
|
|
| BLAKE2b-256 |
b1512c545a94050d8a21aa7d207cffe1be0d84a542f8083010ff1e1e3862b7a3
|