{ "info": { "author": "Alessandro Molina", "author_email": "alessandro.molina@axant.it", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: TurboGears", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "About Tagging\n-------------------------\n\ntgext.tagging is a TurboGears2 library that permits to quickly add tagging\nto any project managing tags, tagging, tag clouds and widgets to\nlist, remove and add tags to entities.\n\nInstalling\n-------------------------------\n\ntgext.tagging can be installed both from pypi or from bitbucket::\n\n pip install tgext.tagging\n\nshould just work for most of the users\n\nEnabling Tagging Management\n--------------------------------\n\nFor TurboGears 2.2+ using **tgext.pluggables** is suggested::\n\n from tgext.pluggable import plug\n plug(base_config, 'tgext.tagging')\n\nFor previous versions edit ``model/__init__.py`` and add the following lines::\n\n import tgext.tagging\n Tag, Tagging = tgext.tagging.setup_model()\n\nmost of the utitiles to manage tagging are exposed by the Tagging class\nthey expose:\n\n - Tag.lookup(tag_name) -> Returns the Tag instance for the given tag name\n - Tag.lookup_list(comma_separated_tags) -> Returns the tags instances for each entry in the tags list.\n\n - Tagging.items_for_tags(Model, comma_separated_tags) -> Returns the list of items having the given tags\n - Tagging.tag_cloud_for_object(item) -> Returns the list of tags for the given object\n - Tagging.tag_cloud_for_set(Model, items=None) -> Returns the tag cloud for the given set of items.\n if a list of items is passed it will retrieve tags for the given list, otherwise for all the items\n of the given Model.\n - Tagging.tag_cloud_for_user(user, Model=None) -> Returns all the tags set by the given user.\n if any Model is passed it will retrieve tags only for that model.\n - Tagging.add_tags(item, comma_separated_tags) -> Add the given tags to the item\n - Tagging.del_tags(item, comma_separated_tags) -> Removes the given tags from the item\n - Tagging.set_tags(item, comma_separated_tags) -> Replaces all the tags of the item with the new list\n\nTagging Controller\n-------------------\n\ntgext.tagging provides a controller to manage tagging.\nEnable it inside your project with the following code::\n\n from tgext.tagging.controllers import TaggingController\n\n class RootController(BaseController):\n tagging = TaggingController(model=Group, session=DBSession, allow_edit=None)\n\nYou can enable multiple *TaggingController* one for each model available\nin your application. The *model* parameter indicates for which model objects tags will be\nmanaged, *session* is the sqlalchemy session used to perform queries and *allow_edit*\nis the repoze.what predicates used to check if to show editing functions.\n\nThe controller provides *tags*, *add*, *remove*, *search* actions:\n\n - /tags/id -> Partial view that can be loaded with jQuery.load that displays a taglist\n with form to add/remove tags for the given object.\n - /add/id?tags=tag1,tag2,tag3 -> Permits to add one or more tags to the item\n - /remove/id?tags=tag1,tag2 -> Permits to remove one or more tags from the item\n - /search?tags=tag1,tag -> Searches for items having the given tags, will use **Model.tagging_display**\n method to display the results if available. Otherwise *str(Model)* is performed.\n\nTagging Widgets\n------------------\n\ntgext.tagging provides some widgets to manage tags.\n**tgext.tagging.widgets.TagList** and **tgext.tagging.widget.TagCloud** are provided.\nBoth take a **tagging_url** parameter at construction which points to the url of the tagging\ncontroller that can be used by the widget to manage tags. By default this points to /tagging.\n**TagList** widget also takes a editmode parameter which permits to specify if controls to\nadd and remove tags must be shown or not.\n\nAt rendering **TagList** takes an object as argument and will show the tag list for the given object,\nwhile **TagCloud** takes a tag cloud returned by Tagging.tag_cloud_for_object, Tagging.tag_cloud_for_set or\nTagging.tag_cloud_for_user and will show a weighted tag cloud.\n\nUsing with SQLITE\n-----------------\n\ntgext.tagging relies heavily on ``SAVEPOINT`` to correctly handle\ntagging uniqueness. The default SQLite behaviour is incompatible\nwith savepoints and requires some additional changes which are not\nrequired when working with MySQL or Postgres.\n\nUsually to make SQLite and zope.sqlalchemy properly behave the following code\nis required before using your models::\n\n from sqlalchemy import event\n\n @event.listens_for(engine, \"connect\")\n def do_connect(dbapi_connection, connection_record):\n # Disable SQLITE automatic transactions\n dbapi_connection.isolation_level = None\n\n @event.listens_for(engine, \"begin\")\n def do_begin(conn):\n # Manually emit SQLITE transaction begin\n conn.execute(\"BEGIN\")\n\n # Tell zope.sqlalchemy that SQLITE now supports SAVEPOINT\n from zope.sqlalchemy import datamanager\n datamanager.NO_SAVEPOINT_SUPPORT = set()\n\nForgetting to properly place this code will usually result in errors like::\n\n (OperationalError) no such savepoint: sa_savepoint_3 u'ROLLBACK TO SAVEPOINT sa_savepoint_3' ()\n\nor::\n\n TypeError: ('Savepoints unsupported', )\n\nSee `SQLite Serializable `_\nfor additional details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/_amol_/tgext.tagging", "keywords": "turbogears2.extension", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tgext.tagging", "package_url": "https://pypi.org/project/tgext.tagging/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tgext.tagging/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/_amol_/tgext.tagging" }, "release_url": "https://pypi.org/project/tgext.tagging/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Tagging support for TurboGears2 applications", "version": "0.3.0" }, "last_serial": 5486077, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "94b4411afe1d4ccd666c5f8d9f5618ff", "sha256": "145045a620b826f80b6b392dd90033eb7940b13bb09cc52c42da93a0d6d6ddda" }, "downloads": -1, "filename": "tgext.tagging-0.1.tar.gz", "has_sig": false, "md5_digest": "94b4411afe1d4ccd666c5f8d9f5618ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11063, "upload_time": "2011-05-07T02:39:55", "url": "https://files.pythonhosted.org/packages/eb/59/d3fccf1933b13e83b79e40d828629f6cc5d1b306705e77ea34e9afe0b4bd/tgext.tagging-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "21d95f4af4a5b42ab2bd827500d73a3d", "sha256": "3b7bfd1421765d2d056541f6c0a469ec28ea9deeb941e84c3d69e2c745c0ec94" }, "downloads": -1, "filename": "tgext.tagging-0.1.1.tar.gz", "has_sig": false, "md5_digest": "21d95f4af4a5b42ab2bd827500d73a3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12345, "upload_time": "2012-01-11T21:39:50", "url": "https://files.pythonhosted.org/packages/6c/2b/19819521f3358d04fc10fc39ca5f4aa9ed08da8b6ead40d79f19cf6ed5d9/tgext.tagging-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3ef146c5a936fccabd0e977ff11d1733", "sha256": "85043f24b9c471576402a26f66575d698b300d7a9451b49201bd59d8805ace98" }, "downloads": -1, "filename": "tgext.tagging-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3ef146c5a936fccabd0e977ff11d1733", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10698, "upload_time": "2012-01-11T21:45:14", "url": "https://files.pythonhosted.org/packages/e1/0b/0813cd33d3555ec91377af2ddc29124659254fa09f21043312f6528ed6d1/tgext.tagging-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3b1142aca815fc72ba15cc8416c0a98b", "sha256": "fa5fa688d066761e75c002a6fbc235ee41300d17dacdba7831ad71a9c281e515" }, "downloads": -1, "filename": "tgext.tagging-0.2.0.tar.gz", "has_sig": false, "md5_digest": "3b1142aca815fc72ba15cc8416c0a98b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11875, "upload_time": "2012-09-05T20:05:50", "url": "https://files.pythonhosted.org/packages/9d/47/7f2e315619ee92b13616308102212bc8c3b50210f052438ff30dcde11422/tgext.tagging-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d1177a4ab080c1539c8b5cafa1cfec2c", "sha256": "e566e19fe2f0a827dbedbd28c7a505d4dd34b8e2041cea1c7ba262d2e70cdc71" }, "downloads": -1, "filename": "tgext.tagging-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d1177a4ab080c1539c8b5cafa1cfec2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11872, "upload_time": "2012-09-08T12:45:20", "url": "https://files.pythonhosted.org/packages/04/ce/5897faedbec44c6ff14742b487b9fad164cf25c2b9970b2ebad836a2afce/tgext.tagging-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c9a02b5a0558e97561a285fc9d89f21d", "sha256": "7160473b4a99d91d094f0f16ccd9512a3150a979a274f956e4ce3e251faea193" }, "downloads": -1, "filename": "tgext.tagging-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c9a02b5a0558e97561a285fc9d89f21d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15330, "upload_time": "2014-12-09T23:08:39", "url": "https://files.pythonhosted.org/packages/63/9d/2e2b9b44e9b32c0fb7917dff3474e1c188ae12bf8de03b73241ad3293e3f/tgext.tagging-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9a02b5a0558e97561a285fc9d89f21d", "sha256": "7160473b4a99d91d094f0f16ccd9512a3150a979a274f956e4ce3e251faea193" }, "downloads": -1, "filename": "tgext.tagging-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c9a02b5a0558e97561a285fc9d89f21d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15330, "upload_time": "2014-12-09T23:08:39", "url": "https://files.pythonhosted.org/packages/63/9d/2e2b9b44e9b32c0fb7917dff3474e1c188ae12bf8de03b73241ad3293e3f/tgext.tagging-0.3.0.tar.gz" } ] }