{ "info": { "author": "Kristian \u00d8llegaard, Benjamin Wohlwend", "author_email": "kristian@oellegaard.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "cmsplugin-text-ng\n=================\n\nAn enhanced version of the ``Text`` plugin for `django CMS`_. It allows wrapping\nthe text plugin inside a template selectable by the CMS content editor.\n\n.. note::\n This plugin is not meant to replace ``cms.plugins.text``. It is an\n enhancement for certain use cases. For most types of content, you should\n probably still use ``cms.plugins.text`` or write a specifically tailored\n plugin.\n\nRequirements\n------------\n\n* Django 1.4+\n* Django CMS 2.3+\n* djangocms-text-ckeditor (only if using cms 3+)\n\n\nInstallation\n------------\n\n * Add ``cmsplugin_text_ng`` to your ``INSTALLED_APPS``.\n * Create some templates (more on that soon) and add them in the admin.\n\n\nBasic example: static template\n------------------------------\n\nLet's say you want to have a text plugin with a facebook \"like\" button. Your\ntemplate could look something like this::\n\n
\n {{ body|safe }}\n
\n
\n

Like this page on facebook!

\n \n
\n\n\nAdvanced example: dynamic template\n----------------------------------\n\nLet's assume you want to set the content of the ``

``-tag on a per-plugin\nbasis. No problem! That's what the ``{% define %}`` template tag does::\n\n {% load text_ng_tags %}\n {% define h2_content as text %}\n
\n {{ body|safe }}\n
\n
\n

{{ h2_content }}

\n \n
\n\nWhen you edit the plugin, you will now have a text box with the \"h2_content\" as\na label. Its content will be added to the context when rendering the plugin. You\ncan access it like any context variable: ``{{ h2_content }}``.\n\nThe ``as text`` part of the template tag refers to the type of the variable.\ncmsplugin-text-ng comes with one type (``text``). Additionally, there is an\n``image`` type in ``cmsplugin_text_ng.contrib.textng_filer`` that uses\n`django-filer`_ to add images to the template context. If you want to use it,\nmake sure that both ``filer`` and ``cmsplugin_text_ng.contrib.textng_file`` are\nlisted in your ``INSTALLED_APPS``.\n\nReally (just kidding) advanced example: define your own types\n-------------------------------------------------------------\n\nSo, you want to add some HTML code right below the \"like\" button, and your\ncontent editors insist on using TinyMCE. Let's do this! Using the awesome\n``HTMLField`` from `django-tinymce`_, we set up a model with a tinymce'd\ntextarea::\n\n from django.utils.translation import ugettext_lazy as _\n\n from tinymce.models import HTMLField\n\n from cmsplugin_text_ng.models import TextNGVariableBase\n from cmsplugin_text_ng.type_registry import register_type\n\n class TextNGVariableHTML(TextNGVariableBase):\n value = HTMLField(null=True, verbose_name=_('value'))\n\n class Meta:\n verbose_name = _('html text')\n verbose_name_plural = _('html texts')\n\n register_type('htmltext', TextNGVariableHTML)\n\nA couple of things to note:\n\n * your type has to inherit from ``TextNGVariableBase``.\n * the field containing the data that should end up in the context has to be\n named \"value\"\n * it has to be nullable (the ``null=True`` part).\n * the type name (``htmltext`` in the example) has to be unique over the whole\n project. You might want to prefix it with something unique to your app.\n\ncmsplugin-text-ng will complain (loudly!) if these conditions are not met.\n\nWhere were we? Right, the template. To use your new, awesome type in a template,\njust use the ``{% define %}`` tag to your advantage, like so::\n\n {% load text_ng_tags %}\n {% define h2_content as text %}\n {% define html_content as htmltext %}\n
\n {{ body|safe }}\n
\n
\n

{{ h2_content }}

\n \n {{ html_content|safe }}\n
\n\nDone.\n\n.. _django CMS: https://www.django-cms.org\n.. _django-filer: https://github.com/stefanfoulis/django-filer\n.. _django-tinymce: https://github.com/aljosa/django-tinymce", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/KristianOellegaard/cmsplugin-text-ng", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "cmsplugin-text-ng", "package_url": "https://pypi.org/project/cmsplugin-text-ng/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cmsplugin-text-ng/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/KristianOellegaard/cmsplugin-text-ng" }, "release_url": "https://pypi.org/project/cmsplugin-text-ng/0.6/", "requires_dist": null, "requires_python": null, "summary": "django-cms improved text plugin", "version": "0.6" }, "last_serial": 1217649, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c390a8e132f0aa80ae380dc2686b5f12", "sha256": "fe069fed996e6e297747f1cfeaeb22bb3184e7902f7438c42d09bfd93f09f440" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.1.tar.gz", "has_sig": false, "md5_digest": "c390a8e132f0aa80ae380dc2686b5f12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3097, "upload_time": "2012-03-09T12:16:34", "url": "https://files.pythonhosted.org/packages/ca/2e/9bd4101e1010a21b163326a42ab734815b7610fcf9b9dc94da2cd951649b/cmsplugin-text-ng-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ef20d3755e2ce3016c53f346270f64ff", "sha256": "7680ef192734cf537d7eb9f7de852a36468abb244ce60df3d64ceb1e0caf1b5c" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ef20d3755e2ce3016c53f346270f64ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3139, "upload_time": "2012-03-09T12:21:32", "url": "https://files.pythonhosted.org/packages/9b/78/2505f9e42291e14023d20963423806b5992b55b5b881adb00b68a90af348/cmsplugin-text-ng-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a04d4c83e711c2f586bb98b45b65a838", "sha256": "479d0f31923edd225be32f162ab9a6e0feb3070dfc0c46f2a5fc45f81bee76c3" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a04d4c83e711c2f586bb98b45b65a838", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2871, "upload_time": "2012-03-09T12:24:50", "url": "https://files.pythonhosted.org/packages/5a/d3/d5bb1484dc7ed08ae5bd3cd3280eaf827ec23d889048a3ff25913924fc8c/cmsplugin-text-ng-0.1.2.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "6090c85f087fa2aa5e52058e5856a505", "sha256": "f626f398b48d2bf854be9082a49ff1fd787557e5cfadb84aa152bd312ce475aa" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.2.tar.gz", "has_sig": false, "md5_digest": "6090c85f087fa2aa5e52058e5856a505", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6482, "upload_time": "2012-03-20T11:30:49", "url": "https://files.pythonhosted.org/packages/de/34/d13a9c45f994f038c8fb252436be36b746896c7698f857978ae3471088df/cmsplugin-text-ng-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "25d1717b67df4cf7902cb14a1ce8cf73", "sha256": "70851c0a74b60eac092dace9797162b5b7610ae1d4a51c1589a8be58deffa224" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.2.1.tar.gz", "has_sig": false, "md5_digest": "25d1717b67df4cf7902cb14a1ce8cf73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10297, "upload_time": "2012-03-20T13:11:44", "url": "https://files.pythonhosted.org/packages/d9/cc/b7d7c35f64c2ba93bd6f1d9b990545f50fd2ddb69bbbe80b8fdf8058b5c9/cmsplugin-text-ng-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a6846ae266c01d2ba9f17cf8180e94eb", "sha256": "c46b0acb1fd4b0edae11d2add5bd2678483ca6a9a99af09c6d240f05166da9e3" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a6846ae266c01d2ba9f17cf8180e94eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10657, "upload_time": "2012-03-20T17:40:57", "url": "https://files.pythonhosted.org/packages/7d/47/4a1fd23f6886d48371f0e1fe77bb70305e38a8795a425c452c34202e10ae/cmsplugin-text-ng-0.2.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7cd3861247a0ac44b866e99849f999d5", "sha256": "9c3b5d61cd999df2922cf32bc24ee05a394c2aa3f51af436106af99cbd79f6a1" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.3.tar.gz", "has_sig": false, "md5_digest": "7cd3861247a0ac44b866e99849f999d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10735, "upload_time": "2013-04-18T11:41:15", "url": "https://files.pythonhosted.org/packages/e2/e9/90f9e72a2f8da7fd88e1eecc3f103b8c988c86650a7be489e119cb2475ad/cmsplugin-text-ng-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9d8c5ae890ebcc01c4bc914679a3d0c8", "sha256": "0b6610e34cbd1f2f576dee3e8e142646671ada260f65be40e1e3835dc627ce55" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.4.tar.gz", "has_sig": false, "md5_digest": "9d8c5ae890ebcc01c4bc914679a3d0c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9737, "upload_time": "2013-12-23T02:29:50", "url": "https://files.pythonhosted.org/packages/90/af/51a7f7d6d632de8e150df1fd6d3938621e9e16e06e3fd9d7b564ebbafec1/cmsplugin-text-ng-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "82d244671dd9069fd3e14ed16b651978", "sha256": "b398754bab857bfcc748bf01668a987a05d7d28fed19d4267e93387053f115b8" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.5.tar.gz", "has_sig": false, "md5_digest": "82d244671dd9069fd3e14ed16b651978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11554, "upload_time": "2014-05-09T14:33:05", "url": "https://files.pythonhosted.org/packages/b7/3d/6269bfc55d4d55342383bb6f33dcc64f0dbf938981a5ab3f4c79c628a654/cmsplugin-text-ng-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "dbd527f32973a49ff4b47134ae30f8f0", "sha256": "92cd33ba851bb9650effa187f4aa786004e2560730b6c3eb647fd2421daabd14" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.6.tar.gz", "has_sig": false, "md5_digest": "dbd527f32973a49ff4b47134ae30f8f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10144, "upload_time": "2014-09-08T23:22:42", "url": "https://files.pythonhosted.org/packages/b8/64/a654c38a25610c586c564afb64230d87498e4bf4271d24a8a22e169f1b8b/cmsplugin-text-ng-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dbd527f32973a49ff4b47134ae30f8f0", "sha256": "92cd33ba851bb9650effa187f4aa786004e2560730b6c3eb647fd2421daabd14" }, "downloads": -1, "filename": "cmsplugin-text-ng-0.6.tar.gz", "has_sig": false, "md5_digest": "dbd527f32973a49ff4b47134ae30f8f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10144, "upload_time": "2014-09-08T23:22:42", "url": "https://files.pythonhosted.org/packages/b8/64/a654c38a25610c586c564afb64230d87498e4bf4271d24a8a22e169f1b8b/cmsplugin-text-ng-0.6.tar.gz" } ] }