{ "info": { "author": "Giorgi Kakulashvili", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Django-editor-widgets\n\n\nThis package provides some custom widgets to use monaco or tinymce editors in django admin.\n\n**remark**: From version 3.0 fields and extra widgets are removed to make code more flexible. Version with custom fields is in *v_2.0* branch.\n\n\n## Installation\n\nTo install the package by `pip` run following command\n\n```sh\n# From Github (latest updates)\n$ pip install git+https://github.com/giorgi94/django-editor-widgets.git\n# Or\n$ pip install django-editor-widgets\n```\n\n## Usage\n\nTo start using the package in your project, you need to open `settings.py` file and add following lines\n\n```python\n# settings.py\nimport os\n\n# sets paths to static files for widgets\nfrom djangoeditorwidgets.config import *\n\n\n# Application definition\n\nINSTALLED_APPS = [\n ...\n 'djangoeditorwidgets',\n ...\n]\n\n```\n\n### TinyMCE\n\nTo use tinymce editor in admin, we need to change default widget in the form with `TinymceWidget`\n\n\n```python\n# forms.py\nfrom django import forms\nfrom djangoeditorwidgets.widgets import TinymceWidget\nfrom .models import TextModel\n\n\nclass TextModelForm(forms.ModelForm):\n\n class Meta:\n model = TextModel\n fields = '__all__'\n widgets = {\n 'text': TinymceWidget()\n }\n```\n\n### Monaco Editor\n\nFrom version 3.0 is removed custom fields and extra widgets. To use monaco editor, we need to import `MonacoEditorWidget` and customize it\n\n```python\n# models.py\nimport json\nfrom django.db import models\n\nclass JSONModel(models.Model):\n title = models.CharField(max_length=50)\n _text = models.TextField()\n\n @property\n def text(self):\n return json.laods(self._text)\n\n @text.setter\n def text(self, val):\n self._text = json.dumps(val, ensure_ascii=False)\n\n def __str__(self):\n return self.title\n\n# forms.py\nfrom django import forms\nfrom djangoeditorwidgets.widgets import MonacoEditorWidget\nfrom .models import JSONModel\n\n\nclass JsonModelForm(forms.ModelForm):\n class Meta:\n model = JSONModel\n fields = \"__all__\"\n widgets = {\n \"_text\": MonacoEditorWidget(\n attrs={\"data-wordwrap\": \"on\", \"data-language\": \"json\"}\n )\n }\n```\n\n## Remark\n\nUnlike other django package which are for Rich web editors, this package allows developer to fully use capablities and custom plugins for the web editor, like tinymce or monaco, since configurations doesn't go through django settings.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/giorgi94/django-editor-widgets", "keywords": "django,monaco,tinymce", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-editor-widgets", "package_url": "https://pypi.org/project/django-editor-widgets/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-editor-widgets/", "project_urls": { "Homepage": "https://github.com/giorgi94/django-editor-widgets" }, "release_url": "https://pypi.org/project/django-editor-widgets/3.0/", "requires_dist": [ "Django (>=2.0)", "Pillow (>=5.3.0)" ], "requires_python": "", "summary": "Rich web editor widgets in the Django Admin", "version": "3.0" }, "last_serial": 5991793, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "0202b68f8f631a0fd390a91da75e5f30", "sha256": "31fefb3c2cef269a261e11a5c84eb9ff422ff154f2eb26f71f143c59045b55c4" }, "downloads": -1, "filename": "django_editor_widgets-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0202b68f8f631a0fd390a91da75e5f30", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2147664, "upload_time": "2019-01-11T10:15:42", "url": "https://files.pythonhosted.org/packages/f7/70/e3313eac5920aae731622c97a7a06f92bb07698748d294af538163556dff/django_editor_widgets-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0ce238d56e0314b9f6a38a3ae03047f8", "sha256": "bac7fcf5fb13abd250df2c7a1ffa5eb5ca3b194d92f62bacc3dd3fbde579a020" }, "downloads": -1, "filename": "django-editor-widgets-1.0.tar.gz", "has_sig": false, "md5_digest": "0ce238d56e0314b9f6a38a3ae03047f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2055204, "upload_time": "2019-01-11T10:16:00", "url": "https://files.pythonhosted.org/packages/36/f3/f783dc8d1355de0438b6cbb67f6aa298fd789914625f267152ae36e6b4c7/django-editor-widgets-1.0.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "70fd50e9af7dcb45c65f08b3800c2d9d", "sha256": "d601dbb40eb5fc901b6f7d5daff467b3b164fbb7223f4980d18f9dcd5cf5ef79" }, "downloads": -1, "filename": "django_editor_widgets-2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "70fd50e9af7dcb45c65f08b3800c2d9d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2160081, "upload_time": "2019-07-10T18:05:37", "url": "https://files.pythonhosted.org/packages/65/e5/40b18aefb5a65d47262a274070ff1baa6e1b7d423965492e41df161d6764/django_editor_widgets-2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d92d0aba7462eb69e7cecf0bc315550", "sha256": "e4a9ceeaa500dea06da5985cc4135b02de592c9c1bc2bae3306e845aba3e078c" }, "downloads": -1, "filename": "django-editor-widgets-2.0.tar.gz", "has_sig": false, "md5_digest": "6d92d0aba7462eb69e7cecf0bc315550", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2073503, "upload_time": "2019-07-10T18:05:41", "url": "https://files.pythonhosted.org/packages/c4/15/5c6c25c80af88297a49fd4434866992b31f376b7d3106df1c9b286f341a2/django-editor-widgets-2.0.tar.gz" } ], "3.0": [ { "comment_text": "", "digests": { "md5": "a4cf32a8ac55b2cf2c5df78c74247e66", "sha256": "6c82ae0941a025ea3bd96ed6ee29842974d3c382743f615068209ea9a3d9a5ea" }, "downloads": -1, "filename": "django_editor_widgets-3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4cf32a8ac55b2cf2c5df78c74247e66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2528561, "upload_time": "2019-10-17T18:48:49", "url": "https://files.pythonhosted.org/packages/95/99/b12435f7597b8e94c8f75db070269555f229196cd003c253a7f150650186/django_editor_widgets-3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e2d4865fa057d41b3e77eed14a75c4e", "sha256": "8834d4c31e26b5b4d30f1d1dcc9a1b8587fb8fb774c8e323cf784de03e299d54" }, "downloads": -1, "filename": "django-editor-widgets-3.0.tar.gz", "has_sig": false, "md5_digest": "5e2d4865fa057d41b3e77eed14a75c4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2405226, "upload_time": "2019-10-17T18:49:04", "url": "https://files.pythonhosted.org/packages/e2/98/2cf0f16506f7d98bb7159cf56780f2df5c540f6ab04c828caafc71ff7974/django-editor-widgets-3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4cf32a8ac55b2cf2c5df78c74247e66", "sha256": "6c82ae0941a025ea3bd96ed6ee29842974d3c382743f615068209ea9a3d9a5ea" }, "downloads": -1, "filename": "django_editor_widgets-3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4cf32a8ac55b2cf2c5df78c74247e66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2528561, "upload_time": "2019-10-17T18:48:49", "url": "https://files.pythonhosted.org/packages/95/99/b12435f7597b8e94c8f75db070269555f229196cd003c253a7f150650186/django_editor_widgets-3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e2d4865fa057d41b3e77eed14a75c4e", "sha256": "8834d4c31e26b5b4d30f1d1dcc9a1b8587fb8fb774c8e323cf784de03e299d54" }, "downloads": -1, "filename": "django-editor-widgets-3.0.tar.gz", "has_sig": false, "md5_digest": "5e2d4865fa057d41b3e77eed14a75c4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2405226, "upload_time": "2019-10-17T18:49:04", "url": "https://files.pythonhosted.org/packages/e2/98/2cf0f16506f7d98bb7159cf56780f2df5c540f6ab04c828caafc71ff7974/django-editor-widgets-3.0.tar.gz" } ] }