Trumbowyg (WYSIWYG editor) integration app for Django admin.
Project description
Introduction
django-trumbowyg is the Django-related reusable app for integrating Trumbowyg WYSIWYG editor.
Initially this package was forked from Django FS Trumbowyg package and then reworked.
Installation
Install django-trumbowyg using pip:
$ pip install django-trumbowyg
Add 'trumbowyg' to your INSTALLED_APPS setting:
INSTALLED_APPS = ( ... 'trumbowyg', ... )Update your urls.py:
url(r'^trumbowyg/', include('trumbowyg.urls'))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)
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'), )
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_trumbowyg-1.0.0-py2-none-any.whl.
File metadata
- Download URL: django_trumbowyg-1.0.0-py2-none-any.whl
- Upload date:
- Size: 107.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e9e2cb27e0a9daea586c69712e739d17dc2f0f04b08dcfe93daf22acfd9e6cd
|
|
| MD5 |
3ec46f6a441a469ee30a4c92ca6032bd
|
|
| BLAKE2b-256 |
f7ab23155b9796477e4b21769e64885e7361969b4d2f19062a42805a4b905bba
|