Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Trumbowyg (WYSIWYG editor) integration app for Django admin.

Project Description

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 look for LANGUAGES setting. Please make sure you have set it otherwise ALL available language files will be loaded, and apparently this is not what you want:

    LANGUAGES = (
        ('en', 'English'),
        ('ru', 'Russian'),
    )
    
  6. (Optional) If you wish image filenames to be transliterated, install transliterate from PyPi and set:

    TRUMBOWYG_TRANSLITERATE_FILENAME = True
    

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

Release History

Release History

This version
History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_trumbowyg-1.0.3-py2-none-any.whl (116.7 kB) Copy SHA256 Checksum SHA256 py2 Wheel Apr 26, 2017
django_trumbowyg-1.0.3-py3-none-any.whl (116.7 kB) Copy SHA256 Checksum SHA256 py3 Wheel Apr 26, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting