Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamghill/django-fbv
Utilities to make function-based views cleaner, more efficient, and better tasting.
https://github.com/adamghill/django-fbv
Last synced: 3 months ago
JSON representation
Utilities to make function-based views cleaner, more efficient, and better tasting.
- Host: GitHub
- URL: https://github.com/adamghill/django-fbv
- Owner: adamghill
- License: bsd-3-clause
- Created: 2022-01-17T21:48:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-01T14:45:25.000Z (about 2 years ago)
- Last Synced: 2024-10-15T02:05:45.739Z (4 months ago)
- Language: Python
- Size: 124 KB
- Stars: 67
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- stars - adamghill/django-fbv - Utilities to make function-based views cleaner, more efficient, and better tasting. (Python)
- stars - adamghill/django-fbv - Utilities to make function-based views cleaner, more efficient, and better tasting. (Python)
README
Utilities to make Django function-based views cleaner, more efficient, and better tasting. 💥
![PyPI](https://img.shields.io/pypi/v/django-fbv?color=blue&style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/django-fbv?color=blue&style=flat-square)
![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)📖 Complete documentation: https://django-fbv.readthedocs.io
📦 Package located at https://pypi.org/project/django-fbv/
## Features
### decorators
- [`fbv.decorators.render_html`](https://django-fbv.readthedocs.io/en/latest/decorators/#render-html): decorator to specify the template that a view function response should use when rendering
- [`fbv.decorators.render_view`](https://django-fbv.readthedocs.io/en/latest/decorators/#render-view): decorator to specify the template and content type that a view function response should use when rendering
- [`fbv.decorators.render_json`](https://django-fbv.readthedocs.io/en/latest/decorators/#render-json): decorator to automatically render dictionaries, Django Models, or Django QuerySets as a JSON response### views
- [`fbv.views.html_view`](https://django-fbv.readthedocs.io/en/latest/views/#html-view): directly render a template from `urls.py`
- [`fbv.views.redirect_view`](https://django-fbv.readthedocs.io/en/latest/views/#redirect-view): redirect to a pattern name from `urls.py`
- [`fbv.views.file`](https://django-fbv.readthedocs.io/en/latest/views/#file): serve a file
- [`fbv.views.favicon_file`](https://django-fbv.readthedocs.io/en/latest/views/#favicon-file): serve an image file as the favicon.ico
- [`fbv.views.favicon_emoji`](https://django-fbv.readthedocs.io/en/latest/views/#favicon-emoji): serve an emoji as the favicon.ico### middleware
- [`fbv.middleware.RequestMethodMiddleware`](https://django-fbv.readthedocs.io/en/latest/middleware/): adds a boolean property to the `request` for the current request's HTTP method
Read all of the documentation at https://django-fbv.readthedocs.io/.