Initial Commit
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
Main authors (commit rights to the main repository)
|
||||
===================================================
|
||||
|
||||
* Chris Glass
|
||||
* Diederik van der Boor
|
||||
* Charlie Denton
|
||||
* Jerome Leclanche
|
||||
|
||||
|
||||
Contributors
|
||||
=============
|
||||
|
||||
* Abel Daniel
|
||||
* Adam Chainz
|
||||
* Adam Wentz
|
||||
* Adam Donaghy
|
||||
* Andrew Ingram (contributed setup.py)
|
||||
* Al Johri
|
||||
* Alex Alvarez
|
||||
* Andrew Dodd
|
||||
* Angel Velasquez
|
||||
* Austin Matsick
|
||||
* Bastien Vallet
|
||||
* Ben Konrath
|
||||
* Bert Constantin
|
||||
* Bertrand Bordage
|
||||
* Chad Shryock
|
||||
* Charles Leifer (python 2.4 compatibility)
|
||||
* Chris Barna
|
||||
* Chris Brantley
|
||||
* Christopher Glass
|
||||
* David Sanders
|
||||
* Éric Araujo
|
||||
* Evan Borgstrom
|
||||
* Frankie Dintino
|
||||
* Gavin Wahl
|
||||
* Germán M. Bravo
|
||||
* Gonzalo Bustos
|
||||
* Gregory Avery-Weir
|
||||
* Hugo Osvaldo Barrera
|
||||
* Jacob Rief
|
||||
* James Murty
|
||||
* Jedediah Smith (proxy models support)
|
||||
* John Furr
|
||||
* Jonas Haag
|
||||
* Jonas Obrist
|
||||
* Julian Wachholz
|
||||
* Kamil Bar
|
||||
* Kelsey Gilmore-Innis
|
||||
* Kevin Armenat
|
||||
* Krzysztof Gromadzki
|
||||
* Krzysztof Nazarewski
|
||||
* Luis Zárate
|
||||
* Marius Lueck
|
||||
* Martin Brochhaus
|
||||
* Martin Maillard
|
||||
* Michael Fladischer
|
||||
* Nick Ward
|
||||
* Oleg Myltsyn
|
||||
* Omer Strumpf
|
||||
* Paweł Adamczak
|
||||
* Petr Dlouhý
|
||||
* Sander van Leeuwen
|
||||
* Sobolev Nikita
|
||||
* Tadas Dailyda
|
||||
* Tai Lee
|
||||
* Tomas Peterka
|
||||
* Tony Narlock
|
||||
* Vail Gold
|
||||
|
||||
|
||||
|
||||
Former authors / maintainers
|
||||
============================
|
||||
|
||||
* Bert Constantin 2009/2010 (Original author, disappeared from the internet :( )
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,32 @@
|
||||
Copyright (c) 2009 or later by the individual contributors.
|
||||
Please see the AUTHORS file.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* 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.
|
||||
|
||||
* The names of the contributors may not be used to endorse or
|
||||
promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS 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
|
||||
OWNER 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.
|
||||
@@ -0,0 +1,120 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: django-polymorphic
|
||||
Version: 3.1.0
|
||||
Summary: Seamless polymorphic inheritance for Django models
|
||||
Home-page: https://github.com/django-polymorphic/django-polymorphic
|
||||
Author: Bert Constantin
|
||||
Author-email: bert.constantin@gmx.de
|
||||
Maintainer: Christopher Glass
|
||||
Maintainer-email: tribaal@ubuntu.com
|
||||
License: UNKNOWN
|
||||
Download-URL: https://github.com/django-polymorphic/django-polymorphic/tarball/master
|
||||
Keywords: django,polymorphic
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Framework :: Django
|
||||
Classifier: Framework :: Django :: 2.2
|
||||
Classifier: Framework :: Django :: 3.0
|
||||
Classifier: Framework :: Django :: 3.1
|
||||
Classifier: Framework :: Django :: 3.2
|
||||
Classifier: Framework :: Django :: 4.0
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Topic :: Database
|
||||
License-File: LICENSE
|
||||
License-File: AUTHORS.rst
|
||||
Requires-Dist: Django (>=2.1)
|
||||
|
||||
.. image:: https://travis-ci.org/django-polymorphic/django-polymorphic.svg?branch=master
|
||||
:target: http://travis-ci.org/django-polymorphic/django-polymorphic
|
||||
.. image:: https://img.shields.io/pypi/v/django-polymorphic.svg
|
||||
:target: https://pypi.python.org/pypi/django-polymorphic/
|
||||
.. image:: https://img.shields.io/codecov/c/github/django-polymorphic/django-polymorphic/master.svg
|
||||
:target: https://codecov.io/github/django-polymorphic/django-polymorphic?branch=master
|
||||
.. image:: https://readthedocs.org/projects/django-polymorphic/badge/?version=stable
|
||||
:target: https://django-polymorphic.readthedocs.io/en/stable/
|
||||
|
||||
Polymorphic Models for Django
|
||||
=============================
|
||||
|
||||
Django-polymorphic simplifies using inherited models in Django projects.
|
||||
When a query is made at the base model, the inherited model classes are returned.
|
||||
|
||||
When we store models that inherit from a ``Project`` model...
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> Project.objects.create(topic="Department Party")
|
||||
>>> ArtProject.objects.create(topic="Painting with Tim", artist="T. Turner")
|
||||
>>> ResearchProject.objects.create(topic="Swallow Aerodynamics", supervisor="Dr. Winter")
|
||||
|
||||
...and want to retrieve all our projects, the subclassed models are returned!
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> Project.objects.all()
|
||||
[ <Project: id 1, topic "Department Party">,
|
||||
<ArtProject: id 2, topic "Painting with Tim", artist "T. Turner">,
|
||||
<ResearchProject: id 3, topic "Swallow Aerodynamics", supervisor "Dr. Winter"> ]
|
||||
|
||||
Using vanilla Django, we get the base class objects, which is rarely what we wanted:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> Project.objects.all()
|
||||
[ <Project: id 1, topic "Department Party">,
|
||||
<Project: id 2, topic "Painting with Tim">,
|
||||
<Project: id 3, topic "Swallow Aerodynamics"> ]
|
||||
|
||||
This also works when the polymorphic model is accessed via
|
||||
ForeignKeys, ManyToManyFields or OneToOneFields.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* Full admin integration.
|
||||
* ORM integration:
|
||||
|
||||
* support for ForeignKey, ManyToManyField, OneToOneField descriptors.
|
||||
* Filtering/ordering of inherited models (``ArtProject___artist``).
|
||||
* Filtering model types: ``instance_of(...)`` and ``not_instance_of(...)``
|
||||
* Combining querysets of different models (``qs3 = qs1 | qs2``)
|
||||
* Support for custom user-defined managers.
|
||||
* Uses the minumum amount of queries needed to fetch the inherited models.
|
||||
* Disabling polymorphic behavior when needed.
|
||||
|
||||
While *django-polymorphic* makes subclassed models easy to use in Django,
|
||||
we still encourage to use them with caution. Each subclassed model will require
|
||||
Django to perform an ``INNER JOIN`` to fetch the model fields from the database.
|
||||
While taking this in mind, there are valid reasons for using subclassed models.
|
||||
That's what this library is designed for!
|
||||
|
||||
The current release of *django-polymorphic* supports Django 2.1, 2.2, 3.0, 3.1
|
||||
and Python 3.5+ is supported.
|
||||
For older Django versions, install *django-polymorphic==1.3*.
|
||||
|
||||
For more information, see the `documentation at Read the Docs <https://django-polymorphic.readthedocs.io/>`_.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Install using ``pip``\ ...
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ pip install django-polymorphic
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
Django-polymorphic uses the same license as Django (BSD-like).
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
django_polymorphic-3.1.0.dist-info/AUTHORS.rst,sha256=cG-uNqCVyBwfhG-IW91ZEjgH74nH17JvaIXvZSMirPg,1350
|
||||
django_polymorphic-3.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
django_polymorphic-3.1.0.dist-info/LICENSE,sha256=ytx-RbmsZDzs1srmPx9FaEFl39W1i7lUK5GPGM1H1VE,1571
|
||||
django_polymorphic-3.1.0.dist-info/METADATA,sha256=dDA1F5zUe7XI9jumxUGZNpn3Xxb17twskRUmGInRXH0,4626
|
||||
django_polymorphic-3.1.0.dist-info/RECORD,,
|
||||
django_polymorphic-3.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
django_polymorphic-3.1.0.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
||||
django_polymorphic-3.1.0.dist-info/top_level.txt,sha256=xxMuTi2Xsi-PV5ovvJoCMkUWdX8h8-tO-cmQGoulejA,12
|
||||
polymorphic/__init__.py,sha256=YdrDBxoS-h_pA4Fg2EoxZkVYrsSO6ctF0MzPliDlDpY,402
|
||||
polymorphic/__pycache__/__init__.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/base.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/compat.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/managers.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/models.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/query.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/query_translate.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/showfields.cpython-39.pyc,,
|
||||
polymorphic/__pycache__/utils.cpython-39.pyc,,
|
||||
polymorphic/admin/__init__.py,sha256=krwQsb4lM9wXC-qL7L4klgVUKsW_uEgTyPuFqOh2byA,1458
|
||||
polymorphic/admin/__pycache__/__init__.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/childadmin.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/filters.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/forms.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/generic.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/helpers.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/inlines.cpython-39.pyc,,
|
||||
polymorphic/admin/__pycache__/parentadmin.cpython-39.pyc,,
|
||||
polymorphic/admin/childadmin.py,sha256=c2rB2IRItpRQQ4nk3GuyYhdXduYGfPzUTr-3VFBoew0,9582
|
||||
polymorphic/admin/filters.py,sha256=HDalMuCoqH8GYqEGLx4Ww1L_iKLkSBuz1mMrgfBtoDA,1190
|
||||
polymorphic/admin/forms.py,sha256=zSTsgHo-9peCJEz0qeClIhcA6Mh3mIleBdCFgaNpNZA,684
|
||||
polymorphic/admin/generic.py,sha256=xQUV87bCecYHH9-WUaVFy3UnZeh3hL6ypTN36Ki8ngA,2648
|
||||
polymorphic/admin/helpers.py,sha256=ibymi6DjDPad-3gCzO4jX6PaKr_Qv8kQq-kD0A8eOz4,5645
|
||||
polymorphic/admin/inlines.py,sha256=22ff7EwVmk0_xbSZ8sobM273UvqJqCx0-Y-FXw_Nt_Y,10292
|
||||
polymorphic/admin/parentadmin.py,sha256=4kuQwiQGnoN8BSlp49kWQhljtRmzcHvY6yJMFeTt6Io,15164
|
||||
polymorphic/base.py,sha256=BHFSmzufgnWy_6U7I-YGqu-BIghEJhgxNLYERlVf-Zs,8887
|
||||
polymorphic/compat.py,sha256=iQ3NMRfKR3V9ZL3TaulJct1wVqzR3HGZ4X49GP2Cm0A,279
|
||||
polymorphic/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
polymorphic/contrib/__pycache__/__init__.cpython-39.pyc,,
|
||||
polymorphic/contrib/__pycache__/extra_views.cpython-39.pyc,,
|
||||
polymorphic/contrib/__pycache__/guardian.cpython-39.pyc,,
|
||||
polymorphic/contrib/extra_views.py,sha256=XqF8Y-QYbPk_Al25Z2WXOZdBMBTDtP_UR_PXDdQFTjk,4060
|
||||
polymorphic/contrib/guardian.py,sha256=SdMHwBvTeadXKH3LQULZikOm57Ep7RzYkSJNuak9HKU,1339
|
||||
polymorphic/formsets/__init__.py,sha256=L7N002YJ0cyiYzVYcnfnOafnfjsPJbUJrV4qWSlcAlU,1391
|
||||
polymorphic/formsets/__pycache__/__init__.cpython-39.pyc,,
|
||||
polymorphic/formsets/__pycache__/generic.cpython-39.pyc,,
|
||||
polymorphic/formsets/__pycache__/models.cpython-39.pyc,,
|
||||
polymorphic/formsets/__pycache__/utils.cpython-39.pyc,,
|
||||
polymorphic/formsets/generic.py,sha256=ZaufuKwipHKIbIWpubiOGBi8vecSB8RtINLn76MeUDw,4186
|
||||
polymorphic/formsets/models.py,sha256=F-7D7AHuHduWh49fCjuypLYqkGeJpxbbhW-WPzrzWNk,15269
|
||||
polymorphic/formsets/utils.py,sha256=tbeXzywmXb3GE7ofmPQuW4H46yUTo639Fr5yH6dXZf0,506
|
||||
polymorphic/locale/en/LC_MESSAGES/django.mo,sha256=UXCQbz2AxBvh-IQ7bGgjoBnijo8h9DfE9107A-2Mgkk,337
|
||||
polymorphic/locale/en/LC_MESSAGES/django.po,sha256=SvbpsHUL02r6xjgDaLB02O9057o8v5AvMnaH2vKQX5c,711
|
||||
polymorphic/locale/es/LC_MESSAGES/django.mo,sha256=rMDLgDO6BO-vLKuMBzS87caPiGEkiJvEzVBFWyvDKJc,456
|
||||
polymorphic/locale/es/LC_MESSAGES/django.po,sha256=dDAh0LBgWqwoZkeGKKgPFjfI9B--LM37ZWjvmRArEfY,754
|
||||
polymorphic/locale/fr/LC_MESSAGES/django.mo,sha256=n31t9bj5GAoGVOf4zGsZbhe7nfn4j2skcZ1_bicSHMA,492
|
||||
polymorphic/locale/fr/LC_MESSAGES/django.po,sha256=XYn4FlF6XVYvgcxqfLjISO2h8opk5HJpPduLPFJrEIY,889
|
||||
polymorphic/managers.py,sha256=fH4gjgbIsPdmWmbdaAo6qXpX6a1MVK3l4SI0eLVwIMM,1510
|
||||
polymorphic/models.py,sha256=L4La1mGc-ggvwonsc-7F87u_qwMwEZy26Whf3g9VEW0,11420
|
||||
polymorphic/query.py,sha256=0kQytZUjBsLhAq_RL9v5kT7u5g4A_YCSODzVP_KBx2A,23235
|
||||
polymorphic/query_translate.py,sha256=mNDuvYQzht2iCkjUEpx_KkPpU2tz-EyBaKwya_Xubuw,11268
|
||||
polymorphic/showfields.py,sha256=j3WmIExER-_OursXt4Yl2bIDB1kHt8vICkXXO0VVsQQ,6070
|
||||
polymorphic/static/polymorphic/css/polymorphic_inlines.css,sha256=Wk9FaeCedIpRMn2QllZuzT8HDQrpLxKyf84XIA55Kd4,560
|
||||
polymorphic/static/polymorphic/js/polymorphic_inlines.js,sha256=NNHyyi2SQdeJ6sEYP1iN0W3xpNmN5b5VdeWCAO2TWW0,15521
|
||||
polymorphic/templates/admin/polymorphic/add_type_form.html,sha256=apbNTko9uauGkS-zVFanZ4ISNT4yPnePYROo0c-0wp8,291
|
||||
polymorphic/templates/admin/polymorphic/change_form.html,sha256=OcXpPDD6NxBKN0p1JVvW1NnRSesM19a_aL5cBr9aJDA,190
|
||||
polymorphic/templates/admin/polymorphic/delete_confirmation.html,sha256=NViKgTfac5yf1uA0oy7ACh-v9VDU3lBZ-9dYwmXz_cw,198
|
||||
polymorphic/templates/admin/polymorphic/edit_inline/stacked.html,sha256=SQsWCL59Ew8TVp_Io6ZiezETh1idQIMwPjChS9M0pdc,2379
|
||||
polymorphic/templates/admin/polymorphic/object_history.html,sha256=hU66_oJ1L1Nx9_gW0oOOBTAfdkikKx9c69VAigUCAq0,193
|
||||
polymorphic/templatetags/__init__.py,sha256=V_qwuTdJVgYHdfZI0hKMjsTk792tO1usmGQIp5l7fIg,2880
|
||||
polymorphic/templatetags/__pycache__/__init__.cpython-39.pyc,,
|
||||
polymorphic/templatetags/__pycache__/polymorphic_admin_tags.cpython-39.pyc,,
|
||||
polymorphic/templatetags/__pycache__/polymorphic_formset_tags.cpython-39.pyc,,
|
||||
polymorphic/templatetags/polymorphic_admin_tags.py,sha256=GX0uPJMnXyZVxoEckt_2uFjPqI2CG8MdOWq6as3h9oE,1704
|
||||
polymorphic/templatetags/polymorphic_formset_tags.py,sha256=uBCYrvU22SINZmQ2XS9tVsCPG94UTdHQpJ6L1TzS2pQ,2080
|
||||
polymorphic/utils.py,sha256=BDc1yktGnRpn84aAgxZforQIhGH-w9hVT4q2XRDMkqk,2347
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.37.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
polymorphic
|
||||
Reference in New Issue
Block a user