django-fbv
django-fbv copied to clipboard
Utilities to make function-based views cleaner, more efficient, and better tasting.
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.pyfbv.views.redirect_view: redirect to a pattern name fromurls.pyfbv.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 therequestfor the current request's HTTP method
Read all of the documentation at https://django-fbv.readthedocs.io/.