{ "info": { "author": "Christopher Glass", "author_email": "tribaal@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 1.4", "Framework :: Django :: 1.5", "Framework :: Django :: 1.6", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://travis-ci.org/chrisglass/django_polymorphic.png?branch=master\n :target: http://travis-ci.org/chrisglass/django_polymorphic\n :alt: build-status\n\nPolymorphic Models for Django\n=============================\n\nDjango-polymorphic simplifies using inherited models in Django projects.\nWhen a query is made at the base model, the inherited model classes are returned.\n\nWhen we store models that inherit from a ``Project`` model...\n\n>>> Project.objects.create(topic=\"Department Party\")\n>>> ArtProject.objects.create(topic=\"Painting with Tim\", artist=\"T. Turner\")\n>>> ResearchProject.objects.create(topic=\"Swallow Aerodynamics\", supervisor=\"Dr. Winter\")\n\n...and want to retrieve all our projects, the subclassed models are returned!\n\n>>> Project.objects.all()\n [ ,\n ,\n ]\n\nUsing vanilla Django, we get the base class objects, which is rarely what we wanted:\n\n>>> Project.objects.all()\n [ ,\n ,\n ]\n\nThis also works when the polymorphic model is accessed via\nForeignKeys, ManyToManyFields or OneToOneFields.\n\nFeatures\n--------\n\n* Full admin integration.\n* ORM integration:\n\n * support for ForeignKey, ManyToManyField, OneToOneField descriptors.\n * Filtering/ordering of inherited models (``ArtProject___artist``).\n * Filtering model types: ``instance_of(...)`` and ``not_instance_of(...)``\n * Combining querysets of different models (``qs3 = qs1 | qs2``)\n * Support for custom user-defined managers.\n\n* Uses the minumum amount of queries needed to fetch the inherited models.\n* Disabling polymorphic behavior when needed.\n\nWhile *django-polymorphic* makes subclassed models easy to use in Django,\nwe still encourage to use them with caution. Each subclassed model will require\nDjango to perform an ``INNER JOIN`` to fetch the model fields from the database.\nWhile taking this in mind, there are valid reasons for using subclassed models.\nThat's what this library is designed for!\n\nFor more information, see the `documentation at Read the Docs `_.\n\nLicense\n=======\n\nDjango-polymorphic uses the same license as Django (BSD-like).", "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/chrisglass/django_polymorphic", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-polymorphic-ng", "package_url": "https://pypi.org/project/django-polymorphic-ng/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-polymorphic-ng/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/chrisglass/django_polymorphic" }, "release_url": "https://pypi.org/project/django-polymorphic-ng/0.8.0/", "requires_dist": null, "requires_python": null, "summary": "Seamless Polymorphic Inheritance for Django Models", "version": "0.8.0" }, "last_serial": 3232058, "releases": { "0.8.0": [ { "comment_text": "", "digests": { "md5": "84de0e9829ce385f05e31d3cbf9f1b35", "sha256": "47f02b4b72724ad9f39e567c9d115d1a4df18545c01fb8c9b1089e405744751b" }, "downloads": -1, "filename": "django_polymorphic_ng-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "84de0e9829ce385f05e31d3cbf9f1b35", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 43330, "upload_time": "2015-12-06T11:23:32", "url": "https://files.pythonhosted.org/packages/4c/48/6018ddc2e34e8338418a60c86022e8bb0b63396f9230db1a54cf8a209803/django_polymorphic_ng-0.8.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "84de0e9829ce385f05e31d3cbf9f1b35", "sha256": "47f02b4b72724ad9f39e567c9d115d1a4df18545c01fb8c9b1089e405744751b" }, "downloads": -1, "filename": "django_polymorphic_ng-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "84de0e9829ce385f05e31d3cbf9f1b35", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 43330, "upload_time": "2015-12-06T11:23:32", "url": "https://files.pythonhosted.org/packages/4c/48/6018ddc2e34e8338418a60c86022e8bb0b63396f9230db1a54cf8a209803/django_polymorphic_ng-0.8.0-py2.py3-none-any.whl" } ] }