Utilities to make function-based views cleaner, more efficient, and better tasting.
Project description
django-fbv
Utilities to make Django function-based views cleaner, more efficient, and better tasting. 💥
📖 Complete documentation: https://django-fbv.readthedocs.io
📦 Package located at https://pypi.org/project/django-fbv/
Features
decorators
fbv.decorators.render_html
: decorator to specify the template that a view function response should use when renderingfbv.decorators.render_view
: decorator to specify the template and content type that a view function response should use when renderingfbv.decorators.render_json
: decorator to automatically render dictionaries, Django Models, or Django QuerySets as a JSON response
views
fbv.views.html_view
: directly render a template fromurls.py
fbv.views.redirect_view
: redirect to a pattern name fromurls.py
fbv.views.favicon_file
: serve an image file as the favicon.icofbv.views.favicon_emoji
: serve an emoji as the favicon.ico
middleware
fbv.middleware.RequestMethodMiddleware
: adds a boolean property to therequest
for the current request's HTTP method
Read all of the documentation at https://django-fbv.readthedocs.io/.
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
django-fbv-0.5.1.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file django-fbv-0.5.1.tar.gz
.
File metadata
- Download URL: django-fbv-0.5.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ab598453b9ddca7854999e0dfa96e264d331aea3c5e9766d777f62f2ccf12d7 |
|
MD5 | b3c274d107525f5b0b8d87615129295c |
|
BLAKE2b-256 | 9040ab6075f03164296114ebf1e9dbb55908f7cf6e603b21e5d195293d51b1ab |
File details
Details for the file django_fbv-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: django_fbv-0.5.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f9aefddb929777e203ff6ae4c46c6e53bbe1ba4534ba6c2e73b43304f4feea8 |
|
MD5 | 815cb817ce8d19ab5a41cb6c74581782 |
|
BLAKE2b-256 | 047985e5840e9156c6619fd36f0023673545f911e42f4c2114d7b7c4db0d26e5 |