Skip to main content

django-edit-away

WIP exhibit crafter for Django for use in the digital humanities. At the moment, it provides a Tiptap rich text editor with built-in support for embedding images and Youtube videos.

Installation

TBD - right now, installing requires compiling the JavaScript dependencies via NPM. A fix is in the works.

Add django_edit_away to INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    # ...
    'django_edit_away',
]

Usage

Add TiptapField to your models:

from django.db import models
from django_edit_away.models import TiptapField


class Description(models.Model):
    body = TiptapField()

Under the hood, TiptapField stores data as a JSONField with two values, html and json_value. The convenience wrapper django_edit_away.tiptap.Tiptap provides a ready-made object for holding this data in Python. HTML sanitization is handled via Tiptap. When you use a TiptapField in a form, the data is always saved from the JSON representation in the Tiptap editor, never from the HTML representation. This means it is only possible to directly modify the stored HTML via the Django shell or direct database access. More robust HTML sanitization for these circumstances is a future work plan.

In forms

When using a Tiptap field in a form, it is necessary to call the form.media class to inject additional CSS and JavaScript:

<form id="guide-form" method="POST" enctype="multipart/form-data">
    {% csrf_token %}
    {{ form.media }}
    {{ form }}
    <button type="submit" class="btn btn-primary">Save</button>
</form>

In templates

To display rich text content in a Django template outside of forms, call the field by its html element:

{{ object.my_tiptip_field.html|safe }}

Since the field stores the raw JSON representation, it is theoretically possible to implement a true WYSIWYG editor by calling a non-editable Tiptap instance, but there are no plans to implement this at present.

Uploading images

To take advantage of the image upload feature, you must configure your media settings and add django_edit_away.urls to your url configuration:

from django.urls import path, include

url_patterns = [
    # ...
    path('', include('django_edit_away.urls)),
]

The AJAX requests that make image uploads work expect the urlconf to be served from root, so it is essential to follow this configuration exactly. The path /image-upload should be considered a reserved path for projects using this package.

Uploaded and embedded images can have either the class .inline-ref or .parallax-ref. The styling of these classes is left to the user, but we hope to provide sample styling in the near future.

Embedding Youtube videos

To get embedded Youtube videos to work, you must add the following to settings.py:

SECURE_REFERRER_POLICY = 'strict-origin-when-cross-origin'

Metadata

Release files for django-edit-away 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-edit-away 0.1.3
File Size Uploaded Provenance Actions
django_edit_away-0.1.3.tar.gz 1.8 MB With provenance Details for django_edit_away-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-edit-away 0.1.3
File Interpreter ABI Platform Actions
django_edit_away-0.1.3-py3-none-any.whl Python 3 none any Details for django_edit_away-0.1.3-py3-none-any.whl

Total release size: 3.6 MB

Release files / django_edit_away-0.1.3.tar.gz

Download URL django_edit_away-0.1.3.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
1355ebb2393e6f9a460b77a884cd0fc5107fe65779d6b31b8e9c8d3236fd9b4a
BLAKE2b-256 checksum
How to use checksums
b60aa51600d284f614e86378ff9baa7bb3764201e2be65e593a8ad93748ef194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / django_edit_away-0.1.3-py3-none-any.whl

Download URL django_edit_away-0.1.3-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5f67d1059ea4cd976fe53c5227ab8e983d68e1db7fc9132eb5580de7f8354140
BLAKE2b-256 checksum
How to use checksums
5d2c717ee50423a4c094eb9756c55a1fca85b32bff6994ef22941833e9f2c562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Security for django-edit-away 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_edit_away-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page