{
"info": {
"author": "Alon Raizman",
"author_email": "",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3"
],
"description": "A lightweight wysiwyg editor for Django\n=======================================\n\nScreenshot\n----------\n\n.. image:: https://raw.githubusercontent.com/douglasmiranda/django-wysiwyg-redactor/master/screenshots/redactor.jpg\n\nWhat's that\n-----------------\n\n*django-wysiwyg-redactor* is a text editor application for Django, using `Redactor WYSIWYG editor `_\n\nDependency\n----------\n\n- `Pillow or PIL` # for image upload\n\nGetting started\n---------------\n\n- Install *django-wysiwyg-redactor*:\n\n``pip install django-wysiwyg-redactor``\n\n- Add `'redactor'` to INSTALLED_APPS.\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # ...\n 'redactor',\n # ...\n )\n\n- Add `url(r'^redactor/', include('redactor.urls'))`, to urls.py\n\n.. code-block:: python\n\n urlpatterns = [\n # ...\n url(r'^redactor/', include('redactor.urls')),\n # ...\n ]\n\n\n- Add default config in settings.py\n\n.. code-block:: python\n\n REDACTOR_OPTIONS = {'lang': 'en'}\n REDACTOR_UPLOAD = 'uploads/'\n\nMore `redactor settings `_.\n\nUsing in model\n--------------\n\n.. code-block:: python\n\n from django.db import models\n from redactor.fields import RedactorField\n\n class Entry(models.Model):\n title = models.CharField(max_length=250, verbose_name=u'Title')\n short_text = RedactorField(verbose_name=u'Text')\n\nor use custom parameters:\n\n.. code-block:: python\n\n short_text = RedactorField(\n verbose_name=u'Text',\n redactor_options={'lang': 'en', 'focus': True},\n upload_to='tmp/',\n allow_file_upload=True,\n allow_image_upload=True\n )\n\nUsing only in Django Admin\n--------------------------\n\n.. code-block:: python\n\n from django import forms\n from redactor.widgets import RedactorEditor\n from blog.models import Entry\n\n class EntryAdminForm(forms.ModelForm):\n class Meta:\n model = Entry\n widgets = {\n 'short_text': RedactorEditor(),\n }\n\n class EntryAdmin(admin.ModelAdmin):\n form = EntryAdminForm\n\n`RedactorEditor` takes the same parameters as `RedactorField`.\n\nUsing Plugins\n-------------\n`Download `_ the plugin you want or `create a custom plugin `_.\n\nThen:\n\n.. code-block:: python\n\n from django.db import models\n from redactor.fields import RedactorField\n\n class Entry(models.Model):\n title = models.CharField(max_length=250, verbose_name=u'Title')\n short_text = RedactorField(\n verbose_name=u'Text',\n # for example, if you downloaded the 'table' plugin:\n redactor_options={'plugins': ['table']}\n )\n\nOR (on settings.py):\n\n.. code-block:: python\n\n REDACTOR_OPTIONS = {'lang': 'en', 'plugins': ['table']}\n\nImportant: if you set a plugin called \"table\", you must create/paste the \"table.js\" on **YOUR_STATIC_FILES_FOLDER/redactor/plugins/table.js**\n\nUpload Handlers\n---------------\nSimpleUploader - The Standard Uploader. Will upload your file to REDACTOR_UPLOAD.\n\nUUIDUploader - This handler will replace the original file name for an UUID.\n\nDateDirectoryUploader - This handler saves the file in a directory based on the current server date.\n\nUsage:\n\nFor example, if I want to use the DateDirectoryUploader handler, I will put this on settings.py:\n\n.. code-block:: python\n\n REDACTOR_UPLOAD_HANDLER = 'redactor.handlers.DateDirectoryUploader'\n\nUpload permissions\n------------------\nBy default django-wysiwyg-redactor uses `staff_member_required` decorator from\n`django.contrib.admin.views.decorators` package to control access to dispatch\nmethod.\n\nTo use custom authentication decorator, set `REDACTOR_AUTH_DECORATOR` to\nanything else, eg. if every authenticated user should have permissions to\nupload files/images/etc.:\n\n.. code-block:: python\n\n REDACTOR_AUTH_DECORATOR = 'django.contrib.auth.decorators.login_required'\n\nFile Storages\n-------------\n*django-wysiwyg-redactor* defaults to using the default media storage for your Django application.\n\nThis can be overridden to use a different storage backend with this settings.py variable:\n\n.. code-block::\n\n REDACTOR_FILE_STORAGE = 'my_site.file_storages.StorageClass'\n\nInformation on writing a custom storage backend is `here in the Django documentation `_.\n\nOther third-party libraries exist to provide storage backends for cloud object storages (e.g. `django-cumulus `_ for Rackspace/OpenStack or `django-storages `_ for Amazon S3). For example, following should be enough to store all your files and images to Amazon S3, even if the rest of the application uses different storage.\n\n.. code-block:: python\n\n REDACTOR_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'\n AWS_ACCESS_KEY_ID = '...'\n AWS_SECRET_ACCESS_KEY = '...'\n AWS_STORAGE_BUCKET_NAME = '...'\n\n\nNOTE: Soon we will have a better documentation.\n\nContributing\n------------\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request =]\n\nMade by robots, or what?\n------------------------\nAwesome people, you should see the `AUTHORS `_ file.\n\nAbout the licensing\n-------------------\nYou may want to see the `LICENSE `_ file.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/alonraiz/django2-wysiwyg-redactor",
"keywords": "django,admin,wysiwyg,editor,redactor,redactorjs",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "django2-wysiwyg-redactor",
"package_url": "https://pypi.org/project/django2-wysiwyg-redactor/",
"platform": "",
"project_url": "https://pypi.org/project/django2-wysiwyg-redactor/",
"project_urls": {
"Homepage": "https://github.com/alonraiz/django2-wysiwyg-redactor"
},
"release_url": "https://pypi.org/project/django2-wysiwyg-redactor/1.0.0/",
"requires_dist": null,
"requires_python": "",
"summary": "django-wysiwyg-redactor is a lightweight responsive wysiwyg editor for Django",
"version": "1.0.0"
},
"last_serial": 4828711,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "4ba674e674e3f445b15b83a6977ca528",
"sha256": "b5736731911cc1d0532a490092ac70a18af28f3a788d1f81b4374e0c0d2ce8d3"
},
"downloads": -1,
"filename": "django2-wysiwyg-redactor-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4ba674e674e3f445b15b83a6977ca528",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 151804,
"upload_time": "2019-02-16T13:00:35",
"url": "https://files.pythonhosted.org/packages/62/1d/4361f44c27bbe15c050dd75eedd5071fbb01f3c4b06a3281ed4a5486aaca/django2-wysiwyg-redactor-1.0.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "4ba674e674e3f445b15b83a6977ca528",
"sha256": "b5736731911cc1d0532a490092ac70a18af28f3a788d1f81b4374e0c0d2ce8d3"
},
"downloads": -1,
"filename": "django2-wysiwyg-redactor-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "4ba674e674e3f445b15b83a6977ca528",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 151804,
"upload_time": "2019-02-16T13:00:35",
"url": "https://files.pythonhosted.org/packages/62/1d/4361f44c27bbe15c050dd75eedd5071fbb01f3c4b06a3281ed4a5486aaca/django2-wysiwyg-redactor-1.0.0.tar.gz"
}
]
}