Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

METADATA 4.5KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. Metadata-Version: 2.1
  2. Name: django-polymorphic
  3. Version: 3.1.0
  4. Summary: Seamless polymorphic inheritance for Django models
  5. Home-page: https://github.com/django-polymorphic/django-polymorphic
  6. Author: Bert Constantin
  7. Author-email: bert.constantin@gmx.de
  8. Maintainer: Christopher Glass
  9. Maintainer-email: tribaal@ubuntu.com
  10. License: UNKNOWN
  11. Download-URL: https://github.com/django-polymorphic/django-polymorphic/tarball/master
  12. Keywords: django,polymorphic
  13. Platform: UNKNOWN
  14. Classifier: Development Status :: 5 - Production/Stable
  15. Classifier: Environment :: Web Environment
  16. Classifier: Framework :: Django
  17. Classifier: Framework :: Django :: 2.2
  18. Classifier: Framework :: Django :: 3.0
  19. Classifier: Framework :: Django :: 3.1
  20. Classifier: Framework :: Django :: 3.2
  21. Classifier: Framework :: Django :: 4.0
  22. Classifier: Intended Audience :: Developers
  23. Classifier: License :: OSI Approved :: BSD License
  24. Classifier: Operating System :: OS Independent
  25. Classifier: Programming Language :: Python :: 3
  26. Classifier: Programming Language :: Python :: 3 :: Only
  27. Classifier: Programming Language :: Python :: 3.6
  28. Classifier: Programming Language :: Python :: 3.7
  29. Classifier: Programming Language :: Python :: 3.8
  30. Classifier: Programming Language :: Python :: 3.9
  31. Classifier: Topic :: Database
  32. License-File: LICENSE
  33. License-File: AUTHORS.rst
  34. Requires-Dist: Django (>=2.1)
  35. .. image:: https://travis-ci.org/django-polymorphic/django-polymorphic.svg?branch=master
  36. :target: http://travis-ci.org/django-polymorphic/django-polymorphic
  37. .. image:: https://img.shields.io/pypi/v/django-polymorphic.svg
  38. :target: https://pypi.python.org/pypi/django-polymorphic/
  39. .. image:: https://img.shields.io/codecov/c/github/django-polymorphic/django-polymorphic/master.svg
  40. :target: https://codecov.io/github/django-polymorphic/django-polymorphic?branch=master
  41. .. image:: https://readthedocs.org/projects/django-polymorphic/badge/?version=stable
  42. :target: https://django-polymorphic.readthedocs.io/en/stable/
  43. Polymorphic Models for Django
  44. =============================
  45. Django-polymorphic simplifies using inherited models in Django projects.
  46. When a query is made at the base model, the inherited model classes are returned.
  47. When we store models that inherit from a ``Project`` model...
  48. .. code-block:: python
  49. >>> Project.objects.create(topic="Department Party")
  50. >>> ArtProject.objects.create(topic="Painting with Tim", artist="T. Turner")
  51. >>> ResearchProject.objects.create(topic="Swallow Aerodynamics", supervisor="Dr. Winter")
  52. ...and want to retrieve all our projects, the subclassed models are returned!
  53. .. code-block:: python
  54. >>> Project.objects.all()
  55. [ <Project: id 1, topic "Department Party">,
  56. <ArtProject: id 2, topic "Painting with Tim", artist "T. Turner">,
  57. <ResearchProject: id 3, topic "Swallow Aerodynamics", supervisor "Dr. Winter"> ]
  58. Using vanilla Django, we get the base class objects, which is rarely what we wanted:
  59. .. code-block:: python
  60. >>> Project.objects.all()
  61. [ <Project: id 1, topic "Department Party">,
  62. <Project: id 2, topic "Painting with Tim">,
  63. <Project: id 3, topic "Swallow Aerodynamics"> ]
  64. This also works when the polymorphic model is accessed via
  65. ForeignKeys, ManyToManyFields or OneToOneFields.
  66. Features
  67. --------
  68. * Full admin integration.
  69. * ORM integration:
  70. * support for ForeignKey, ManyToManyField, OneToOneField descriptors.
  71. * Filtering/ordering of inherited models (``ArtProject___artist``).
  72. * Filtering model types: ``instance_of(...)`` and ``not_instance_of(...)``
  73. * Combining querysets of different models (``qs3 = qs1 | qs2``)
  74. * Support for custom user-defined managers.
  75. * Uses the minumum amount of queries needed to fetch the inherited models.
  76. * Disabling polymorphic behavior when needed.
  77. While *django-polymorphic* makes subclassed models easy to use in Django,
  78. we still encourage to use them with caution. Each subclassed model will require
  79. Django to perform an ``INNER JOIN`` to fetch the model fields from the database.
  80. While taking this in mind, there are valid reasons for using subclassed models.
  81. That's what this library is designed for!
  82. The current release of *django-polymorphic* supports Django 2.1, 2.2, 3.0, 3.1
  83. and Python 3.5+ is supported.
  84. For older Django versions, install *django-polymorphic==1.3*.
  85. For more information, see the `documentation at Read the Docs <https://django-polymorphic.readthedocs.io/>`_.
  86. Installation
  87. ------------
  88. Install using ``pip``\ ...
  89. .. code:: bash
  90. $ pip install django-polymorphic
  91. License
  92. =======
  93. Django-polymorphic uses the same license as Django (BSD-like).