Metadata-Version: 2.0
Name: django-trumbowyg
Version: 1.0.1
Summary: Trumbowyg (WYSIWYG editor) integration app for Django admin.
Home-page: https://github.com/sandino/django-trumbowyg
Author: sandino
Author-email: vdjangofan@gmail.com
License: The MIT License (MIT)
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Framework :: Django

Introduction
============

django-trumbowyg is the Django-related reusable app for integrating `Trumbowyg WYSIWYG editor <http://alex-d.github.io/Trumbowyg/>`_.

Initially this package was forked from `Django FS Trumbowyg <https://bitbucket.org/fogstream/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'),
    )


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
=======

- `Fogstream <http://fogstream.ru/>`_
- `Alex-D <http://alex-d.fr/>`_


