معرفی شرکت ها


django_deferred_polymorph-0.4.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Polymorphic models based on django deferred models
ویژگی مقدار
سیستم عامل -
نام فایل django_deferred_polymorph-0.4.0
نام django_deferred_polymorph
نسخه کتابخانه 0.4.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده David Danier
ایمیل نویسنده david.danier@team23.de
آدرس صفحه اصلی https://github.com/ddanier/django_deferred_polymorph
آدرس اینترنتی https://pypi.org/project/django_deferred_polymorph/
مجوز UNKNOWN
ABOUT ===== django_deferred_polymorph is an implementation of polymorphic models for Django. Like other solutions you can just fetch the base instance from your database and get the right subclass back. This means you always can rely on having all data/methods your child class would provide. Unlike other solutions additional data is loaded by using a slightly modified version of Django's own deferered mechanisms. This way getting the base classes issues only one SQL query, returning the subclasses with all additional data as defered field. If you attempt to access one of the deferred fields all deferred fields are loaded (unlike for Django's default deferred fields). django_deferred_polymorph includes two abstract base models: * DeferredPolymorphBaseModel as the base for every deferred model * SubDeferredPolymorphBaseModel which extends DeferredPolymorphBaseModel to force userd to use a subclass Installation ============ First:: pip install django_deferred_polymorph Then add ``'django_deferred_polymorph'`` to your ``INSTALLED_APPS`` settings. Running tests ============= First create a `virtualenv`_, then install package inside the virtualenv and add the test dependencies with:: python setup.py develop pip install -r requirements.txt Now you can run the test suite against the currently installed version of Django with:: python runtests.py However we support multiple versions of Django and Python. To test all relevant combinations at once you can use the following command:: tox .. _virtualenv: https://virtualenv.pypa.io/en/latest/ Changelog ========= 0.4.0 ----- * Reuse registered apps so object deletion works * Dropped compatibility with Django < 1.7 0.3.2 ----- * Fix for Django 1.8 that did not set ``_base_manager`` correctly for subclasses of ``DeferredPolymorphBaseModel``. That broke the ``Model.delete()`` method in some cases. 0.3.1 ----- * Adding MANIFEST.in file to define which files get included in the source distribution. CHANGES.rst was missing from that and caused an error on install. 0.3.0 ----- * Dropping support for Django 1.5.x and lower as we had to adept to Django's naming scheme for ``get_queryset`` instead of ``get_query_set`` in managers. * Fix for Django 1.8 which uses unicode for model names in the Meta._meta object. That broke the dynamic class creation with ``type()``. 0.2.0 ----- * Django 1.8 support.


نحوه نصب


نصب پکیج whl django_deferred_polymorph-0.4.0:

    pip install django_deferred_polymorph-0.4.0.whl


نصب پکیج tar.gz django_deferred_polymorph-0.4.0:

    pip install django_deferred_polymorph-0.4.0.tar.gz