Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schinckel/django-subquery
Backport of https://github.com/django/django/pull/6478 to support legacy Django versions.
https://github.com/schinckel/django-subquery
backport django django-subquery orm subquery
Last synced: 3 months ago
JSON representation
Backport of https://github.com/django/django/pull/6478 to support legacy Django versions.
- Host: GitHub
- URL: https://github.com/schinckel/django-subquery
- Owner: schinckel
- License: bsd-3-clause
- Created: 2016-12-06T09:42:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-30T23:55:39.000Z (about 7 years ago)
- Last Synced: 2024-08-09T08:27:11.126Z (5 months ago)
- Topics: backport, django, django-subquery, orm, subquery
- Language: Python
- Size: 9.77 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-subquery
Backport of https://docs.djangoproject.com/en/dev/ref/models/expressions/#subquery-expressions to support legacy Django versions.
## Installation:
$ pip install django-subquery
## Usage:
Please see the official Django documentation: https://docs.djangoproject.com/en/dev/ref/models/expressions/#subquery-expressions
Note that you need to import from ``django_subquery.expressions`` instead of ``django.db.models``.
## Supported versions:
This package is in production use with Django 1.8, but should work with any version of Django from 1.8 onwards.
## Unsupported features:
This package is not likely to work on Oracle, as that required some backend within django to work.
## Upgrading from < 1.0
The main class used to be called ``SubQuery``, but was renamed ``Subquery`` when merged into Django 1.11.
You'll need to adjust your code accordingly.