{ "info": { "author": "Lotrek", "author_email": "dimmitutto@lotrek.it", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "\nDjld\n====\n\nStructured data with Django\n\n\n.. image:: https://img.shields.io/pypi/v/djld.svg\n :target: https://pypi.python.org/pypi/djld/\n :alt: Latest Version\n\n\n.. image:: https://codecov.io/gh/lotrekagency/djld/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/lotrekagency/djld\n :alt: codecov\n\n\n.. image:: https://travis-ci.org/lotrekagency/djld.svg?branch=master\n :target: https://travis-ci.org/lotrekagency/djld\n :alt: Build Status\n\n\n.. image:: https://img.shields.io/badge/License-MIT-blue.svg\n :target: https://github.com/lotrekagency/djld/blob/master/LICENSE\n :alt: License: MIT\n\n\nInstallation\n------------\n\n.. code-block:: sh\n\n pip install djld\n\nConfiguration\n-------------\n\nAdd ``djld`` to your INSTALLED_APPS in settings.py, you can specify the folder containing your structured data overriding the ``LD_JSON_PATH`` variable\n\nUsage\n-----\n\nTo render structured data in your templates you need the ``structured_data`` template tag\n\n.. code-block:: py\n\n {% load djld %}\n\n {% structured_data 'mydata.json' %}\n\nYou can use Django template sintax in your json files, and pass a context to the template tag\n\n.. code-block:: py\n\n render(request, 'myapp/index.html', {\n 'user_data' : {\n 'url' : 'https://lotrek.it',\n 'name' : 'Human Before Digital'\n }\n })\n\n.. code-block:: py\n\n {% load djld %}\n\n {% structured_data 'mydata.json' user_data %}\n\nYou can also render a structured data from a dictionary, without using templates\n\n.. code-block:: py\n\n render(request, 'myapp/index.html', {\n 'user_data' : {\n 'url' : 'https://lotrek.it',\n 'name' : 'Human Before Digital'\n }\n })\n\n.. code-block:: py\n\n {% load djld %}\n\n {% structured_data user_data %}\n\nRun tests\n---------\n\n.. code-block:: sh\n\n $ pip install -r requirements-dev.txt\n $ make test\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/lotrekagency/djld", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "djld", "package_url": "https://pypi.org/project/djld/", "platform": "", "project_url": "https://pypi.org/project/djld/", "project_urls": { "Homepage": "https://github.com/lotrekagency/djld" }, "release_url": "https://pypi.org/project/djld/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Structured data with Django", "version": "1.0.0" }, "last_serial": 4577260, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "41d2495b4ed1ff929ebcc224452ebd08", "sha256": "927967dc3840090eccded6002532550669a0ac905d7ac3312bd5ab79f3e77369" }, "downloads": -1, "filename": "djld-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "41d2495b4ed1ff929ebcc224452ebd08", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4973, "upload_time": "2018-12-09T12:53:37", "url": "https://files.pythonhosted.org/packages/f2/8c/29c19960606eacff39e28ef25b3253934b0e11416d12338c220a8f2ea7e5/djld-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "304ed3bf9668a8df8b956838cf883c34", "sha256": "c7707231859efc055b50943dc35f10a562b1d3a56934c16cac9248540aa27e99" }, "downloads": -1, "filename": "djld-1.0.0.tar.gz", "has_sig": false, "md5_digest": "304ed3bf9668a8df8b956838cf883c34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3700, "upload_time": "2018-12-09T12:53:39", "url": "https://files.pythonhosted.org/packages/7e/1c/496ae6e9a0d32f8e0eeb78759872b80f861c1cd8d54fb04311ec36e1f408/djld-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "41d2495b4ed1ff929ebcc224452ebd08", "sha256": "927967dc3840090eccded6002532550669a0ac905d7ac3312bd5ab79f3e77369" }, "downloads": -1, "filename": "djld-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "41d2495b4ed1ff929ebcc224452ebd08", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4973, "upload_time": "2018-12-09T12:53:37", "url": "https://files.pythonhosted.org/packages/f2/8c/29c19960606eacff39e28ef25b3253934b0e11416d12338c220a8f2ea7e5/djld-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "304ed3bf9668a8df8b956838cf883c34", "sha256": "c7707231859efc055b50943dc35f10a562b1d3a56934c16cac9248540aa27e99" }, "downloads": -1, "filename": "djld-1.0.0.tar.gz", "has_sig": false, "md5_digest": "304ed3bf9668a8df8b956838cf883c34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3700, "upload_time": "2018-12-09T12:53:39", "url": "https://files.pythonhosted.org/packages/7e/1c/496ae6e9a0d32f8e0eeb78759872b80f861c1cd8d54fb04311ec36e1f408/djld-1.0.0.tar.gz" } ] }