{ "info": { "author": "Martin Koistinen", "author_email": "mkoistinen@gmail.com", "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 :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Communications", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Message Boards" ], "description": "# djangocms-styledlink\n\nA universal, styled link plugin for django-cms.\n\nWhy would you use this instead of the djangocms-link Plugin? Well, imagine\nthat you have a number of CMS pages, but you've also defined an app-hook which\nhas a list-view and a detail view that displays any number of model objects?\nAt best, your operator would have to type in the url to that object which is\nboth annoying for the operator and brittle for the system. If the object's\nabsolute_url changes, the link will probably 404 until it is updated.\n\nThis plugin also provides more comprehensive support for different link types\n(intra-page, intra-site and external) and better search-engine support.\n\nThe plugin can be used in any placeholder and is \"text-enabled\" for use in\ntext plugins such as djangocms-text-ckeditor.\n\nThis code is tested to work with Python 2.7, Django 1.6 and django-cms 3.0,\nbut should work fine with older versions of each (within reason). One thing to\nnote is that users of Python < 2.7 may need to install `importlib` from\nhttps://pypi.python.org/pypi/importlib/.\n\n```` python\n# This is NOT needed for Django 2.7+\npip install importlib\n````\n\n### Optional but Recommended\n\nIf [`django-easy-select2`](https://github.com/asyncee/django-easy-select2) is\navailable, its Select2 widget will be used in the plugin. This not only\nprovides a much more attractive select box (the venerable\n[Select2](http://ivaynberg.github.io/select2/)), but also provides enhanced\nuseability by allow the operator to narrow the available choices by typing in\nstring. Note the screenshot below does **not** use select2, but standard\nDjango ChoiceField's widget (a normal select element).\n\n\n## Operator Configuration\n\nOperators can configure the link to go to:\n\n* A hash (works by itself for linking to an anchor on the current page, or\n on an internal object page);\n* An internal object (more below);\n* An external URL;\n\nIn addition to being very flexible with the link destination, the operator can\nalso affect:\n\n* The linked text;\n* The link\u2019s title attribute for browser implemented tooltips;\n* The target attribute to open the link in one of `same window` (default),\n `new window`, `parent window`, `top-most frame`;\n* Whether search engines should follow this link when indexing via the\n rel=\"nofollow\" attribute.\n* Zero or more styles as defined by the developer (see below);\n\n\n#### Other Features\n\n* This plugin is also 'allow_children' enabled, so, it can \"wrap\" other\n content plugins like images, by accepting them as children plugins;\n* Destination model objects URLs are updated as they change, preventing\n broken links in most cases.\n* If the destination model object is deleted, this plugin will \"decay\" from\n a link to normal text, so that broken links are not left all over\n your project.\n\n#### Features coming soon!\n\n* A management tool to assist in finding plugins whose destination objects\n no longer exist.\n\n\n## Developer Configuration\n\n### Available Internal Destination Choices\n\nThe developer can easily configure which internal objects may be link\ndestinations as follows:\n\nIn the projects settings.py, define the setting `DJANGOCMS_STYLEDLINK_MODELS`.\n\nBy default, this is set to:\n\n```` python\nDJANGOCMS_STYLEDLINK_MODELS = [\n {\n 'type': 'CMS Pages',\n 'class_path': 'cms.models.Page',\n 'manager_method': 'public',\n 'filter': { 'publisher_is_draft': False },\n }\n]\n````\n\nwhich will allow the user to select any published CMS Page as an internal\ndestination.\n\nThe developer may update this setting to include other models as well. Each\nmodel is specified within its own dict. The resulting drop-down list will\ncontain objects grouped by their `type`. The order of the `type`s in the list\nis defined by the order of their definition in this setting.\n\nThe only required attribute for each model is `class_path`, which must be the\nfull path to the model.\n\nAdditional attributes are:\n\n* `type`: This is the name that will appear in the grouped dropdown menu. If\nnot specified, the name of the class will be used E.g., \"Page\".\n\n* `filter`: You can specify additional filtering rules here. This must be\nspecified as a dict but is converted directly into kwargs internally, so,\n`{'published': True}` becomes `filter(published=True)` for example.\n\n* `order_by`: Specify the ordering of any found objects exactly as you would\nin a queryset. If this is not provided, the objects will be ordered in the\nnatural order of your model, if any.\n\n\nNOTE: Each of the defined models **must** define a get_absolute_url() method\non its objects or the configuration will be rejected.\n\nNOTE: At this time, all choices are rendered as a grouped drop-down list. If\nyour project will present a very large number of choices for the configured\nmodels, you should consider another solution until we can find another\nsolution for this project.\n\n\n#### An example of multiple types.\n\n```` python\nDJANGOCMS_STYLEDLINK_MODELS = [\n {\n 'type': 'Clients',\n 'class_path': 'myapp.Client',\n 'manager_method': 'published',\n 'order_by': 'title'\n },\n {\n 'type': 'Projects',\n 'class_path': 'myapp.Project',\n 'filter': { 'approved': True },\n 'order_by': 'title',\n },\n {\n 'type': 'Solutions',\n 'class_path': 'myapp.Solution',\n 'filter': { 'published': True },\n 'order_by': 'name',\n }\n]\n\n````\n\n\n### Link Styles\n\nThe developer can also define a number of link styles. These are \"defined\" by\ncreating the appropriate CSS class and rules and adding this class to the\nStyledLinkStyle objects in the appropriate Administration panel.\n\nThe template for the resulting link is carefully crafted using only ``'s\nso that the link will work as a inline element and, with appropriate styling,\nas an inline-block or even block-level element.\n\n```` html\n\n \n [ link and link content ]\n \n\n````\n\nWe've found this to be extremely flexible and allows for a wide variety of\nstyles, but if you find this is too limiting, you may override the template in\nthe normal Django manner.\n\nNote that the operator can choose **multiple** styles at the same time, so the\nCSS rules should allow for this, carefully considering how combinations of\nstyles should render.\n\n\n## Preview of plugin\n\nThis is an animated GIF preview of the plugin UI for a ficticious set of data.\nIt alternates between the plain form and with the drop-menu menu invoked.\n\n![](repo_images/djangocms_styledlink-preview.gif?raw=true)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mkoistinen/djangocms-styledlink/tarball/0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mkoistinen/djangocms-styledlink", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "djangocms-styledlink", "package_url": "https://pypi.org/project/djangocms-styledlink/", "platform": "OS Independent", "project_url": "https://pypi.org/project/djangocms-styledlink/", "project_urls": { "Download": "https://github.com/mkoistinen/djangocms-styledlink/tarball/0.1.1", "Homepage": "https://github.com/mkoistinen/djangocms-styledlink" }, "release_url": "https://pypi.org/project/djangocms-styledlink/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "A Universal, Styled Link Plugin for django CMS", "version": "0.2.2" }, "last_serial": 1150934, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7907a803814eb7566dcff22663a89d12", "sha256": "cb6600b8e9519372fa30b9b0776bfc0531d478d69be35fb4fadd10f68270c457" }, "downloads": -1, "filename": "djangocms-styledlink-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7907a803814eb7566dcff22663a89d12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9524, "upload_time": "2014-03-13T18:06:05", "url": "https://files.pythonhosted.org/packages/a9/98/add2d364f3d6f7662d6d21a4d0b4513bc2c557244c0fb6d501b39b8783f7/djangocms-styledlink-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "36b217432a16a1b1d49bb23d116d2617", "sha256": "4dbc89b7b263342e43f7dc13a39fad978274efd34c963f2ee6c7d82b32641780" }, "downloads": -1, "filename": "djangocms-styledlink-0.1.1.tar.gz", "has_sig": false, "md5_digest": "36b217432a16a1b1d49bb23d116d2617", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9516, "upload_time": "2014-03-13T18:58:33", "url": "https://files.pythonhosted.org/packages/ca/30/489e5debd92804d76101f7c2b25a6d0e4294b83df4a54bbcbd25a650ea18/djangocms-styledlink-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "12e9009203265106778537de04e9462a", "sha256": "79fef1cac50323425bd721bea1e1c06b1b34ed51309373d8d1bedbd26878ac9b" }, "downloads": -1, "filename": "djangocms-styledlink-0.1.3.tar.gz", "has_sig": false, "md5_digest": "12e9009203265106778537de04e9462a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10425, "upload_time": "2014-03-23T01:09:27", "url": "https://files.pythonhosted.org/packages/5b/c2/d2bef6e4d771ca0703361d95a505da2f4b1108fc55aeb2591627c1e1d6e2/djangocms-styledlink-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "742ebf25a3c598b3da6b93a429151b24", "sha256": "a2ff313643db53230e125027c6987d6f6aa39950350bd0e8775624d9c4ef7eac" }, "downloads": -1, "filename": "djangocms-styledlink-0.1.4.tar.gz", "has_sig": false, "md5_digest": "742ebf25a3c598b3da6b93a429151b24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11036, "upload_time": "2014-03-23T18:08:28", "url": "https://files.pythonhosted.org/packages/af/2f/4f1317afc7c036996cbb650a078578be1d3399c7e25382108c45f5681992/djangocms-styledlink-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "4d232f880d5c12c6fcc576a7268726b8", "sha256": "778e4c7e222253576c2a9d9b465fe3bf0a117694c98ecdf4b808069d10e907fa" }, "downloads": -1, "filename": "djangocms-styledlink-0.1.5.tar.gz", "has_sig": false, "md5_digest": "4d232f880d5c12c6fcc576a7268726b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11060, "upload_time": "2014-03-23T18:11:04", "url": "https://files.pythonhosted.org/packages/43/bc/1cbeddc4a258194d1d8137fa072b9ebcdf44a94273c41dc25e1384ec6f9d/djangocms-styledlink-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "863a6a59f4ea8becba469e00d2af259f", "sha256": "b11bcd174278a398e80e81c38bdd6ef02c5d735727155d5b909f2ef2c3c0b1bf" }, "downloads": -1, "filename": "djangocms-styledlink-0.2.0.tar.gz", "has_sig": false, "md5_digest": "863a6a59f4ea8becba469e00d2af259f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11203, "upload_time": "2014-07-03T18:47:57", "url": "https://files.pythonhosted.org/packages/94/de/9e0a2f66efcb0a4782d247b9276df77de51ad2d2b3b7c9b0f3e5c16c194b/djangocms-styledlink-0.2.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "159a5d95dc74ae530a3b20724704c457", "sha256": "1974bfd5bcbc43f5bd5fc854bcd73de7978c28b89415081558fb336a2a9f683d" }, "downloads": -1, "filename": "djangocms-styledlink-0.2.2.tar.gz", "has_sig": false, "md5_digest": "159a5d95dc74ae530a3b20724704c457", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11201, "upload_time": "2014-07-08T13:45:57", "url": "https://files.pythonhosted.org/packages/e7/76/b9f96bc4dea680b506bde215a7d58d7c343f476306794569b237aa36ef04/djangocms-styledlink-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "159a5d95dc74ae530a3b20724704c457", "sha256": "1974bfd5bcbc43f5bd5fc854bcd73de7978c28b89415081558fb336a2a9f683d" }, "downloads": -1, "filename": "djangocms-styledlink-0.2.2.tar.gz", "has_sig": false, "md5_digest": "159a5d95dc74ae530a3b20724704c457", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11201, "upload_time": "2014-07-08T13:45:57", "url": "https://files.pythonhosted.org/packages/e7/76/b9f96bc4dea680b506bde215a7d58d7c343f476306794569b237aa36ef04/djangocms-styledlink-0.2.2.tar.gz" } ] }