{ "info": { "author": "Antonio Jimenez Mavillard", "author_email": "ajmavillard@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "django-zotero\n=============\ndjango-zotero_ is a django_ app that provides a generic formset to tag any django_ object with Zotero_ metadata. Tagged object are easily exportable to Zotero_ in one click.\n\n\nInstallation\n------------\nFirst of all, it is needed to have pip_ installed on your system. It is strongly recommended to install virtualenv_ and virtualenvwrapper_ to take the most advantage of pip_.\n\nTo install pip_, go to http://www.pip-installer.org/en/latest/installing.html\n\nTo install virtualenv_, go to https://pypi.python.org/pypi/virtualenv\n\nTo install virtualenvwrapper_, go to http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation\n\nNow install django-zotero_::\n\n $ pip install django-zotero\n\n\nUsage\n-----\nTo use django-zotero_, follow the next steps:\n\n1) Django settings: add the app name to INSTALLED_APPS in settings.py::\n\n INSTALLED_APPS = (\n #...,\n 'zotero',\n )\n\n2) Administration side: add the following code to admin.py:\n\n a) Import the class TagInlineAdmin [#]_::\n\n from zotero.admin import TagInlineAdmin\n\n b) For each model you wish to tag, add to its admin class::\n\n inlines = (\n #...,\n TagInlineAdmin,\n )\n\n3) User side: add the following code:\n\n a) In views.py:\n\n i) Import the function get_tag_formset [#]_::\n\n from zotero.forms import get_tag_formset\n\n ii) In the view that manages the tagged object, instanciate the formset and save it::\n\n tag_formset = get_tag_formset(\n obj=form.instance,\n data=request.POST,\n show_labels=False,\n labels={\n 'item_type': 'Document type',\n #...,\n }\n )\n #...\n tag_formset.save()\n\n b) In the template that manages the object:\n\n i) Import the template tag zotero_inline_tags [#]_::\n\n {% load zotero_inline_tags from zotero_inline_extras %}\n\n ii) Render the formset::\n\n {% zotero_inline_tags formset %}\n\n c) In the template that renders the object:\n\n i) Import the template tag zotero_tags [#]_::\n\n {% load zotero_tags from zotero_tags_extras %}\n\n ii) Render Zotero_ metadata::\n\n {% zotero_tags\n object=document\n vocabulary=\"dc\"\n output_method=\"meta\" %}\n\n.. [#] TagInlineAdmin is an inline class ready to be added as inline of other admin class.\n.. [#] get_tag_formset is a function that gets the formset with Zotero tags for an object. It is based on a generic formset factory and takes four arguments:\n\n 1) `obj`: object to tag\n\n 2) `data`: data to instanciate the content of the formset\n\n 3) `show_labels`: if true, show the labels as headers on the top of the formset; if false, show the labels as placeholders\n\n 4) `labels`: set alternative labels - default labels are 'item_type', 'field' and 'value'\n\n.. [#] zotero_inline_tags is a template tag that renders a formset. It takes one argument: the formset it renders.\n.. [#] zotero_tags is a template tag that renders the HTML code of Zotero_ metadata. It takes three arguments:\n\n 1) `object`: tagged object\n\n 2) `vocabulary`: the vocabulary to code the metadata - currently it works with Dublin Core (\"dc\")\n\n 3) `output_method`: the method to code the metadata - currently it works HTML tags (\"meta\")\n\n.. _django-zotero: https://pypi.python.org/pypi/django-zotero/0.1\n.. _django: https://www.djangoproject.com/\n.. _Zotero: http://www.zotero.org/\n.. _pip: https://pypi.python.org/pypi/pip\n.. _virtualenv: https://pypi.python.org/pypi/virtualenv\n.. _virtualenvwrapper: http://virtualenvwrapper.readthedocs.org/", "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/CulturePlex/django-zotero", "keywords": "zotero django admin tag meta metatag", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-zotero", "package_url": "https://pypi.org/project/django-zotero/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-zotero/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/CulturePlex/django-zotero" }, "release_url": "https://pypi.org/project/django-zotero/0.4/", "requires_dist": null, "requires_python": null, "summary": "Django tool to tag objects and export them to Zotero", "version": "0.4" }, "last_serial": 1374651, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e139d7253696dfcd73ec22ed81048520", "sha256": "e004d8f7f7de6c69cc96bea1f3355dd5012cdc34174b540bbbc3bec9e9faab7b" }, "downloads": -1, "filename": "django-zotero-0.1.tar.gz", "has_sig": false, "md5_digest": "e139d7253696dfcd73ec22ed81048520", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70397, "upload_time": "2014-03-10T03:19:45", "url": "https://files.pythonhosted.org/packages/d9/5f/4a979401384b86fe83959793a87a9489665ca7ffbf00e4139e018749c46f/django-zotero-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8f576e7f0204425658aba0aca5670f33", "sha256": "aa86438eb5eea5d7d134a4382d5cfba83035af6e9e8b7236db9813ca5eb7997c" }, "downloads": -1, "filename": "django-zotero-0.2.tar.gz", "has_sig": false, "md5_digest": "8f576e7f0204425658aba0aca5670f33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135230, "upload_time": "2014-08-24T21:26:56", "url": "https://files.pythonhosted.org/packages/95/9c/800614236fc16d1a9bd23e5bdf66a7a1d9fb999668b53606f9d6d6f0beaa/django-zotero-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "92c25eeba9c0fdc02560c1d9110d0765", "sha256": "9192ab27c50856ed91d9ca9d6f8125f1dc1125964dc6ff70bf272c76aeea9d0c" }, "downloads": -1, "filename": "django-zotero-0.3.tar.gz", "has_sig": false, "md5_digest": "92c25eeba9c0fdc02560c1d9110d0765", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136336, "upload_time": "2015-01-07T20:49:39", "url": "https://files.pythonhosted.org/packages/fa/8d/f9749f8f15448a0c1a02d47680ae2b4e988a267b24a89b685e441ee39dd5/django-zotero-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "34eb412e74be6aba97c4522a42609e1f", "sha256": "0f9fc116c8961e6326a8b84e8619902c3e466bdd97cda1649a2991ab12a19ff0" }, "downloads": -1, "filename": "django-zotero-0.4.tar.gz", "has_sig": false, "md5_digest": "34eb412e74be6aba97c4522a42609e1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136339, "upload_time": "2015-01-07T21:00:34", "url": "https://files.pythonhosted.org/packages/6e/ae/240820aee5c7c2bddb0ac01c30df5355e42c127c6a49166ccd57f1c164b5/django-zotero-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "34eb412e74be6aba97c4522a42609e1f", "sha256": "0f9fc116c8961e6326a8b84e8619902c3e466bdd97cda1649a2991ab12a19ff0" }, "downloads": -1, "filename": "django-zotero-0.4.tar.gz", "has_sig": false, "md5_digest": "34eb412e74be6aba97c4522a42609e1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 136339, "upload_time": "2015-01-07T21:00:34", "url": "https://files.pythonhosted.org/packages/6e/ae/240820aee5c7c2bddb0ac01c30df5355e42c127c6a49166ccd57f1c164b5/django-zotero-0.4.tar.gz" } ] }