Skip to main content

Hotwired/Turbo response helpers for Django

Project description

This package provides helpers for server-side rendering of Hotwired/Turbo streams and frames.

Disclaimer: the Hotwired/Turbo client libraries are, at time of writing, still in Beta. We expect there will be breaking changes until the first stable release. This package, and the Turbo client, should therefore be used with caution in a production environment. The version used in testing is @hotwired/turbo==7.0.0-beta.1.

Requirements

This library is tested for Python 3.8+.

Installation

pip install django-turbo-response

To install from Git:

git clone https://github.com/danjac/django-turbo-response

cd django-turbo-response

python setup.py install

Note: This library does not include any client libraries (Turbo or Stimulus). You may wish to add these yourself using your preferred Javascript build tool, or use a CDN. Please refer to the Hotwire documentation on installing these libraries.

Full documentation on ReadTheDocs:

https://django-turbo-response.readthedocs.io/en/latest/

License

This project is covered by the MIT license.

Changelog

[0.0.12] - 2021-5-1

Update form handling for changes in @hotwired/turbo 7.0.0-beta.2:

  • TurboStreamFormMixin class and supporting classes removed
  • TurboFormMixin class added that just returns a 422 response on invalid
  • TurboStreamFormView, TurboStreamCreateView and TurboStreamUpdateView classes removed
  • TurboFormView, TurboCreateView and TurboUpdateView classes added, using new TurboFormMixin

[0.0.10] - 2020-12-30

Remove str methods from TurboStream and TurboFrame classes

[0.0.9] - 2020-12-30

Add render() method to template proxies

[0.0.8] - 2020-12-30

Added

TurboStream and TurboFrame classes

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-turbo-response-0.0.12.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_turbo_response-0.0.12-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file django-turbo-response-0.0.12.tar.gz.

File metadata

  • Download URL: django-turbo-response-0.0.12.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for django-turbo-response-0.0.12.tar.gz
Algorithm Hash digest
SHA256 0a4aa135c8e2508597f845cc421658dfbf95d5dcef5892249f549707b5e3e260
MD5 06244c0c70cbf0dd90823e8643c64897
BLAKE2b-256 adce7a890de3e0d3537ac1844a663d50a910a9a5970e04472435b4febeefb471

See more details on using hashes here.

File details

Details for the file django_turbo_response-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: django_turbo_response-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for django_turbo_response-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e006941d2b81988c6b0862f6db07a051c4a8fcbf876a2444237ec5a4c99f322c
MD5 083575fdf887d49454775430af13668f
BLAKE2b-256 63960d739dc231c1120079de6b44c84673d7aafa35183bf8a4b240d047c55ba0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page