{ "info": { "author": "Peter Andorfer", "author_email": "peter.andorfer@oeaw.ac.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\nacdh-django-handle\n=============================\n\n.. image:: https://badge.fury.io/py/acdh-django-handle.svg\n :target: https://badge.fury.io/py/acdh-django-handle\n\nA django app to create and manage handle-pids_.\n\n\nQuickstart\n----------\n\nInstall acdh-django-handle::\n\n pip install acdh-django-handle\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'handle',\n ...\n )\n\nProvide a handle-config dict:\n\n.. code-block:: python\n\n HANDLE = {\n 'resolver': \"http://hdl.handle.net\",\n 'user': \"your handle-provider user\",\n 'pw': \"your handle-provider password\",\n 'url': \"base url to your handle-provider api\",\n 'app_base_url': \"the base url of your application\"\n }\n\nexample:\n\n.. code-block:: python\n\n HANDLE = {\n 'resolver': \"http://hdl.handle.net\",\n 'user': \"user11.1234567-01\",\n 'pw': \"password1234\",\n 'url': \"http://pid.gwdg.de/handles/11.1234567-01/\",\n 'app_base_url': \"https://myproject.com\"\n }\n\nThe value of `app_base_url` will be concaneted with the value of the `get_absolute_url` method of the model instance you want to register a handle for.\n\nAnd run\n\n python manage.py migrate handle\n\n\nCreate/register handle-pids\n----\n\nThe package provides a management command to bulk create/register handle-pids. For this you'll have to\n* add a `GenericRelation` property to the model class you would like register handles for\n* and make sure you have a `get_absolute_url` method defined\n\n.. code-block:: python\n\n from django.contrib.contenttypes.fields import GenericRelation\n from handle.models import Pid\n\n ...\n\n class Example(models.Model):\n name = models.CharField(\n max_length=255, blank=True,\n )\n ...\n pid = GenericRelation(Pid, blank=True, null=True, related_query_name=\"get_pid\")\n ...\n def get_absolute_url(self):\n return reverse('example_detail', kwargs={'pk': self.id})\n\nTo register/create handle-pids run:\n\n python manage.py crate_handles example\n\nIn case your GenericRelation property is named something else than `pid` you need to pass in the name as second argument, e.g:\n\n python manage.py crate_handles example --pid=\n\nHandle-Pids will only be crated for objects which do not have a handle-pid yet.\n\n\nFeatures\n--------\n\n* Provides a `Pid` class which stores\n * a handle-pid\n * creation and modification date\n * a generic relation to any other class of your django project.\n * an overidden save-method which will register/create a handle-pid on save in case you didn't provide a handle-pid\n\n* Provides a `handle.utils.create_handle` function to register/create a new handle-pid\n\n* Register/Create handle-pid for any objects in your project via admin-interface.\n\n* Provides a management command to bulk create/register handle-pids for all instances of a model-class in your project.\n\nBuild and publish\n-----\n\n.. code-block:: console\n\n python setup.py sdist bdist_wheel\n twine upload dist/*\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n.. _handle-pids: http://www.handle.net/\n\n\n\n\nHistory\n-------\n\n0.1.0 (2018-06-28)\n++++++++++++++++++\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/acdh-oeaw/acdh-django-handle", "keywords": "acdh-django-handle", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "acdh-django-handle", "package_url": "https://pypi.org/project/acdh-django-handle/", "platform": "", "project_url": "https://pypi.org/project/acdh-django-handle/", "project_urls": { "Homepage": "https://github.com/acdh-oeaw/acdh-django-handle" }, "release_url": "https://pypi.org/project/acdh-django-handle/0.1.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A django app to create and manage handle-pids", "version": "0.1.1" }, "last_serial": 4010709, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b94670b101e4235e041abe3498c87647", "sha256": "c521bab9613c4e179975c9bb73573b723bbc41c39bbc9c77d579704871f050c2" }, "downloads": -1, "filename": "acdh_django_handle-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b94670b101e4235e041abe3498c87647", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10454, "upload_time": "2018-06-28T09:44:43", "url": "https://files.pythonhosted.org/packages/13/bb/fd3aefd080bd1b696231b262059fcdbff84f01ba79ee6e33fc1614b3a85d/acdh_django_handle-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87ae7d18e048fbefc526a9a397abdbc5", "sha256": "1f068cf0cd88981520d3461178e5ba07366bbb1f44583b14b062c8063cb17e09" }, "downloads": -1, "filename": "acdh-django-handle-0.1.0.tar.gz", "has_sig": false, "md5_digest": "87ae7d18e048fbefc526a9a397abdbc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10045, "upload_time": "2018-06-28T09:44:44", "url": "https://files.pythonhosted.org/packages/c8/26/33bf62c3061500bf829bfaac74ea2ef3e12a10a6e34624365bc1eaa029a8/acdh-django-handle-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4651bc73ad3209bdc7a67a576329dbce", "sha256": "322b086ad2a458eb3d18d088e042d9d0186aac211f35e38873c6826cbc6188eb" }, "downloads": -1, "filename": "acdh_django_handle-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4651bc73ad3209bdc7a67a576329dbce", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10419, "upload_time": "2018-06-28T10:00:37", "url": "https://files.pythonhosted.org/packages/78/08/3f3160f447f2cb6c6bdef58ff98bdb293217dcc87dff34c13fa0745ab67c/acdh_django_handle-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d40549277104d78dbee061ed38998ef0", "sha256": "3d425e69dccbfc2f974288caf953bfb3721c509168464b01f419cc27eefb2b26" }, "downloads": -1, "filename": "acdh-django-handle-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d40549277104d78dbee061ed38998ef0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9941, "upload_time": "2018-06-28T10:00:39", "url": "https://files.pythonhosted.org/packages/47/83/e8095b30adf193a80ab3105e76d843e764e61d800e5c77798731f7af2f24/acdh-django-handle-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4651bc73ad3209bdc7a67a576329dbce", "sha256": "322b086ad2a458eb3d18d088e042d9d0186aac211f35e38873c6826cbc6188eb" }, "downloads": -1, "filename": "acdh_django_handle-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4651bc73ad3209bdc7a67a576329dbce", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10419, "upload_time": "2018-06-28T10:00:37", "url": "https://files.pythonhosted.org/packages/78/08/3f3160f447f2cb6c6bdef58ff98bdb293217dcc87dff34c13fa0745ab67c/acdh_django_handle-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d40549277104d78dbee061ed38998ef0", "sha256": "3d425e69dccbfc2f974288caf953bfb3721c509168464b01f419cc27eefb2b26" }, "downloads": -1, "filename": "acdh-django-handle-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d40549277104d78dbee061ed38998ef0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9941, "upload_time": "2018-06-28T10:00:39", "url": "https://files.pythonhosted.org/packages/47/83/e8095b30adf193a80ab3105e76d843e764e61d800e5c77798731f7af2f24/acdh-django-handle-0.1.1.tar.gz" } ] }