Skip to main content

Introduction

django-trumbowyg is the Django-related reusable app for integrating Trumbowyg WYSIWYG editor. It is recognized as one of the best WYSIWYG editors.

Initially this package was forked from Django FS Trumbowyg package and then reworked.

Installation

  1. Install django-trumbowyg using pip:

    $ pip install django-trumbowyg
  2. Add 'trumbowyg' to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        ...
        'trumbowyg',
        ...
    )
  3. Update your urls.py:

    url(r'^trumbowyg/', include('trumbowyg.urls'))
  4. Sometimes you might want to limit size of uploaded images, e.g. if they are too large. In this case just put in settings (if you omit this, the image will be uploaded unchanged):

    TRUMBOWYG_THUMBNAIL_SIZE = (1920, 1080)
  5. The package will try to use the language defined in LANGUAGE_CODE and if this language isin’t availabe the default is en

  6. (Optional) If you wish image filenames to be transliterated, install unidecode from PyPi and set:

    TRUMBOWYG_TRANSLITERATE_FILENAME = True
  7. Set [semantics](https://alex-d.github.io/Trumbowyg/documentation/#semantic) if necessary. It defaults to false:

    TRUMBOWYG_SEMANTIC = 'true'
  8. Don’t forget to add {{ form.media }} to form template.

Usage

Use TrumbowygWidget in your forms:

from django.forms import ModelForm
from django.contrib.admin import ModelAdmin
from trumbowyg.widgets import TrumbowygWidget
from your_app.models import YourModel

class YourModelAdminForm(ModelForm):
    class Meta:
        model = YourModel
        widgets = {
            'text': TrumbowygWidget(),
        }

class YourModelAdmin(admin.ModelAdmin):
    form = YourModelAdminForm


admin.site.register(YourModel, YourModelAdmin)

Credits

Metadata

Release files for django-trumbowyg 1.1.2

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

Built distribution (wheel)

Table of built distributions (wheels) for django-trumbowyg 1.1.2
File Interpreter ABI Platform Actions
django_trumbowyg-1.1.2-py3-none-any.whl Python 3 none any Details for django_trumbowyg-1.1.2-py3-none-any.whl

Release files / django_trumbowyg-1.1.2-py3-none-any.whl

Download URL django_trumbowyg-1.1.2-py3-none-any.whl
Size 228.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92b39b4f98d70476cd46bdfce55edf11876cf1faa94bad3da5151ea7d9943e0e
BLAKE2b-256 checksum
How to use checksums
2581750a476bcf084b6cb9640db5d7b7f23c4d1c1ab56458a3d8b07883ea520d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Security for django-trumbowyg 1.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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