{
"info": {
"author": "Peter Hogg",
"author_email": "peter@havenaut.net",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python"
],
"description": "# django-inlineobjects\n\nA reusable [Django](http://www.djangoproject.com/) application used to render objects within strings. This application was originally created by [Nathan Borror](http://nathanborror.com/) for [django-basic-apps](https://github.com/nathanborror/django-basic-apps), his collection of simple prebuilt Django applications.\n\n\n## Requirements\n\n* [BeautifulSoup](http://www.crummy.com/software/BeautifulSoup/) is required for parsing markup.\n\n\n## Installation\n\ndjango-inlineobjects is available on PyPI and can be installed with PIP.\n\n pip install django-inlineobjects\n\nAlternatively, you may download the source and install it.\n\n python setup.py install\n\n\n## Usage\n\nTo include a photo in a blog post body, you might put the following into the body field:\n\n \n\nTo render this in a template, you would use the template filter.\n\n {% load inlines_tags %}\n {{ post.body|render_inlines }}\n\nThis would insert the `Photo` object with an ID of `1` from the app `media` into the post body.\n\n\n### Multiple Objects\n\nTo render multiple objects of the same type, you could use multiple tags:\n\n \n \n \n\nOr you could achieve the same list by using a single tag with a comma separated list of identifiers.\n\n \n\n\n### Admin\n\nA javascript-based interface to add inlines can be added to the Django admin site using the included template. The included template must be added to the relevant model's change form.\n\nFor example, to add the interface to the `body` field of the `Post` model in an application called `blog`, you would create the template `admin/blog/post/change_form.html`. The content of that template would contain the following:\n\n {% extends \"admin/change_form.html\" %}\n\n {% block extrahead %}\n {{ block.super }}\n {% include 'inlines/inlines.js' with field='post' %}\n {% endblock %}\n\nThis template expands the default `admin/change_form.html` template, including `inlines/inlines.js` in the `extrahead` block. The included template expects the variable `field` to be included in the context. The variable should be set to the name of the model field that you want the inlines to be applied to.\n\n\n### Templates\n\nHow content is rendered is determined by a template. The renderer will look for the following template names:\n\n /inlines/.html\n inlines/_.html\n inlines/default.html\n\nGiven the previous inline tag example with `type=\"media.photo\"`, the preferred template path would be `media/inlines/photo.html`.\n\nA template name suffix may also be specified in the inline tag. This can be done either with a `template_name_suffix` attribute or, to save keystrokes, a `template` suffix. The following two tags are equivalent:\n\n \n \n\nBoth will result in the parser looking for the following template paths:\n\n media/inlines/photo_banner.html\n inlines/media_photo_banner.html\n inlines/default.html\n\n\n### Context\n\nIn addition to the specified object, each attribute of the inline tag is passed to the template context.\n\nThis allows you to support arbitrary attributes, such as class names:\n\n \n\nWhich can then be accessed in your template:\n\n
\n\n\n## Setup\n\nAdd `inlines` to your `settings.INSTALLED_APPS`.\n\n\n## Settings\n\n### `INLINES_LOOKUP_KEYS`\n\nDefault: `['id']`\n\nProvide a list of attribute keys which should be used to lookup objects. For example, if you want to be able to reference objects by their ID or their slug, you would set `INLINES_LOOKUP_KEYS = ['id', 'slug']`.\n\n### `INLINES_DEBUG`\n\nDefault: `settings.DEBUG`\n\nWhen debug is disabled, the renderer will fail silently if it encounters any errors. The inline tag will simply be replaced by an empty string in the output. When debug is enabled, relevant errors will be raised.\n\n### `INLINES_CACHE_TIMEOUT`\n\nDefault: `0`\n\nWhen set to a positive integer, this will cause the rendered to be cached for the given amount of seconds.\n\nNote that the cache key is unique to the inline tag. If you allow lookups by `id` and `slug`, and refer to an object by its `id` in one tag and its `slug` in another tag, this will result in two seperate cache entries, despite the rendered template being identical for both:\n\n \n \n\n### `INLINES_ALLOWED_TYPES`\n\nDefault: `None`\n\nBy default the renderer will attempt to lookup any object given in the `type` attribute of the inline tag. If you wish to only support certain objects, you may whitelist them here. Doing this will prevent querying the database for objects for which you do not have inline templates.\n\n### `INLINES_MANAGERS`\n\nDefault: `None`\n\nIf you have a custom manager you wish to always be used when querying objects of a certain type, you may define it as a dictionary here.\n\nFor instance, perhaps you use inlines to include photos. Your photos may go through some approval process before they are allowed to be displayed publicly. You have a `published()` manager which include filters to only return published photos. If you never want to allow unpublished photos to be rendered as inlines, you could set this option to:\n\n INLINES_MANAGERS = {\n 'media.photo': 'published',\n }\n\nWhen the renderer is querying photos with this configuration, it will only use `Photo.objects.published().filter(...)`.",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/pigmonkey/django-inlineobjects",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "django-inlineobjects",
"package_url": "https://pypi.org/project/django-inlineobjects/",
"platform": "",
"project_url": "https://pypi.org/project/django-inlineobjects/",
"project_urls": {
"Homepage": "https://github.com/pigmonkey/django-inlineobjects"
},
"release_url": "https://pypi.org/project/django-inlineobjects/2.0.3/",
"requires_dist": null,
"requires_python": "",
"summary": "A reusable Django application used to insert content objects into other pieces of content.",
"version": "2.0.3"
},
"last_serial": 5858912,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "03b440857639f0ec02ae1095d3ca4eb5",
"sha256": "88afcd4008677b7066481e97e0cfb13a3fbae20f774d9fea83bda1822899ee1b"
},
"downloads": -1,
"filename": "django_inlineobjects-1.0-py2.7.egg",
"has_sig": true,
"md5_digest": "03b440857639f0ec02ae1095d3ca4eb5",
"packagetype": "bdist_egg",
"python_version": "2.7",
"requires_python": null,
"size": 11581,
"upload_time": "2012-07-20T03:59:41",
"url": "https://files.pythonhosted.org/packages/0a/2b/8b6b346b09a75857d1ad957e8686992adb54e91103657dc5673c10c18658/django_inlineobjects-1.0-py2.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "580cff1f9ee3f12a30e6b72f4504438a",
"sha256": "2511fce91de3ce75da8efdc37303ddb1fbb97af04bf7d4ea07c30333a9c4d836"
},
"downloads": -1,
"filename": "django-inlineobjects-1.0.tar.gz",
"has_sig": true,
"md5_digest": "580cff1f9ee3f12a30e6b72f4504438a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6745,
"upload_time": "2012-07-20T04:00:15",
"url": "https://files.pythonhosted.org/packages/2a/d1/5cdd199cc491658a87a9a65c0dc06f3e972473c7952a7db1d6d91085ef81/django-inlineobjects-1.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "5c7f5c38e0496d594c777607db3a6645",
"sha256": "958ded35307a11b3a3ee43c44611297421fa9fd202f138ce9e2ea96cf1cbb39d"
},
"downloads": -1,
"filename": "django_inlineobjects-1.0.1-py2.7.egg",
"has_sig": true,
"md5_digest": "5c7f5c38e0496d594c777607db3a6645",
"packagetype": "bdist_egg",
"python_version": "2.7",
"requires_python": null,
"size": 11677,
"upload_time": "2012-07-20T04:09:36",
"url": "https://files.pythonhosted.org/packages/a2/69/e08b5f0299348c2403fb8d8e32f982146927a1b09e46a370b1852e6a3e1c/django_inlineobjects-1.0.1-py2.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "a58e6df9e17615f3ddfc8699b3c9aea2",
"sha256": "4df6c537bcb7bd5500421d199b9a1f9d4524832420279ee9204d7a4ab3d0708e"
},
"downloads": -1,
"filename": "django-inlineobjects-1.0.1.tar.gz",
"has_sig": true,
"md5_digest": "a58e6df9e17615f3ddfc8699b3c9aea2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6846,
"upload_time": "2012-07-20T04:09:44",
"url": "https://files.pythonhosted.org/packages/20/30/0fb55fad11dd54d323d645773d8523789a8d741a48ad3d0eb7560bbe0b90/django-inlineobjects-1.0.1.tar.gz"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "3e0662d0e861b8bf48cade4da0e50d49",
"sha256": "514af1b63cc0a3eda6ad092d77ec2b0464489456fa92dff574cad74ebbdaa0bc"
},
"downloads": -1,
"filename": "django_inlineobjects-1.0.2-py2.7.egg",
"has_sig": true,
"md5_digest": "3e0662d0e861b8bf48cade4da0e50d49",
"packagetype": "bdist_egg",
"python_version": "2.7",
"requires_python": null,
"size": 11704,
"upload_time": "2013-05-30T01:03:02",
"url": "https://files.pythonhosted.org/packages/dd/81/a9ca1df882c98c46e6e6f5f057d03a02b89db2e1c5b8f6452ae6ae7ed830/django_inlineobjects-1.0.2-py2.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "681653d8f230b98a8617965c503518d3",
"sha256": "ed7829a12cf6555a9fe0ee8c89c59cc59f95c159848ea1b6695187473e9167bb"
},
"downloads": -1,
"filename": "django-inlineobjects-1.0.2.tar.gz",
"has_sig": true,
"md5_digest": "681653d8f230b98a8617965c503518d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6894,
"upload_time": "2013-05-30T01:03:11",
"url": "https://files.pythonhosted.org/packages/0a/e9/2b1cc2ff23b90132d0d5e62b205f87ef876d94348154a1d278e8ff2ba071/django-inlineobjects-1.0.2.tar.gz"
}
],
"2.0.0": [
{
"comment_text": "",
"digests": {
"md5": "b0125e777392830853fa60f772eba992",
"sha256": "d4ba86de23559521f9ae0062ee95e527cbeac6fb4de210122ba79be9c07a08be"
},
"downloads": -1,
"filename": "django_inlineobjects-2.0.0-py3.7.egg",
"has_sig": true,
"md5_digest": "b0125e777392830853fa60f772eba992",
"packagetype": "bdist_egg",
"python_version": "3.7",
"requires_python": null,
"size": 16696,
"upload_time": "2019-04-09T18:44:40",
"url": "https://files.pythonhosted.org/packages/f5/8a/347e49f4c977c53e505636d8b6f606ebc0a44e99b9130d1390740f0e9621/django_inlineobjects-2.0.0-py3.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "ac5b2ca4eb599a3180c7f33caa021732",
"sha256": "895be5fa0b34db782f2d1056666cfac571dc2b46f2dfc1917fff7f7d365e7604"
},
"downloads": -1,
"filename": "django-inlineobjects-2.0.0.tar.gz",
"has_sig": true,
"md5_digest": "ac5b2ca4eb599a3180c7f33caa021732",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9029,
"upload_time": "2019-04-09T18:45:12",
"url": "https://files.pythonhosted.org/packages/c3/2b/98e45b4ce3744c462204971f22569e36bfeed6442a0d9c077b1f52e688db/django-inlineobjects-2.0.0.tar.gz"
}
],
"2.0.1": [
{
"comment_text": "",
"digests": {
"md5": "78a56c9ba83a2d88c582ee66d93a1df6",
"sha256": "3332753aadd52e0f2c4d8f6f7afdd17bd913decb643e73f8fda114272106d121"
},
"downloads": -1,
"filename": "django_inlineobjects-2.0.1-py3.7.egg",
"has_sig": true,
"md5_digest": "78a56c9ba83a2d88c582ee66d93a1df6",
"packagetype": "bdist_egg",
"python_version": "3.7",
"requires_python": null,
"size": 16737,
"upload_time": "2019-04-30T20:49:26",
"url": "https://files.pythonhosted.org/packages/03/a3/4ff39e3a232dc57c99a850207334b1cff506a34a553dda4c2561f5eec6b6/django_inlineobjects-2.0.1-py3.7.egg"
},
{
"comment_text": "",
"digests": {
"md5": "3d37f5011441b75b6d8be816ce6c0469",
"sha256": "ba764d650c9bc1494b5bd83abfe48615f65d21dc686109aa3e46750ce89fb887"
},
"downloads": -1,
"filename": "django-inlineobjects-2.0.1.tar.gz",
"has_sig": true,
"md5_digest": "3d37f5011441b75b6d8be816ce6c0469",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9071,
"upload_time": "2019-04-30T20:49:44",
"url": "https://files.pythonhosted.org/packages/f7/65/0d748bd891d1ea66d7375590ccff0cbe439c14337f04079dccf2804dea0c/django-inlineobjects-2.0.1.tar.gz"
}
],
"2.0.3": [
{
"comment_text": "",
"digests": {
"md5": "3971a013d940819bce594df66f47c60b",
"sha256": "858f446377b0471e20fbc51661180789741cc49dbc80eb03d9ffc3ec19e5dcd4"
},
"downloads": -1,
"filename": "django-inlineobjects-2.0.3.tar.gz",
"has_sig": true,
"md5_digest": "3971a013d940819bce594df66f47c60b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9108,
"upload_time": "2019-09-19T21:33:23",
"url": "https://files.pythonhosted.org/packages/5a/f0/5f8d486c94853588ec54dc9bd00f5e954a54656ade9a81a3571da798ef95/django-inlineobjects-2.0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3971a013d940819bce594df66f47c60b",
"sha256": "858f446377b0471e20fbc51661180789741cc49dbc80eb03d9ffc3ec19e5dcd4"
},
"downloads": -1,
"filename": "django-inlineobjects-2.0.3.tar.gz",
"has_sig": true,
"md5_digest": "3971a013d940819bce594df66f47c60b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9108,
"upload_time": "2019-09-19T21:33:23",
"url": "https://files.pythonhosted.org/packages/5a/f0/5f8d486c94853588ec54dc9bd00f5e954a54656ade9a81a3571da798ef95/django-inlineobjects-2.0.3.tar.gz"
}
]
}