{ "info": { "author": "Jeremy Carbaugh", "author_email": "jeremy@isl.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===========\ndjango-trix\n===========\n\n`Trix rich text editor `_ widget for Django, using Trix 0.10.1.\n\n.. image:: https://circleci.com/gh/istrategylabs/django-trix/tree/master.svg?style=shield\n :target: https://circleci.com/gh/istrategylabs/django-trix/tree/master\n \n\nUsing django-trix\n-----------------\n\ndjango-trix includes a form widget, a model field, and a model admin mixin that\nenables the rich text editor. You can use any of these methods, but you do not\nneed to use all.\n\nModel\n~~~~~\n\nTo enable the editor in the Django admin (or any form) via the model field, use\nthe Trix model field *TrixField* which inherits from\ndjango.db.models.TextField::\n\n from django.db import models\n from trix.fields import TrixField\n\n class Post(models.Model):\n content = TrixField('Content')\n\n\nAdmin\n~~~~~\n\nTo enable the editor in the Django admin, inherit from TrixAdmin and set\nthe *trix_fields* attribute to a list of the fields that use an editor::\n\n from myawesomeblogapp.models import Post\n from trix.admin import TrixAdmin\n\n @admin.register(Post)\n class PostAdmin(TrixAdmin, admin.ModelAdmin):\n trix_fields = ('content',)\n\n\nForms and Templates\n~~~~~~~~~~~~~~~~~~~\n\nThe editor can be used in forms and templates by adding the *TrixEditor* widget\nto a form field::\n\n from django import forms\n from trix.widgets import TrixEditor\n\n class EditorForm(forms.Form):\n content = forms.CharField(widget=TrixEditor)\n\nIn the template, just use the form as you normally would, but be sure to\ninclude the associated media::\n\n \n \n \n \n Trix Editor Test\n {{ form.media.css }}\n \n \n
\n {{ form }}\n
\n {{ form.media.js }}\n \n \n\nCSS in head, JS at end of body, because you are a responsible developer.\n\n\nInstallation\n------------\n\nIt's on `PyPI `_::\n\n pip install django-trix\n\nAdd to *INSTALLED_APPS*::\n\n INSTALLED_APPS = (\n ...\n 'trix',\n ...\n )\n\nAdd route to *urls.py*::\n\n urlpatterns = [\n ...\n url(r'^trixorwhateveryouwant/', include('trix.urls')),\n ...\n ]\n\n\nTODO\n----\n\n* A bunch of stuff!\n* Attachment uploads\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/istrategylabs/django-trix", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-trix", "package_url": "https://pypi.org/project/django-trix/", "platform": "any", "project_url": "https://pypi.org/project/django-trix/", "project_urls": { "Homepage": "https://github.com/istrategylabs/django-trix" }, "release_url": "https://pypi.org/project/django-trix/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Trix rich text editor widget for Django", "version": "0.3.0" }, "last_serial": 5941367, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ff15032cfcac34f39fc1c586163f4c46", "sha256": "e2dee72111dd7c145ae07674251632b04657da2d0ba80ce5c82c11d565096ad2" }, "downloads": -1, "filename": "django-trix-0.1.tar.gz", "has_sig": false, "md5_digest": "ff15032cfcac34f39fc1c586163f4c46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88909, "upload_time": "2015-10-20T18:48:39", "url": "https://files.pythonhosted.org/packages/b1/d4/800a3c9e41a9cd45785c9f3a8d21ca0a48fe19e6eb6046027d66b3c39b75/django-trix-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "594a5e41e4224ab9682412aadfa4bc21", "sha256": "87f53e0fc4b7013cf637c351acf8159b247f550191d4b5ac1bd49559686fddc6" }, "downloads": -1, "filename": "django-trix-0.2.tar.gz", "has_sig": false, "md5_digest": "594a5e41e4224ab9682412aadfa4bc21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89254, "upload_time": "2015-10-21T17:40:01", "url": "https://files.pythonhosted.org/packages/d1/de/3e0ddd8d841274c9b0f38d9098e0429d899d1e677e584df7ab3d5a3151be/django-trix-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7db54c1e6af7e121e9e699fc96ae7a00", "sha256": "78ee017e03bf68c5840a2e7322abf1c8ec1276bc17d324cb1a6445a6d050fb8d" }, "downloads": -1, "filename": "django-trix-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7db54c1e6af7e121e9e699fc96ae7a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89269, "upload_time": "2015-10-21T17:48:18", "url": "https://files.pythonhosted.org/packages/74/4f/d54ad714a9831acfdfaeea4d4567834cb38f049dae07b14b832d30e1a860/django-trix-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "b09f066c3ddf1a96fa56a69a886fef2d", "sha256": "bcb5bd975cb15cc17ea0667722f3bda9d8390b3cb90ba122f74816640243e0ee" }, "downloads": -1, "filename": "django-trix-0.2.2.tar.gz", "has_sig": false, "md5_digest": "b09f066c3ddf1a96fa56a69a886fef2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89236, "upload_time": "2015-11-23T04:26:54", "url": "https://files.pythonhosted.org/packages/9b/30/3123ac620d3596a7f217232ee0e72eeba098af483f1477e87ac83c943dee/django-trix-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "27e5f434c66c477224672039b4fd9a09", "sha256": "f632fd7afa8e52d26d2cb83a0349d4dfbdc445f0c9dda01ac9a2341bd9604da3" }, "downloads": -1, "filename": "django-trix-0.2.3.tar.gz", "has_sig": false, "md5_digest": "27e5f434c66c477224672039b4fd9a09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 89318, "upload_time": "2015-12-01T22:38:54", "url": "https://files.pythonhosted.org/packages/01/d8/b6a96e51adaa03f311c95661f8302b9c71843b448a4f3070cf0a9cfcc2a9/django-trix-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "0b5849faa591fd5ff8a735d7414f7c2d", "sha256": "0cf998e159b11b5be36d495887b2def4b77ede9f621a630163ddfad551b18ce2" }, "downloads": -1, "filename": "django-trix-0.2.4.tar.gz", "has_sig": false, "md5_digest": "0b5849faa591fd5ff8a735d7414f7c2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88805, "upload_time": "2017-03-10T16:00:53", "url": "https://files.pythonhosted.org/packages/35/e3/576399a3738d1cd01466df45831220db3f17b1dcf8b151254a8722ea5b15/django-trix-0.2.4.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4a7c2b7f35648e082af7365e8d0f3e6e", "sha256": "6672748af9cd3e8e8c6fbbb995a61c2781db82ccfd5064c2f9f26ce39924566b" }, "downloads": -1, "filename": "django-trix-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4a7c2b7f35648e082af7365e8d0f3e6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92547, "upload_time": "2017-03-16T19:37:16", "url": "https://files.pythonhosted.org/packages/6f/85/144453f5f73d7688be08d2fd5ecbd86eb682216fab6282529872d9072ccc/django-trix-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a7c2b7f35648e082af7365e8d0f3e6e", "sha256": "6672748af9cd3e8e8c6fbbb995a61c2781db82ccfd5064c2f9f26ce39924566b" }, "downloads": -1, "filename": "django-trix-0.3.0.tar.gz", "has_sig": false, "md5_digest": "4a7c2b7f35648e082af7365e8d0f3e6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92547, "upload_time": "2017-03-16T19:37:16", "url": "https://files.pythonhosted.org/packages/6f/85/144453f5f73d7688be08d2fd5ecbd86eb682216fab6282529872d9072ccc/django-trix-0.3.0.tar.gz" } ] }