{ "info": { "author": "Keryn Knight", "author_email": "python-fakeinline@kerynknight.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "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.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "django-fakeinline\n=================\n\n:author: Keryn Knight\n:version: 0.1.1\n\n``fakeinline`` provides enough of the methods and attributes to trick the\n`Django Admin`_ into displaying it when mounted as part of an ``inlines``\ndeclaration on a ModelAdmin. Where possible it does so without subclassing\nreal Django classes, as should be the case with `Duck Typing`_.\n\nThe 2 necessary subclasses are the ``FakeInline`` class itself, which must\nsubclass ``InlineModelAdmin``, and the ``model`` attribute, ``FakeModel`` which\nmust subclass ``Model``, but is unmanaged and abstract, so there is nothing\ntouching the database.\n\n.. |travis_master| image:: https://travis-ci.org/kezabelle/django-fakeinline.svg?branch=master\n :target: https://travis-ci.org/kezabelle/django-fakeinline\n\n============== ======\nRelease Status\n============== ======\nmaster |travis_master|\n============== ======\n\nWhy?!\n-----\n\nThe most interesting thing about the `Django Admin`_ is trying to bend it to\nmy will. This is an example of my winning.\n\nNo really, why?\n---------------\n\nBecause it's actually nicer to be able to wedge additional things into the admin,\nwithout overriding the ``change_form.html`` template on a per-model, per-app basis.\n\nExample usage\n-------------\n\nHere's a simple way of putting the classic words **Hello world** onto a ModelAdmin::\n\n class MyFormset(FakeFormset):\n # this probably works, but usually you'd point it at a template file.\n template = Template('{{inline_admin_formset.formset.get_data}}')\n\n def get_data(self, *a, **kw):\n return 'Hello world'\n\n class MyInline(FakeInline):\n formset = MyFormSet\n\n class MyAdmin(ModelAdmin):\n inlines = [MyInline]\n\nWhilst a silly example, it demonstrates how one might encapsulate display data\n(charts, change history, etc) in a re-usable(ish) component for display on the\nchange view.\n\nTests\n-----\n\nThere's a couple in ``fakeinline.tests`` ... just enough to verify it doesn't\nraise an exception on GET or POST.\n\nThe license\n-----------\n\nIt's the `FreeBSD`_. There's should be a ``LICENSE`` file in the root of the repository, and in any archives.\n\n.. _FreeBSD: http://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29\n.. _Django Admin: https://docs.djangoproject.com/en/stable/ref/contrib/admin/\n.. _Duck Typing: https://en.wikipedia.org/wiki/Duck_typing\n\n\n----\n\nCopyright (c) 2016, Keryn Knight\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n----\n\nChange history for fakeinline\n-------------------------------------------------------------\n0.1.1\n^^^^^^\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kezabelle/django-fakeinline", "keywords": "django inline admin fake", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-fakeinline", "package_url": "https://pypi.org/project/django-fakeinline/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-fakeinline/", "project_urls": { "Homepage": "https://github.com/kezabelle/django-fakeinline" }, "release_url": "https://pypi.org/project/django-fakeinline/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "fakeinline provides enough of the methods and attributes to trick the Django Admin into displaying it when mounted as part of an inlines declaration on a ModelAdmin", "version": "0.1.1" }, "last_serial": 2269419, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "65ddb5bd958d6ced9fb7f60a5260dad2", "sha256": "b8e1de2ca0de45e34a95c145f9263f79abb6d7cba71f6df4d8167bb4aedf91b8" }, "downloads": -1, "filename": "django_fakeinline-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "65ddb5bd958d6ced9fb7f60a5260dad2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13121, "upload_time": "2016-08-08T19:04:18", "url": "https://files.pythonhosted.org/packages/98/72/e1c50438ec23e3b550f6737929cb4d30a6d80764b5d1456edc0079dc1ccd/django_fakeinline-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d57200ffec08e19725d276ce62fb8e91", "sha256": "63a1a8d657640615f5ab8fd73aea4aa54f87eefe465dd30c04f6a5feeecd2676" }, "downloads": -1, "filename": "django-fakeinline-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d57200ffec08e19725d276ce62fb8e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10781, "upload_time": "2016-08-08T19:04:21", "url": "https://files.pythonhosted.org/packages/74/69/4a77c5e67ace97d6fe6ad08912b2b3b2db92945a9a7a43d19aa04cf7a35f/django-fakeinline-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65ddb5bd958d6ced9fb7f60a5260dad2", "sha256": "b8e1de2ca0de45e34a95c145f9263f79abb6d7cba71f6df4d8167bb4aedf91b8" }, "downloads": -1, "filename": "django_fakeinline-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "65ddb5bd958d6ced9fb7f60a5260dad2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13121, "upload_time": "2016-08-08T19:04:18", "url": "https://files.pythonhosted.org/packages/98/72/e1c50438ec23e3b550f6737929cb4d30a6d80764b5d1456edc0079dc1ccd/django_fakeinline-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d57200ffec08e19725d276ce62fb8e91", "sha256": "63a1a8d657640615f5ab8fd73aea4aa54f87eefe465dd30c04f6a5feeecd2676" }, "downloads": -1, "filename": "django-fakeinline-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d57200ffec08e19725d276ce62fb8e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10781, "upload_time": "2016-08-08T19:04:21", "url": "https://files.pythonhosted.org/packages/74/69/4a77c5e67ace97d6fe6ad08912b2b3b2db92945a9a7a43d19aa04cf7a35f/django-fakeinline-0.1.1.tar.gz" } ] }