--- /srv/reproducible-results/rbuild-debian/r-b-build.RMuz9D1y/b1/python-django_4.2.13-1_arm64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.RMuz9D1y/b2/python-django_4.2.13-1_arm64.changes ├── Files │ @@ -1,3 +1,3 @@ │ │ - d5077dfa3ffb273b90e350fe8709bdc6 3593320 doc optional python-django-doc_4.2.13-1_all.deb │ + 74606fe7915fd77bc1d692cb416e4003 3629624 doc optional python-django-doc_4.2.13-1_all.deb │ 31ed29a4edded7dad0a7c374733d854e 2735996 python optional python3-django_4.2.13-1_all.deb ├── python-django-doc_4.2.13-1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-05-08 10:28:44.000000 debian-binary │ │ --rw-r--r-- 0 0 0 19140 2024-05-08 10:28:44.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 3573988 2024-05-08 10:28:44.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 19340 2024-05-08 10:28:44.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 3610092 2024-05-08 10:28:44.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── file list │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 976 2024-05-08 10:28:44.000000 ./control │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78115 2024-05-08 10:28:44.000000 ./md5sums │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78497 2024-05-08 10:28:44.000000 ./md5sums │ │ │ ├── ./control │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ Package: python-django-doc │ │ │ │ Source: python-django │ │ │ │ Version: 3:4.2.13-1 │ │ │ │ Architecture: all │ │ │ │ Maintainer: Debian Python Team │ │ │ │ -Installed-Size: 33708 │ │ │ │ +Installed-Size: 33969 │ │ │ │ Depends: libjs-sphinxdoc (>= 7.2.2) │ │ │ │ Section: doc │ │ │ │ Priority: optional │ │ │ │ Homepage: http://www.djangoproject.com/ │ │ │ │ Description: High-level Python web development framework (documentation) │ │ │ │ Django is a high-level web application framework that loosely follows the │ │ │ │ model-view-controller design pattern. │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -177,36 +177,40 @@ │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/decorators/csrf.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/decorators/debug.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/decorators/http.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/decorators/vary.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/generic/dates.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/django/views/i18n.html │ │ │ │ │ usr/share/doc/python-django-doc/html/_modules/index.html │ │ │ │ │ +usr/share/doc/python-django-doc/html/_static/base-stemmer.js │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/basic.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/console-tabs.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/default.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/djangodocs.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/docicons-behindscenes.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/docicons-note.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/docicons-philosophy.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/docicons-warning.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/documentation_options.js │ │ │ │ │ +usr/share/doc/python-django-doc/html/_static/dutch-stemmer.js │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/file.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/README.md │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/css/fa-brands.min.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.eot.gz │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.svg │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.ttf.gz │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.woff │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.woff2 │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/homepage.css │ │ │ │ │ +usr/share/doc/python-django-doc/html/_static/language_data.js │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/minus.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/plus.png │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/pygments.css │ │ │ │ │ usr/share/doc/python-django-doc/html/_static/reset-fonts-grids.css │ │ │ │ │ +usr/share/doc/python-django-doc/html/_static/translations.js │ │ │ │ │ usr/share/doc/python-django-doc/html/contents.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/admin.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/contributing.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/general.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/help.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/index.html │ │ │ │ │ usr/share/doc/python-django-doc/html/faq/install.html │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -29,865 +29,868 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 40590 2024-05-07 17:11:00.000000 ./usr/share/doc/python-django-doc/html/_images/list_filter.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12685 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_images/postmortem.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2017 2024-02-15 11:17:02.000000 ./usr/share/doc/python-django-doc/html/_images/raw_id_fields.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15461 2024-02-15 11:17:02.000000 ./usr/share/doc/python-django-doc/html/_images/template-lines.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 20673 2024-02-15 11:17:02.000000 ./usr/share/doc/python-django-doc/html/_images/triage_process.svg │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/asgiref/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78372 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/asgiref/sync.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78460 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/asgiref/sync.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/apps/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39797 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/apps/config.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39904 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/apps/config.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/conf/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/conf/urls/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8589 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/conf/urls/i18n.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8675 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/conf/urls/i18n.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15259 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/decorators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 381076 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/options.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86838 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/sites.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15361 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/decorators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 381434 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/options.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86980 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/sites.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/views/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6624 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/views/decorators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8377 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6713 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/views/decorators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8460 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12324 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/context_processors.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/decorators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 123477 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/hashers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37585 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/password_validation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34801 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12410 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/context_processors.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14388 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/decorators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 123579 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/hashers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37727 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/password_validation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34924 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/flatpages/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6525 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/flatpages/sitemaps.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6611 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/flatpages/sitemaps.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18288 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/aggregates.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 57676 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 96017 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/functions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27145 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/feeds.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18412 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/aggregates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 57832 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 96389 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/functions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27255 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/feeds.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22499 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23407 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/widgets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22644 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23512 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/widgets.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19064 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/datasource.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15770 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/driver.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34270 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/envelope.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11449 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/error.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98882 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geometries.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17132 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geomtype.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19153 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/datasource.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15867 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/driver.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34367 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/envelope.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11546 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/error.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 99107 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geometries.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17221 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geomtype.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/raster/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76059 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/raster/source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53692 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/srs.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76167 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/raster/source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53901 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/srs.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18764 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/collections.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4726 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/error.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8447 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/factory.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100325 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/geometry.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7355 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/io.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29199 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/linestring.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25810 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/point.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29230 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/polygon.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18877 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/collections.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4815 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/error.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8544 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/factory.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100414 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/geometry.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7452 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/io.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29296 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/linestring.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25899 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/point.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29327 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/polygon.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/prototypes/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/prototypes/io.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55457 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/measure.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51410 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/prototypes/io.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55551 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/measure.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 95675 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/layermapping.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32846 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/ogrinspect.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 95772 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/layermapping.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32943 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/ogrinspect.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16946 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7422 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/middleware.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17040 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7508 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/middleware.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46709 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/constraints.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5628 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/functions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44306 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/indexes.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60681 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/search.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16258 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/validators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46795 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/constraints.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5722 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/functions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44448 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/indexes.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60847 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/search.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16360 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/validators.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5569 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/exceptions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15663 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/middleware.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41502 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sitemaps.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5655 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/exceptions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15749 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/middleware.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41633 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sitemaps.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sites/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5502 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sites/middleware.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5588 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sites/middleware.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/checks/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18040 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/checks/messages.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31142 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/exceptions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18166 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/checks/messages.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31345 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/exceptions.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26903 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13393 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/images.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27037 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13479 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/images.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29608 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35466 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/filesystem.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45532 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/memory.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8691 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21902 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadedfile.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29730 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadhandler.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29817 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35563 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/filesystem.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45621 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/memory.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8785 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22012 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadedfile.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29880 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadhandler.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/mail/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 74483 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/mail/message.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22552 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/mail.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 74569 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/mail/message.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22667 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/mail.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/management/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 89850 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/management/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37841 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/paginator.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42142 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/signing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 92880 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/validators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 89992 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/management/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38036 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/paginator.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42265 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/signing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93083 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/core/validators.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/backends/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/backends/base/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 284680 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/backends/base/schema.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 284897 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/backends/base/schema.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61808 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 190009 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/models.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35342 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/special.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61921 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 190210 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/models.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35455 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/special.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38753 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/aggregates.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 366072 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 70870 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/constraints.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 84238 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/deletion.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 285783 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/expressions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38895 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/aggregates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 366286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 70980 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/constraints.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 84372 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/deletion.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 285981 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/expressions.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 73241 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/files.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102385 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/json.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 278915 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/related.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 382999 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 73378 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/files.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102474 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/json.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 279020 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/related.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 383381 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40553 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/comparison.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63667 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/datetime.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34695 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/math.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55132 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/text.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18908 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/window.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 54412 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/indexes.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110112 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/lookups.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31057 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/manager.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 133324 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/options.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 377322 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/query.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 62787 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/query_utils.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41467 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/transaction.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39439 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/utils.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40690 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/comparison.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63940 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/datetime.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34960 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/math.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55405 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/text.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19077 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/functions/window.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 54498 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/indexes.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110222 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/lookups.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31143 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/manager.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 133426 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/options.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 377424 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/query.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 62881 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/models/query_utils.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41654 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/transaction.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39586 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/db/utils.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/dispatch/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38260 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/dispatch/dispatcher.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38383 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/dispatch/dispatcher.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55832 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/boundfield.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 203495 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76304 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/forms.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81237 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/formsets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 232884 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/models.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14964 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/renderers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 176682 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/widgets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55963 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/boundfield.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 203826 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76387 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/forms.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81360 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/formsets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 233007 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/models.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15103 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/renderers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 177021 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/forms/widgets.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/http/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 108259 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/http/request.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 106939 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/http/response.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 108542 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/http/request.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 107182 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/http/response.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27902 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/cache.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8818 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/clickjacking.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29030 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/common.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 64712 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/csrf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13708 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/gzip.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9638 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/http.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15442 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/locale.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14475 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/security.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21022 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/shortcuts.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27993 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/cache.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8901 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/clickjacking.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29121 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/common.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 64795 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/csrf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13791 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/gzip.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9721 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/http.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15525 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/locale.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14558 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/middleware/security.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21126 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/shortcuts.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/backends/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22239 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/backends/django.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23237 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/backends/jinja2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 151345 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41524 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/context.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12999 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/context_processors.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34081 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/engine.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8114 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/exceptions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12524 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/loader.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22325 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/backends/django.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23323 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/backends/jinja2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 151444 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41631 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/context.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13106 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/context_processors.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34196 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/engine.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8205 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/exceptions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12623 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/loader.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/loaders/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9946 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/loaders/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23736 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/response.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10048 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/loaders/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23875 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/template/response.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 172524 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/client.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 166051 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/runner.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 266229 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/testcases.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 127135 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/utils.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 172695 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/client.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 166230 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/runner.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 266544 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/testcases.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 127258 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/test/utils.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25341 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16492 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/conf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10035 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/converters.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4935 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/exceptions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 127316 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/resolvers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25440 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16575 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/conf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10118 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/converters.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5026 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/exceptions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 127399 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/urls/resolvers.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63473 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/cache.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25416 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/dateparse.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28279 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/decorators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36118 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/encoding.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76152 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/feedgenerator.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 58755 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/functional.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 62475 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/html.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66854 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/http.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36648 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/log.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17092 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/module_loading.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10451 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/safestring.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 69485 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/text.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40587 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/timezone.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42939 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/translation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63604 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/cache.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25523 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/dateparse.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28402 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/decorators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36265 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/encoding.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76363 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/feedgenerator.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 58862 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/functional.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 62606 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/html.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66985 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/http.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36763 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/log.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17175 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/module_loading.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10542 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/safestring.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 69568 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/text.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40782 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/timezone.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 43166 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/utils/translation.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 101382 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/debug.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 101521 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/debug.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11461 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/cache.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5987 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/common.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10783 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/csrf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12833 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/debug.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19822 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/http.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8330 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/vary.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11555 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/cache.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6073 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/common.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10869 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/csrf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12927 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/debug.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19932 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/http.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8424 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/decorators/vary.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/generic/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 109288 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/generic/dates.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 43048 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/i18n.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6995 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16885 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 109694 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/generic/dates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 43147 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django/views/i18n.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7072 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/django.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16962 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_modules/index.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/ │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8133 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/base-stemmer.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 15094 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/basic.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 875 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/console-tabs.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 92 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/default.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7604 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/djangodocs.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1065 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/docicons-behindscenes.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 559 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/docicons-note.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 791 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/docicons-philosophy.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 656 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/docicons-warning.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 336 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/documentation_options.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19495 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/dutch-stemmer.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/file.png │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 170 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/README.md │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/css/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 630 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/css/fa-brands.min.css │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 64105 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.eot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 503035 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.svg │ │ │ │ -rw-r--r-- 0 root (0) root (0) 63995 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.ttf.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 63024 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.woff │ │ │ │ -rw-r--r-- 0 root (0) root (0) 53928 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/fontawesome/webfonts/fa-brands-400.woff2 │ │ │ │ -rw-r--r-- 0 root (0) root (0) 892 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/homepage.css │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10304 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/language_data.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/minus.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/plus.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4699 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/pygments.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5522 2023-06-05 12:53:07.000000 ./usr/share/doc/python-django-doc/html/_static/reset-fonts-grids.css │ │ │ │ --rw-r--r-- 0 root (0) root (0) 112422 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/contents.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3489 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/translations.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 112494 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/contents.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19685 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/admin.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13327 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/contributing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20517 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/general.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12568 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/help.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16489 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11794 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/install.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14723 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/models.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10344 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/troubleshooting.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13242 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/usage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 616777 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/genindex.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9760 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/glossary.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19762 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/admin.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13404 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/contributing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20594 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/general.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12645 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/help.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16564 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11871 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/install.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14800 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/models.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10421 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/troubleshooting.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13319 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/faq/usage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 618592 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/genindex.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9832 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/glossary.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19302 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/auth-remote-user.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42204 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/csrf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19973 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-file-storage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46268 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-lookups.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 52613 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-management-commands.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 94544 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-model-fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24282 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-template-backend.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 127795 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-template-tags.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6813 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/delete-app.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19387 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/auth-remote-user.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42289 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/csrf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20050 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-file-storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46351 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-lookups.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 52709 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-management-commands.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 94632 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-model-fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24359 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-template-backend.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 127883 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/custom-template-tags.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6890 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/delete-app.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9328 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/daphne.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7707 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/hypercorn.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11372 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9351 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/uvicorn.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32272 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/checklist.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10199 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9411 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/daphne.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7790 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/hypercorn.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11460 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9434 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/asgi/uvicorn.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32352 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/checklist.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10279 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/index.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16658 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/apache-auth.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8004 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/gunicorn.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12843 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24456 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/modwsgi.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16166 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/uwsgi.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49583 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/error-reporting.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9208 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16285 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/initial-data.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13800 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/legacy-databases.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36293 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/logging.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22344 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/outputting-csv.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15297 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/outputting-pdf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17309 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/overriding-templates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16747 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/apache-auth.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8087 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/gunicorn.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12929 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24544 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/modwsgi.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16248 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/deployment/wsgi/uwsgi.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49693 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/error-reporting.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9282 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16361 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/initial-data.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13877 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/legacy-databases.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36370 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/logging.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22421 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/outputting-csv.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15376 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/outputting-pdf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17385 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/overriding-templates.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/static-files/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17135 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/static-files/deployment.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26753 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/static-files/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17061 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/upgrade-version.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15526 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/windows.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50510 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/writing-migrations.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30384 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17214 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/static-files/deployment.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26839 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/static-files/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17138 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/upgrade-version.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15602 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/windows.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50587 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/howto/writing-migrations.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30443 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/index.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16358 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/bugs-and-features.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23168 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/committing-code.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15840 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11497 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/localizing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13749 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/new-contributors.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33984 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/triaging-tickets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16439 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/bugs-and-features.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23251 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/committing-code.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15920 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11580 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/localizing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13832 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/new-contributors.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34067 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/triaging-tickets.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38893 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/coding-style.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7991 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18471 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/javascript.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30282 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/submitting-patches.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65153 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/unit-tests.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24026 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/working-with-git.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 43785 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-documentation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 127466 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/deprecation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19979 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/git.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40933 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/howto-release-django.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13034 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12923 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/mailing-lists.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24609 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/organization.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20596 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/release-process.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19194 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/security.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38976 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/coding-style.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8074 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18554 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/javascript.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30368 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/submitting-patches.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65236 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/unit-tests.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24109 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-code/working-with-git.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 43865 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/contributing/writing-documentation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 127543 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/deprecation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20059 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/git.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40998 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/howto-release-django.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13109 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13013 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/mailing-lists.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24686 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/organization.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20673 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/release-process.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19271 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/internals/security.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56891 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/contributing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7725 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10459 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/install.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40628 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/overview.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 32019 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/reusable-apps.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38836 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial01.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 79499 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial02.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 58392 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial03.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46831 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial04.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 79329 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial05.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18175 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial06.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45892 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial07.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13834 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial08.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21454 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/whatsnext.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56970 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/contributing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7799 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10536 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/install.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40705 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/overview.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 32096 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/reusable-apps.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38919 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial01.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 79576 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial02.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 58472 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial03.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46911 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial04.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 79406 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial05.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18257 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial06.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45969 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial07.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13911 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/tutorial08.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21531 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/intro/whatsnext.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10128 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/api-stability.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26896 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/design-philosophies.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7353 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/distributions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6960 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100448 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/objects.inv │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41847 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/py-modindex.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10205 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/api-stability.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26972 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/design-philosophies.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7430 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/distributions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7035 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/misc/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100461 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/objects.inv │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41907 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/py-modindex.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 59413 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/applications.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 140362 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/checks.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 59511 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/applications.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 140451 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/checks.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39794 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/base.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 193894 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/flattened-index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 92768 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-date-based.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31111 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-display.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48535 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-editing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20946 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53387 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-date-based.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35850 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-editing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31638 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-multiple-object.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17809 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-simple.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28159 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-single-object.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5936 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17329 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/clickjacking.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39874 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/base.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 193973 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/flattened-index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 92882 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-date-based.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31191 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-display.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48617 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/generic-editing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21026 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53529 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-date-based.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35936 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-editing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31723 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-multiple-object.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17889 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-simple.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28244 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins-single-object.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6016 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/class-based-views/mixins.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17409 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/clickjacking.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 59949 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/actions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19628 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/admindocs.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30009 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/filters.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 451569 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15011 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/javascript.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 104928 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/auth.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86106 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/contenttypes.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41106 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/flatpages.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60051 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/actions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19711 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/admindocs.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30098 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/filters.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 451783 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15094 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/admin/javascript.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 105010 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/auth.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86186 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/contenttypes.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41198 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/flatpages.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15099 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/admin.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16028 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/commands.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 72779 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/db-api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6642 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/deployment.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15303 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/feeds.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29499 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/forms-api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 94120 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/functions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 249598 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/gdal.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25578 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geoip2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100886 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geoquerysets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 175078 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geos.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21731 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15181 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/admin.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16111 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/commands.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 72868 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/db-api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6730 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/deployment.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15397 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/feeds.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29602 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/forms-api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 94281 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/functions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 249777 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/gdal.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25661 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geoip2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geoquerysets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 175213 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/geos.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21814 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/index.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24657 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/geolibs.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40107 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12698 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/postgis.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13239 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/spatialite.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30817 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/layermapping.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27976 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/measure.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36074 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/model-api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8642 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/ogrinspect.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11899 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/serializers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7396 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/sitemaps.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15605 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/testing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 93236 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/tutorial.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7287 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/utils.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23806 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/humanize.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17334 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55765 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/messages.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24755 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/geolibs.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40214 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12784 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/postgis.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13328 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/install/spatialite.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30912 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/layermapping.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28066 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/measure.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36187 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/model-api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8729 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/ogrinspect.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/serializers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7479 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/sitemaps.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15691 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/testing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 93328 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/tutorial.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7370 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/gis/utils.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23886 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/humanize.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17414 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55855 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/messages.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66606 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/aggregates.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35712 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/constraints.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10565 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/expressions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 134252 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36393 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/forms.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10582 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/functions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16081 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28522 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/indexes.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17707 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/lookups.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31458 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/operations.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66909 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/search.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11139 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/validators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20016 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/redirects.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 85566 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/sitemaps.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65386 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/sites.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76370 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/staticfiles.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 106470 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/syndication.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28084 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/csrf.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 113285 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/databases.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 231028 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/django-admin.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55045 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/exceptions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66689 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/aggregates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35800 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/constraints.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10648 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/expressions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 134347 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36482 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/forms.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10669 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/functions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16167 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28621 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/indexes.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17795 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/lookups.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31547 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/operations.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67013 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/search.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11231 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/postgres/validators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20096 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/redirects.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 85658 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/sitemaps.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65466 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/sites.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76462 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/staticfiles.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 106558 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/contrib/syndication.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28163 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/csrf.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 113386 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/databases.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 231129 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/django-admin.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55182 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/exceptions.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27278 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/file.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7788 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44916 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/storage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34390 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/uploads.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27374 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/file.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7868 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45042 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34499 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/files/uploads.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 224705 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 215071 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9040 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/formsets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11916 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28200 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/models.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35625 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/renderers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48122 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/validation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 148110 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/widgets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 47847 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/logging.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 65546 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/middleware.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86287 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/migration-operations.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 224804 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 215223 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9122 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/formsets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/models.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35717 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/renderers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48202 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/validation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 148256 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/forms/widgets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9057 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 47933 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/logging.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 65676 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/middleware.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86435 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/migration-operations.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13165 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/class.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53531 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/conditional-expressions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39038 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/constraints.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 324738 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/database-functions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 175881 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/expressions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 320703 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/fields.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30387 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/indexes.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 126550 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/instances.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35952 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/lookups.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18225 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/meta.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67868 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/options.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 519018 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/querysets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39326 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/relations.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36696 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/paginator.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 189181 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/request-response.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37652 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/schema-editor.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 380961 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/settings.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 71685 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/signals.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41148 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/template-response.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13245 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/class.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53621 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/conditional-expressions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39131 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/constraints.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 325014 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/database-functions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 175996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/expressions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 320955 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/fields.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7076 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30468 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/indexes.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 126680 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/instances.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36040 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/lookups.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18311 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/meta.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67951 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/options.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 519233 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/querysets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39409 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/models/relations.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36806 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/paginator.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 189369 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/request-response.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37763 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/schema-editor.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 381124 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/settings.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 71790 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/signals.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41241 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/template-response.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 137004 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/api.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 293668 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/builtins.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8985 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 73689 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/language.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37216 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/unicode.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33345 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/urlresolvers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33170 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/urls.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 167649 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/utils.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 66550 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/validators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23240 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/views.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 137132 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/api.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 293780 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/builtins.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9064 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 73766 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/templates/language.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37301 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/unicode.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33438 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/urlresolvers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33251 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/urls.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 167916 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/utils.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 66664 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/validators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23317 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/ref/views.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12905 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/0.95.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25616 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/0.96.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 95814 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0-porting-guide.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9157 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8418 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26539 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9718 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8354 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8903 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46888 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14628 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8225 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12243 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7912 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6781 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7306 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9204 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6463 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 171486 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17452 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8835 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9215 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6605 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6953 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6267 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7010 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5900 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.16.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6156 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.17.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6452 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.18.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7039 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.19.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10910 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5783 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.20.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7145 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.21.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8295 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.22.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13784 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.23.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6281 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.24.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6289 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.25.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6393 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.26.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7653 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.27.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6527 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.28.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6480 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.29.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11679 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9976 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10768 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6902 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7056 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8862 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6746 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 122415 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5359 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6857 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5740 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11453 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13939 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5555 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5505 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 124294 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5494 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5474 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5462 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7633 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10664 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5765 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90705 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5457 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5836 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13071 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6112 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9175 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11400 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5797 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6190 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.16.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6028 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.17.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11538 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.18.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6245 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.19.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9726 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7432 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.20.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10731 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.21.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8042 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.22.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11406 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5781 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8195 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7116 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8957 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6592 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 152174 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6254 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5788 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5971 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5804 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13481 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11769 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9761 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8483 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14002 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6087 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9150 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11383 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98832 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11457 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12183 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9645 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8964 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20907 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6969 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10679 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14186 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6143 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5947 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6011 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 153067 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20316 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7887 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25003 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13839 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7272 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7225 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7938 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10709 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5851 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11766 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 236981 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15061 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13209 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5422 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6701 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6144 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7210 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6649 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9235 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.16.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5885 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.17.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8267 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.18.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9162 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.19.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11551 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20998 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10750 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10732 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9952 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12558 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11049 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8483 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 234531 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13728 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6640 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9235 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5885 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8933 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16228 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15972 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5398 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9767 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7872 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7603 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7441 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5919 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 177134 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8962 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7723 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7014 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5757 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5865 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9949 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11701 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8127 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7249 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6978 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6686 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7898 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5858 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 104931 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9619 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8261 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13759 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6256 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6264 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6368 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9002 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8302 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7332 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7189 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8120 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7677 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5731 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5885 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8515 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 64286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6493 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7532 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5876 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7954 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5957 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6336 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9013 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.16.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5171 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.17.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6806 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.18.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6938 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.19.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11665 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6185 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.20.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6358 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.21.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7584 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.22.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6251 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.23.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9305 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.24.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6151 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.25.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10052 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.26.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7639 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.27.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8830 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.28.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9890 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15953 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7141 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6473 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8047 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9836 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7611 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 71560 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9584 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9004 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6021 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6806 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6938 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6161 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7069 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10881 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8851 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6374 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5993 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9633 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7044 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6323 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 88758 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14207 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7575 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6249 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9305 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6837 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6127 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8176 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12099 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7155 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7250 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7562 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7048 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6341 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 113560 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13133 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6870 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10052 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7639 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9557 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7263 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.14.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6804 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.15.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6159 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.16.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6605 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.17.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6471 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.18.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8178 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.19.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8434 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6820 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.20.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6504 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.21.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7968 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.22.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7020 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.23.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6330 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.24.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7658 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.25.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6752 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11638 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8808 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6331 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5787 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6054 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5841 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 108453 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12423 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6438 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11233 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6841 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9819 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6522 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7238 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6779 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6134 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6588 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 99262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11247 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6811 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6504 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7968 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10762 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6132 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7892 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7138 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7066 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5868 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8161 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 98603 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13904 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.1.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6321 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.10.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7682 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.11.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5950 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.12.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5105 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.13.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9927 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7872 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.3.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6360 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.4.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8325 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.5.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10630 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.6.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8085 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.7.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8365 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.8.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5810 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.9.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 78581 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 46700 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 158596 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/security.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3866 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/search.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1831340 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/searchindex.js │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12982 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/0.95.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25693 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/0.96.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 95893 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0-porting-guide.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9234 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8495 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26616 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.0.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9795 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8431 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8980 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46965 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14705 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8302 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12320 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7989 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6858 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7383 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9281 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6540 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 171568 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17529 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8912 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9292 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6682 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7030 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6344 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7087 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5977 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.16.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6233 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.17.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6529 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.18.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7116 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.19.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10987 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5860 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.20.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7222 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.21.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8372 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.22.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13861 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.23.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6358 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.24.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6366 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.25.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6470 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.26.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7730 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.27.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6604 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.28.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6557 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.29.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11756 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10053 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10845 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6979 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7133 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8939 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6823 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 122492 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5436 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6934 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5817 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11530 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14016 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5632 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5582 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 124374 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5571 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5551 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5539 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7710 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9059 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10741 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5842 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90781 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5534 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5913 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13148 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6189 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9252 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11477 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5874 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6267 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.16.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6105 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.17.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11615 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.18.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6322 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.19.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9803 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7509 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.20.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10808 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.21.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8119 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.22.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9059 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11483 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5858 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8272 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7193 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9034 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6669 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 152261 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6331 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5865 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6048 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5881 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13558 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11846 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9838 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8560 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14079 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6164 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9227 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11460 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 98917 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11534 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12260 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9722 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9041 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20984 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7046 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10756 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14263 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6220 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6024 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6088 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 153152 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20393 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7964 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8059 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25080 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13916 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7349 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7302 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8015 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10786 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5928 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11843 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 237063 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15138 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13286 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5499 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6778 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6221 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7287 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6726 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9312 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.16.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5962 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.17.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8344 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.18.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9239 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.19.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11628 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21075 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10827 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10809 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10029 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12635 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11126 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8560 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 234616 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13805 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6717 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9312 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5962 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9010 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16305 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16049 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5475 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9844 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7949 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7680 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7518 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 177216 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/1.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9039 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7800 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7091 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5834 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5942 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10026 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11778 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8204 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7326 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7055 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6763 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7975 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5935 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 105008 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.0.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9696 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8338 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13836 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6333 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6341 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6445 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9079 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8379 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7409 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7266 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8197 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7754 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5808 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5962 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8592 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 64363 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14339 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6570 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7609 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5953 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8031 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6034 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6413 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9090 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.16.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5248 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.17.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6883 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.18.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7015 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.19.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11742 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.20.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6435 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.21.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.22.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6328 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.23.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9382 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.24.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6228 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.25.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10129 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.26.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7716 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.27.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8907 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.28.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9967 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16030 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7218 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6550 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8124 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9913 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7688 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 71640 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/2.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9661 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9081 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6098 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6883 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7015 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6238 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7146 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10958 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8928 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6451 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6070 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9710 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7121 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6400 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 88835 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.0.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14284 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7652 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6326 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9382 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6914 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6204 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8253 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12176 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8339 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7232 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7327 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7639 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7125 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6418 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 113637 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13210 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6947 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10129 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7716 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9634 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7340 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.14.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6881 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.15.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6236 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.16.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6682 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.17.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6548 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.18.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8255 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.19.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8511 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6897 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.20.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6581 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.21.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8045 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.22.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7097 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.23.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6407 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.24.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7735 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.25.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6829 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11715 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8885 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6408 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5864 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6131 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5918 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 108530 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/3.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12500 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6515 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11310 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6918 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9896 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6599 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7315 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6856 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6211 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6665 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 99339 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.0.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11324 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6888 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6581 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8045 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7073 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10839 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6209 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7969 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6339 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7215 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7143 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5945 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8238 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 98680 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13981 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.1.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6398 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.10.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7759 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.11.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6027 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.12.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5182 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.13.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10004 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7949 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.3.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6437 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.4.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8402 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.5.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10707 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.6.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8162 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.7.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8442 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.8.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5887 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.9.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 78658 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/4.2.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 46775 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 158673 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/releases/security.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3922 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/search.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1978026 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/searchindex.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1080 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/templatebuiltins.js │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36305 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/async.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36409 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/async.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 146194 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/customizing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 209793 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/default.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11663 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81889 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/passwords.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 152908 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/cache.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27160 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/checks.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 146283 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/customizing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 209908 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/default.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11743 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81999 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/auth/passwords.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 153006 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/cache.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27237 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/checks.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45834 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/generic-display.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38804 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/generic-editing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21863 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40243 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/intro.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 97182 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/mixins.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28120 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/conditional-view-processing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45926 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/generic-display.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38893 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/generic-editing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21943 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40329 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/intro.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 97275 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/class-based-views/mixins.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28197 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/conditional-view-processing.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 81830 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/aggregation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 81913 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/aggregation.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5618 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45050 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/many_to_many.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34880 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/many_to_one.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25131 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/one_to_one.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22954 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/fixtures.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6673 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17497 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/instrumentation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55827 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/managers.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 178317 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/models.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 89243 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/multi-db.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61536 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/optimization.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 249522 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/queries.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16730 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/search.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49193 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/sql.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14318 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/tablespaces.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76538 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/transactions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 88836 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/email.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7903 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/external-packages.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35501 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/files.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5701 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45133 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/many_to_many.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34963 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/many_to_one.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25214 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/examples/one_to_one.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23033 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/fixtures.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6753 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17577 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/instrumentation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55909 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/managers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 178404 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/models.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 89327 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/multi-db.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61616 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/optimization.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 249627 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/queries.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16810 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/search.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49296 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/sql.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14403 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/tablespaces.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76657 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/db/transactions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 88931 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/email.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7980 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/external-packages.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35584 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/files.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 144604 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/formsets.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 96364 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51346 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/media.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 170332 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/modelforms.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 144702 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/formsets.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 96445 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51426 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/media.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 170438 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/forms/modelforms.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21099 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/decorators.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48195 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/file-uploads.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5173 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/generic-views.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6027 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 54127 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/middleware.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 100262 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/sessions.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37460 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/shortcuts.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 92861 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/urls.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29180 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/views.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21200 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/decorators.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48288 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/file-uploads.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5253 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/generic-views.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6107 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 54216 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/middleware.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 100362 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/sessions.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37548 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/shortcuts.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 92941 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/urls.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29259 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/http/views.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21757 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/formatting.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11683 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 71996 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/timezones.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 242385 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/translation.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27058 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23160 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/install.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45837 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/logging.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90612 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/migrations.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22428 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/pagination.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 38048 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/performance.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31318 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/security.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 72981 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/serialization.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34332 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/settings.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36338 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/signals.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40939 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/signing.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 73009 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/templates.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21849 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/formatting.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11768 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 72101 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/timezones.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 242530 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/i18n/translation.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27133 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23237 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/install.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45913 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/logging.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90707 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/migrations.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22508 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/pagination.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 38137 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/performance.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31403 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/security.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 73077 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/serialization.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34411 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/settings.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36435 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/signals.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41024 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/signing.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 73110 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/templates.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110421 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/advanced.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7257 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42662 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/overview.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 276967 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/tools.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110540 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/advanced.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7337 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42751 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/overview.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 277159 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/topics/testing/tools.html │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc-base/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 407 2024-05-08 10:28:44.000000 ./usr/share/doc-base/python-django-doc.python-django-doc │ │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ │ -lrwxrwxrwx 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/language_data.js -> ../../../../javascript/sphinxdoc/1.0/language_data.js │ │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/searchtools.js -> ../../../../javascript/sphinxdoc/1.0/searchtools.js │ │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-05-08 10:28:44.000000 ./usr/share/doc/python-django-doc/html/_static/sphinx_highlight.js -> ../../../../javascript/sphinxdoc/1.0/sphinx_highlight.js │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/asgiref/sync.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - asgiref.sync — Django 4.2.13 documentation │ │ │ │ + asgiref.sync — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for asgiref.sync

│ │ │ │ +  

Broncode voor asgiref.sync

│ │ │ │  import asyncio
│ │ │ │  import asyncio.coroutines
│ │ │ │  import contextvars
│ │ │ │  import functools
│ │ │ │  import inspect
│ │ │ │  import os
│ │ │ │  import sys
│ │ │ │ @@ -615,15 +616,15 @@
│ │ │ │      *,
│ │ │ │      force_new_loop: bool = False,
│ │ │ │  ) -> Callable[_P, _R]:
│ │ │ │      ...
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def async_to_sync( │ │ │ │ awaitable: Optional[ │ │ │ │ Union[ │ │ │ │ Callable[_P, Coroutine[Any, Any, _R]], │ │ │ │ Callable[_P, Awaitable[_R]], │ │ │ │ ] │ │ │ │ ] = None, │ │ │ │ @@ -664,15 +665,15 @@ │ │ │ │ thread_sensitive: bool = True, │ │ │ │ executor: Optional["ThreadPoolExecutor"] = None, │ │ │ │ ) -> Callable[_P, Coroutine[Any, Any, _R]]: │ │ │ │ ... │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def sync_to_async( │ │ │ │ func: Optional[Callable[_P, _R]] = None, │ │ │ │ *, │ │ │ │ thread_sensitive: bool = True, │ │ │ │ executor: Optional["ThreadPoolExecutor"] = None, │ │ │ │ ) -> Union[ │ │ │ │ Callable[[Callable[_P, _R]], Callable[_P, Coroutine[Any, Any, _R]]], │ │ │ │ @@ -698,35 +699,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr aassggiirreeff..ssyynncc ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr aassggiirreeff..ssyynncc ************ │ │ │ │ │ import asyncio │ │ │ │ │ import asyncio.coroutines │ │ │ │ │ import contextvars │ │ │ │ │ import functools │ │ │ │ │ import inspect │ │ │ │ │ import os │ │ │ │ │ import sys │ │ │ │ │ @@ -566,15 +566,15 @@ │ │ │ │ │ *, │ │ │ │ │ force_new_loop: bool = False, │ │ │ │ │ ) -> Callable[_P, _R]: │ │ │ │ │ ... │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def async_to_sync( │ │ │ │ │ awaitable: Optional[ │ │ │ │ │ Union[ │ │ │ │ │ Callable[_P, Coroutine[Any, Any, _R]], │ │ │ │ │ Callable[_P, Awaitable[_R]], │ │ │ │ │ ] │ │ │ │ │ ] = None, │ │ │ │ │ @@ -617,15 +617,15 @@ │ │ │ │ │ thread_sensitive: bool = True, │ │ │ │ │ executor: Optional["ThreadPoolExecutor"] = None, │ │ │ │ │ ) -> Callable[_P, Coroutine[Any, Any, _R]]: │ │ │ │ │ ... │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def sync_to_async( │ │ │ │ │ func: Optional[Callable[_P, _R]] = None, │ │ │ │ │ *, │ │ │ │ │ thread_sensitive: bool = True, │ │ │ │ │ executor: Optional["ThreadPoolExecutor"] = None, │ │ │ │ │ ) -> Union[ │ │ │ │ │ Callable[[Callable[_P, _R]], Callable[_P, Coroutine[Any, Any, _R]]], │ │ │ │ │ @@ -639,12 +639,12 @@ │ │ │ │ │ ) │ │ │ │ │ return SyncToAsync( │ │ │ │ │ func, │ │ │ │ │ thread_sensitive=thread_sensitive, │ │ │ │ │ executor=executor, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/apps/config.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.apps.config — Django 4.2.13 documentation │ │ │ │ + django.apps.config — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.apps.config

│ │ │ │ +  

Broncode voor django.apps.config

│ │ │ │  import inspect
│ │ │ │  import os
│ │ │ │  from importlib import import_module
│ │ │ │  
│ │ │ │  from django.core.exceptions import ImproperlyConfigured
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  from django.utils.module_loading import import_string, module_has_submodule
│ │ │ │  
│ │ │ │  APPS_MODULE_NAME = "apps"
│ │ │ │  MODELS_MODULE_NAME = "models"
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AppConfig: │ │ │ │ """Class representing a Django application and its configuration.""" │ │ │ │ │ │ │ │ def __init__(self, app_name, app_module): │ │ │ │ # Full Python path to the application e.g. 'django.contrib.admin'. │ │ │ │ self.name = app_name │ │ │ │ │ │ │ │ @@ -293,15 +294,15 @@ │ │ │ │ ) │ │ │ │ ) │ │ │ │ │ │ │ │ # Entry is a path to an app config class. │ │ │ │ return app_config_class(app_name, app_module) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_model(self, model_name, require_ready=True): │ │ │ │ """ │ │ │ │ Return the model with the given case-insensitive model_name. │ │ │ │ │ │ │ │ Raise LookupError if no model exists with this name. │ │ │ │ """ │ │ │ │ if require_ready: │ │ │ │ @@ -313,15 +314,15 @@ │ │ │ │ except KeyError: │ │ │ │ raise LookupError( │ │ │ │ "App '%s' doesn't have a '%s' model." % (self.label, model_name) │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_models(self, include_auto_created=False, include_swapped=False): │ │ │ │ """ │ │ │ │ Return an iterable of models. │ │ │ │ │ │ │ │ By default, the following models aren't included: │ │ │ │ │ │ │ │ - auto-created models for many-to-many relations without │ │ │ │ @@ -346,15 +347,15 @@ │ │ │ │ self.models = self.apps.all_models[self.label] │ │ │ │ │ │ │ │ if module_has_submodule(self.module, MODELS_MODULE_NAME): │ │ │ │ models_module_name = "%s.%s" % (self.name, MODELS_MODULE_NAME) │ │ │ │ self.models_module = import_module(models_module_name) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def ready(self): │ │ │ │ """ │ │ │ │ Override this method in subclasses to run code when Django starts. │ │ │ │ """
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -365,35 +366,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,25 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..aappppss..ccoonnffiigg ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..aappppss..ccoonnffiigg ************ │ │ │ │ │ import inspect │ │ │ │ │ import os │ │ │ │ │ from importlib import import_module │ │ │ │ │ │ │ │ │ │ from django.core.exceptions import ImproperlyConfigured │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ from django.utils.module_loading import import_string, module_has_submodule │ │ │ │ │ │ │ │ │ │ APPS_MODULE_NAME = "apps" │ │ │ │ │ MODELS_MODULE_NAME = "models" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AppConfig: │ │ │ │ │ """Class representing a Django application and its configuration.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, app_name, app_module): │ │ │ │ │ # Full Python path to the application e.g. 'django.contrib.admin'. │ │ │ │ │ self.name = app_name │ │ │ │ │ │ │ │ │ │ @@ -230,15 +230,15 @@ │ │ │ │ │ ) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ # Entry is a path to an app config class. │ │ │ │ │ return app_config_class(app_name, app_module) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_model(self, model_name, require_ready=True): │ │ │ │ │ """ │ │ │ │ │ Return the model with the given case-insensitive model_name. │ │ │ │ │ │ │ │ │ │ Raise LookupError if no model exists with this name. │ │ │ │ │ """ │ │ │ │ │ if require_ready: │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ "App '%s' doesn't have a '%s' model." % (self.label, │ │ │ │ │ model_name) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_models(self, include_auto_created=False, include_swapped=False): │ │ │ │ │ """ │ │ │ │ │ Return an iterable of models. │ │ │ │ │ │ │ │ │ │ By default, the following models aren't included: │ │ │ │ │ │ │ │ │ │ - auto-created models for many-to-many relations without │ │ │ │ │ @@ -286,19 +286,19 @@ │ │ │ │ │ self.models = self.apps.all_models[self.label] │ │ │ │ │ │ │ │ │ │ if module_has_submodule(self.module, MODELS_MODULE_NAME): │ │ │ │ │ models_module_name = "%s.%s" % (self.name, MODELS_MODULE_NAME) │ │ │ │ │ self.models_module = import_module(models_module_name) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def ready(self): │ │ │ │ │ """ │ │ │ │ │ Override this method in subclasses to run code when Django starts. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/conf/urls/i18n.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.conf.urls.i18n — Django 4.2.13 documentation │ │ │ │ + django.conf.urls.i18n — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.conf.urls.i18n

│ │ │ │ +  

Broncode voor django.conf.urls.i18n

│ │ │ │  import functools
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.urls import LocalePrefixPattern, URLResolver, get_resolver, path
│ │ │ │  from django.views.i18n import set_language
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def i18n_patterns(*urls, prefix_default_language=True): │ │ │ │ """ │ │ │ │ Add the language code prefix to every URL pattern within this function. │ │ │ │ This may only be used in the root URLconf, not in an included URLconf. │ │ │ │ """ │ │ │ │ if not settings.USE_I18N: │ │ │ │ return list(urls) │ │ │ │ @@ -121,35 +122,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,20 +1,20 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnff..uurrllss..ii1188nn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnff..uurrllss..ii1188nn ************ │ │ │ │ │ import functools │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.urls import LocalePrefixPattern, URLResolver, get_resolver, path │ │ │ │ │ from django.views.i18n import set_language │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def i18n_patterns(*urls, prefix_default_language=True): │ │ │ │ │ """ │ │ │ │ │ Add the language code prefix to every URL pattern within this function. │ │ │ │ │ This may only be used in the root URLconf, not in an included URLconf. │ │ │ │ │ """ │ │ │ │ │ if not settings.USE_I18N: │ │ │ │ │ return list(urls) │ │ │ │ │ @@ -42,12 +42,12 @@ │ │ │ │ │ return True, url_pattern.pattern.prefix_default_language │ │ │ │ │ return False, False │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ urlpatterns = [ │ │ │ │ │ path("setlang/", set_language, name="set_language"), │ │ │ │ │ ] │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/decorators.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.admin.decorators — Django 4.2.13 documentation │ │ │ │ + django.contrib.admin.decorators — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.admin.decorators

│ │ │ │ +  

Broncode voor django.contrib.admin.decorators

│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def action(function=None, *, permissions=None, description=None): │ │ │ │ """ │ │ │ │ Conveniently add attributes to an action function:: │ │ │ │ │ │ │ │ @admin.action( │ │ │ │ permissions=['publish'], │ │ │ │ description='Mark selected stories as published', │ │ │ │ @@ -104,15 +105,15 @@ │ │ │ │ return decorator │ │ │ │ else: │ │ │ │ return decorator(function)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def display( │ │ │ │ function=None, *, boolean=None, ordering=None, description=None, empty_value=None │ │ │ │ ): │ │ │ │ """ │ │ │ │ Conveniently add attributes to a display function:: │ │ │ │ │ │ │ │ @admin.display( │ │ │ │ @@ -153,15 +154,15 @@ │ │ │ │ return decorator │ │ │ │ else: │ │ │ │ return decorator(function)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def register(*models, site=None): │ │ │ │ """ │ │ │ │ Register the given model(s) classes and wrapped ModelAdmin class with │ │ │ │ admin site: │ │ │ │ │ │ │ │ @register(Author) │ │ │ │ class AuthorAdmin(admin.ModelAdmin): │ │ │ │ @@ -199,35 +200,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ddeeccoorraattoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ddeeccoorraattoorrss ************ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def action(function=None, *, permissions=None, description=None): │ │ │ │ │ """ │ │ │ │ │ Conveniently add attributes to an action function:: │ │ │ │ │ │ │ │ │ │ @admin.action( │ │ │ │ │ permissions=['publish'], │ │ │ │ │ description='Mark selected stories as published', │ │ │ │ │ @@ -36,15 +36,15 @@ │ │ │ │ │ else: │ │ │ │ │ return decorator(function) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def display( │ │ │ │ │ function=None, *, boolean=None, ordering=None, description=None, │ │ │ │ │ empty_value=None │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Conveniently add attributes to a display function:: │ │ │ │ │ │ │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ │ else: │ │ │ │ │ return decorator(function) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def register(*models, site=None): │ │ │ │ │ """ │ │ │ │ │ Register the given model(s) classes and wrapped ModelAdmin class with │ │ │ │ │ admin site: │ │ │ │ │ │ │ │ │ │ @register(Author) │ │ │ │ │ class AuthorAdmin(admin.ModelAdmin): │ │ │ │ │ @@ -121,12 +121,12 @@ │ │ │ │ │ │ │ │ │ │ admin_site.register(models, admin_class=admin_class) │ │ │ │ │ │ │ │ │ │ return admin_class │ │ │ │ │ │ │ │ │ │ return _model_admin_wrapper │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/options.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.admin.options — Django 4.2.13 documentation │ │ │ │ + django.contrib.admin.options — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.admin.options

│ │ │ │ +  

Broncode voor django.contrib.admin.options

│ │ │ │  import copy
│ │ │ │  import json
│ │ │ │  import re
│ │ │ │  from functools import partial, update_wrapper
│ │ │ │  from urllib.parse import quote as urlquote
│ │ │ │  
│ │ │ │  from django import forms
│ │ │ │ @@ -681,15 +682,15 @@
│ │ │ │          does not restrict access to the add, change or delete views. Use
│ │ │ │          `ModelAdmin.has_(add|change|delete)_permission` for that.
│ │ │ │          """
│ │ │ │          return request.user.has_module_perms(self.opts.app_label)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ModelAdmin(BaseModelAdmin): │ │ │ │ """Encapsulate all admin options and functionality for a given model.""" │ │ │ │ │ │ │ │ list_display = ("__str__",) │ │ │ │ list_display_links = () │ │ │ │ list_filter = () │ │ │ │ list_select_related = False │ │ │ │ @@ -735,15 +736,15 @@ │ │ │ │ def __repr__(self): │ │ │ │ return ( │ │ │ │ f"<{self.__class__.__qualname__}: model={self.model.__qualname__} " │ │ │ │ f"site={self.admin_site!r}>" │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_inline_instances(self, request, obj=None): │ │ │ │ inline_instances = [] │ │ │ │ for inline_class in self.get_inlines(request, obj): │ │ │ │ inline = inline_class(self.model, self.admin_site) │ │ │ │ if request: │ │ │ │ if not ( │ │ │ │ inline.has_view_or_change_permission(request, obj) │ │ │ │ @@ -755,15 +756,15 @@ │ │ │ │ inline.max_num = 0 │ │ │ │ inline_instances.append(inline) │ │ │ │ │ │ │ │ return inline_instances
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_urls(self): │ │ │ │ from django.urls import path │ │ │ │ │ │ │ │ def wrap(view): │ │ │ │ def wrapper(*args, **kwargs): │ │ │ │ return self.admin_site.admin_view(view)(*args, **kwargs) │ │ │ │ │ │ │ │ @@ -835,15 +836,15 @@ │ │ │ │ "view": self.has_view_permission(request), │ │ │ │ } │ │ │ │ │ │ │ │ def _get_form_for_get_fields(self, request, obj): │ │ │ │ return self.get_form(request, obj, fields=None) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_form(self, request, obj=None, change=False, **kwargs): │ │ │ │ """ │ │ │ │ Return a Form class for use in the admin add view. This is used by │ │ │ │ add_view and change_view. │ │ │ │ """ │ │ │ │ if "fields" in kwargs: │ │ │ │ fields = kwargs.pop("fields") │ │ │ │ @@ -894,15 +895,15 @@ │ │ │ │ raise FieldError( │ │ │ │ "%s. Check fields/fieldsets/exclude attributes of class %s." │ │ │ │ % (e, self.__class__.__name__) │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_changelist(self, request, **kwargs): │ │ │ │ """ │ │ │ │ Return the ChangeList class for use on the changelist page. │ │ │ │ """ │ │ │ │ from django.contrib.admin.views.main import ChangeList │ │ │ │ │ │ │ │ return ChangeList
│ │ │ │ @@ -951,15 +952,15 @@ │ │ │ │ try: │ │ │ │ object_id = field.to_python(object_id) │ │ │ │ return queryset.get(**{field.name: object_id}) │ │ │ │ except (model.DoesNotExist, ValidationError, ValueError): │ │ │ │ return None │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_changelist_form(self, request, **kwargs): │ │ │ │ """ │ │ │ │ Return a Form class for use in the Formset on the changelist page. │ │ │ │ """ │ │ │ │ defaults = { │ │ │ │ "formfield_callback": partial(self.formfield_for_dbfield, request=request), │ │ │ │ **kwargs, │ │ │ │ @@ -969,15 +970,15 @@ │ │ │ │ ): │ │ │ │ defaults["fields"] = forms.ALL_FIELDS │ │ │ │ │ │ │ │ return modelform_factory(self.model, **defaults)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_changelist_formset(self, request, **kwargs): │ │ │ │ """ │ │ │ │ Return a FormSet class for use on the changelist page if list_editable │ │ │ │ is used. │ │ │ │ """ │ │ │ │ defaults = { │ │ │ │ "formfield_callback": partial(self.formfield_for_dbfield, request=request), │ │ │ │ @@ -989,25 +990,25 @@ │ │ │ │ extra=0, │ │ │ │ fields=self.list_editable, │ │ │ │ **defaults, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_formsets_with_inlines(self, request, obj=None): │ │ │ │ """ │ │ │ │ Yield formsets and the corresponding inlines. │ │ │ │ """ │ │ │ │ for inline in self.get_inline_instances(request, obj): │ │ │ │ yield inline.get_formset(request, obj), inline
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_paginator( │ │ │ │ self, request, queryset, per_page, orphans=0, allow_empty_first_page=True │ │ │ │ ): │ │ │ │ return self.paginator(queryset, per_page, orphans, allow_empty_first_page)
│ │ │ │ │ │ │ │ │ │ │ │ def log_addition(self, request, obj, message): │ │ │ │ @@ -1103,15 +1104,15 @@ │ │ │ │ for permission in callable.allowed_permissions │ │ │ │ ) │ │ │ │ if any(has_permission(request) for has_permission in permission_checks): │ │ │ │ filtered_actions.append(action) │ │ │ │ return filtered_actions │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_actions(self, request): │ │ │ │ """ │ │ │ │ Return a dictionary mapping the names of all actions for this │ │ │ │ ModelAdmin to a tuple of (callable, name, description) for each action. │ │ │ │ """ │ │ │ │ # If self.actions is set to None that means actions are disabled on │ │ │ │ # this page. │ │ │ │ @@ -1156,25 +1157,25 @@ │ │ │ │ except KeyError: │ │ │ │ return None │ │ │ │ │ │ │ │ description = self._get_action_description(func, action) │ │ │ │ return func, action, description │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_list_display(self, request): │ │ │ │ """ │ │ │ │ Return a sequence containing the fields to be displayed on the │ │ │ │ changelist. │ │ │ │ """ │ │ │ │ return self.list_display
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_list_filter(self, request): │ │ │ │ """ │ │ │ │ Return a sequence containing the fields to be displayed as filters in │ │ │ │ the right sidebar of the changelist page. │ │ │ │ """ │ │ │ │ return self.list_filter
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_search_fields(self, request): │ │ │ │ """ │ │ │ │ Return a sequence containing the fields to be searched whenever │ │ │ │ somebody submits a search query. │ │ │ │ """ │ │ │ │ return self.search_fields
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_search_results(self, request, queryset, search_term): │ │ │ │ """ │ │ │ │ Return a tuple containing a queryset to implement the search │ │ │ │ and a boolean indicating if the results may contain duplicates. │ │ │ │ """ │ │ │ │ │ │ │ │ # Apply keyword searches. │ │ │ │ @@ -1302,15 +1303,15 @@ │ │ │ │ def construct_change_message(self, request, form, formsets, add=False): │ │ │ │ """ │ │ │ │ Construct a JSON structure describing changes from a changed object. │ │ │ │ """ │ │ │ │ return construct_change_message(form, formsets, add) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def message_user( │ │ │ │ self, request, message, level=messages.INFO, extra_tags="", fail_silently=False │ │ │ │ ): │ │ │ │ """ │ │ │ │ Send a message to the user. The default implementation │ │ │ │ posts a message using the django.contrib.messages backend. │ │ │ │ │ │ │ │ @@ -1340,49 +1341,49 @@ │ │ │ │ """ │ │ │ │ Given a ModelForm return an unsaved instance. ``change`` is True if │ │ │ │ the object is being changed, and False if it's being added. │ │ │ │ """ │ │ │ │ return form.save(commit=False) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save_model(self, request, obj, form, change): │ │ │ │ """ │ │ │ │ Given a model instance save it to the database. │ │ │ │ """ │ │ │ │ obj.save()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete_model(self, request, obj): │ │ │ │ """ │ │ │ │ Given a model instance delete it from the database. │ │ │ │ """ │ │ │ │ obj.delete()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete_queryset(self, request, queryset): │ │ │ │ """Given a queryset, delete it from the database.""" │ │ │ │ queryset.delete()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save_formset(self, request, form, formset, change): │ │ │ │ """ │ │ │ │ Given an inline formset save it to the database. │ │ │ │ """ │ │ │ │ formset.save()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ @@ -2685,35 +2686,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ooppttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ooppttiioonnss ************ │ │ │ │ │ import copy │ │ │ │ │ import json │ │ │ │ │ import re │ │ │ │ │ from functools import partial, update_wrapper │ │ │ │ │ from urllib.parse import quote as urlquote │ │ │ │ │ │ │ │ │ │ from django import forms │ │ │ │ │ @@ -637,15 +637,15 @@ │ │ │ │ │ does not restrict access to the add, change or delete views. Use │ │ │ │ │ `ModelAdmin.has_(add|change|delete)_permission` for that. │ │ │ │ │ """ │ │ │ │ │ return request.user.has_module_perms(self.opts.app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ModelAdmin(BaseModelAdmin): │ │ │ │ │ """Encapsulate all admin options and functionality for a given model.""" │ │ │ │ │ │ │ │ │ │ list_display = ("__str__",) │ │ │ │ │ list_display_links = () │ │ │ │ │ list_filter = () │ │ │ │ │ list_select_related = False │ │ │ │ │ @@ -691,15 +691,15 @@ │ │ │ │ │ def __repr__(self): │ │ │ │ │ return ( │ │ │ │ │ f"<{self.__class__.__qualname__}: model={self.model.__qualname__} " │ │ │ │ │ f"site={self.admin_site!r}>" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_inline_instances(self, request, obj=None): │ │ │ │ │ inline_instances = [] │ │ │ │ │ for inline_class in self.get_inlines(request, obj): │ │ │ │ │ inline = inline_class(self.model, self.admin_site) │ │ │ │ │ if request: │ │ │ │ │ if not ( │ │ │ │ │ inline.has_view_or_change_permission(request, obj) │ │ │ │ │ @@ -712,15 +712,15 @@ │ │ │ │ │ inline_instances.append(inline) │ │ │ │ │ │ │ │ │ │ return inline_instances │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_urls(self): │ │ │ │ │ from django.urls import path │ │ │ │ │ │ │ │ │ │ def wrap(view): │ │ │ │ │ def wrapper(*args, **kwargs): │ │ │ │ │ return self.admin_site.admin_view(view)(*args, **kwargs) │ │ │ │ │ │ │ │ │ │ @@ -794,15 +794,15 @@ │ │ │ │ │ "view": self.has_view_permission(request), │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ def _get_form_for_get_fields(self, request, obj): │ │ │ │ │ return self.get_form(request, obj, fields=None) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_form(self, request, obj=None, change=False, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Return a Form class for use in the admin add view. This is used by │ │ │ │ │ add_view and change_view. │ │ │ │ │ """ │ │ │ │ │ if "fields" in kwargs: │ │ │ │ │ fields = kwargs.pop("fields") │ │ │ │ │ @@ -856,15 +856,15 @@ │ │ │ │ │ "%s. Check fields/fieldsets/exclude attributes of class %s." │ │ │ │ │ % (e, self.__class__.__name__) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_changelist(self, request, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Return the ChangeList class for use on the changelist page. │ │ │ │ │ """ │ │ │ │ │ from django.contrib.admin.views.main import ChangeList │ │ │ │ │ │ │ │ │ │ return ChangeList │ │ │ │ │ @@ -915,15 +915,15 @@ │ │ │ │ │ try: │ │ │ │ │ object_id = field.to_python(object_id) │ │ │ │ │ return queryset.get(**{field.name: object_id}) │ │ │ │ │ except (model.DoesNotExist, ValidationError, ValueError): │ │ │ │ │ return None │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_changelist_form(self, request, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Return a Form class for use in the Formset on the changelist page. │ │ │ │ │ """ │ │ │ │ │ defaults = { │ │ │ │ │ "formfield_callback": partial(self.formfield_for_dbfield, │ │ │ │ │ request=request), │ │ │ │ │ @@ -935,15 +935,15 @@ │ │ │ │ │ defaults["fields"] = forms.ALL_FIELDS │ │ │ │ │ │ │ │ │ │ return modelform_factory(self.model, **defaults) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_changelist_formset(self, request, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Return a FormSet class for use on the changelist page if list_editable │ │ │ │ │ is used. │ │ │ │ │ """ │ │ │ │ │ defaults = { │ │ │ │ │ "formfield_callback": partial(self.formfield_for_dbfield, │ │ │ │ │ @@ -957,26 +957,26 @@ │ │ │ │ │ fields=self.list_editable, │ │ │ │ │ **defaults, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_formsets_with_inlines(self, request, obj=None): │ │ │ │ │ """ │ │ │ │ │ Yield formsets and the corresponding inlines. │ │ │ │ │ """ │ │ │ │ │ for inline in self.get_inline_instances(request, obj): │ │ │ │ │ yield inline.get_formset(request, obj), inline │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_paginator( │ │ │ │ │ self, request, queryset, per_page, orphans=0, │ │ │ │ │ allow_empty_first_page=True │ │ │ │ │ ): │ │ │ │ │ return self.paginator(queryset, per_page, orphans, │ │ │ │ │ allow_empty_first_page) │ │ │ │ │ │ │ │ │ │ @@ -1080,15 +1080,15 @@ │ │ │ │ │ ) │ │ │ │ │ if any(has_permission(request) for has_permission in │ │ │ │ │ permission_checks): │ │ │ │ │ filtered_actions.append(action) │ │ │ │ │ return filtered_actions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_actions(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a dictionary mapping the names of all actions for this │ │ │ │ │ ModelAdmin to a tuple of (callable, name, description) for each action. │ │ │ │ │ """ │ │ │ │ │ # If self.actions is set to None that means actions are disabled on │ │ │ │ │ # this page. │ │ │ │ │ @@ -1136,26 +1136,26 @@ │ │ │ │ │ except KeyError: │ │ │ │ │ return None │ │ │ │ │ │ │ │ │ │ description = self._get_action_description(func, action) │ │ │ │ │ return func, action, description │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_list_display(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a sequence containing the fields to be displayed on the │ │ │ │ │ changelist. │ │ │ │ │ """ │ │ │ │ │ return self.list_display │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_list_display_links(self, request, list_display): │ │ │ │ │ """ │ │ │ │ │ Return a sequence containing the fields to be displayed as links │ │ │ │ │ on the changelist. The list_display parameter is the list of fields │ │ │ │ │ returned by get_list_display(). │ │ │ │ │ """ │ │ │ │ │ if ( │ │ │ │ │ @@ -1167,48 +1167,48 @@ │ │ │ │ │ else: │ │ │ │ │ # Use only the first item in list_display as link │ │ │ │ │ return list(list_display)[:1] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_list_filter(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a sequence containing the fields to be displayed as filters in │ │ │ │ │ the right sidebar of the changelist page. │ │ │ │ │ """ │ │ │ │ │ return self.list_filter │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_list_select_related(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a list of fields to add to the select_related() part of the │ │ │ │ │ changelist items query. │ │ │ │ │ """ │ │ │ │ │ return self.list_select_related │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_search_fields(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a sequence containing the fields to be searched whenever │ │ │ │ │ somebody submits a search query. │ │ │ │ │ """ │ │ │ │ │ return self.search_fields │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_search_results(self, request, queryset, search_term): │ │ │ │ │ """ │ │ │ │ │ Return a tuple containing a queryset to implement the search │ │ │ │ │ and a boolean indicating if the results may contain duplicates. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ # Apply keyword searches. │ │ │ │ │ @@ -1289,15 +1289,15 @@ │ │ │ │ │ def construct_change_message(self, request, form, formsets, add=False): │ │ │ │ │ """ │ │ │ │ │ Construct a JSON structure describing changes from a changed object. │ │ │ │ │ """ │ │ │ │ │ return construct_change_message(form, formsets, add) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def message_user( │ │ │ │ │ self, request, message, level=messages.INFO, extra_tags="", │ │ │ │ │ fail_silently=False │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Send a message to the user. The default implementation │ │ │ │ │ posts a message using the django.contrib.messages backend. │ │ │ │ │ @@ -1330,53 +1330,53 @@ │ │ │ │ │ """ │ │ │ │ │ Given a ModelForm return an unsaved instance. ``change`` is True if │ │ │ │ │ the object is being changed, and False if it's being added. │ │ │ │ │ """ │ │ │ │ │ return form.save(commit=False) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save_model(self, request, obj, form, change): │ │ │ │ │ """ │ │ │ │ │ Given a model instance save it to the database. │ │ │ │ │ """ │ │ │ │ │ obj.save() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete_model(self, request, obj): │ │ │ │ │ """ │ │ │ │ │ Given a model instance delete it from the database. │ │ │ │ │ """ │ │ │ │ │ obj.delete() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete_queryset(self, request, queryset): │ │ │ │ │ """Given a queryset, delete it from the database.""" │ │ │ │ │ queryset.delete() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save_formset(self, request, form, formset, change): │ │ │ │ │ """ │ │ │ │ │ Given an inline formset save it to the database. │ │ │ │ │ """ │ │ │ │ │ formset.save() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save_related(self, request, form, formsets, change): │ │ │ │ │ """ │ │ │ │ │ Given the ``HttpRequest``, the parent ``ModelForm`` instance, the │ │ │ │ │ list of inline formsets and a boolean value based on whether the │ │ │ │ │ parent is being added or changed, save the related objects to the │ │ │ │ │ database. Note that at this point save_form() and save_model() have │ │ │ │ │ already been called. │ │ │ │ │ @@ -1452,15 +1452,15 @@ │ │ │ │ │ "admin/%s/change_form.html" % app_label, │ │ │ │ │ "admin/change_form.html", │ │ │ │ │ ], │ │ │ │ │ context, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def response_add(self, request, obj, post_url_continue=None): │ │ │ │ │ """ │ │ │ │ │ Determine the HttpResponse for the add_view stage. │ │ │ │ │ """ │ │ │ │ │ opts = obj._meta │ │ │ │ │ preserved_filters = self.get_preserved_filters(request) │ │ │ │ │ obj_url = reverse( │ │ │ │ │ @@ -1550,15 +1550,15 @@ │ │ │ │ │ ) │ │ │ │ │ self.message_user(request, msg, messages.SUCCESS) │ │ │ │ │ return self.response_post_save_add(request, obj) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def response_change(self, request, obj): │ │ │ │ │ """ │ │ │ │ │ Determine the HttpResponse for the change_view stage. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ if IS_POPUP_VAR in request.POST: │ │ │ │ │ opts = obj._meta │ │ │ │ │ @@ -1760,15 +1760,15 @@ │ │ │ │ │ return HttpResponseRedirect(request.get_full_path()) │ │ │ │ │ else: │ │ │ │ │ msg = _("No action selected.") │ │ │ │ │ self.message_user(request, msg, messages.WARNING) │ │ │ │ │ return None │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def response_delete(self, request, obj_display, obj_id): │ │ │ │ │ """ │ │ │ │ │ Determine the HttpResponse for the delete_view stage. │ │ │ │ │ """ │ │ │ │ │ if IS_POPUP_VAR in request.POST: │ │ │ │ │ popup_response_data = json.dumps( │ │ │ │ │ { │ │ │ │ │ @@ -1878,15 +1878,15 @@ │ │ │ │ │ has_delete_permission=has_delete_permission, │ │ │ │ │ has_view_permission=has_view_permission, │ │ │ │ │ ) │ │ │ │ │ inline_admin_formsets.append(inline_admin_formset) │ │ │ │ │ return inline_admin_formsets │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_changeform_initial_data(self, request): │ │ │ │ │ """ │ │ │ │ │ Get the initial form data from the request's GET params. │ │ │ │ │ """ │ │ │ │ │ initial = dict(request.GET.items()) │ │ │ │ │ for k in initial: │ │ │ │ │ try: │ │ │ │ │ @@ -2057,22 +2057,22 @@ │ │ │ │ │ │ │ │ │ │ return self.render_change_form( │ │ │ │ │ request, context, add=add, change=not add, obj=obj, │ │ │ │ │ form_url=form_url │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_view(self, request, form_url="", extra_context=None): │ │ │ │ │ return self.changeform_view(request, None, form_url, extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def change_view(self, request, object_id, form_url="", extra_context=None): │ │ │ │ │ return self.changeform_view(request, object_id, form_url, │ │ │ │ │ extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def _get_edited_object_pks(self, request, prefix): │ │ │ │ │ @@ -2096,15 +2096,15 @@ │ │ │ │ │ validate(pk) │ │ │ │ │ except ValidationError: │ │ │ │ │ # Disable the optimization if the POST data was tampered with. │ │ │ │ │ return queryset │ │ │ │ │ return queryset.filter(pk__in=object_pks) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @csrf_protect_m │ │ │ │ │ def changelist_view(self, request, extra_context=None): │ │ │ │ │ """ │ │ │ │ │ The 'change list' admin view for this model. │ │ │ │ │ """ │ │ │ │ │ from django.contrib.admin.views.main import ERROR_FLAG │ │ │ │ │ │ │ │ │ │ @@ -2289,26 +2289,26 @@ │ │ │ │ │ ], │ │ │ │ │ context, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_deleted_objects(self, objs, request): │ │ │ │ │ """ │ │ │ │ │ Hook for customizing the delete process for the delete view and the │ │ │ │ │ "delete selected" action. │ │ │ │ │ """ │ │ │ │ │ return get_deleted_objects(objs, request, self.admin_site) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @csrf_protect_m │ │ │ │ │ def delete_view(self, request, object_id, extra_context=None): │ │ │ │ │ with transaction.atomic(using=router.db_for_write(self.model)): │ │ │ │ │ return self._delete_view(request, object_id, extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -2379,15 +2379,15 @@ │ │ │ │ │ "to_field": to_field, │ │ │ │ │ **(extra_context or {}), │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ return self.render_delete_form(request, context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def history_view(self, request, object_id, extra_context=None): │ │ │ │ │ "The 'history' admin view for this model." │ │ │ │ │ from django.contrib.admin.models import LogEntry │ │ │ │ │ from django.contrib.admin.views.main import PAGE_VAR │ │ │ │ │ │ │ │ │ │ # First check if the user can see this history. │ │ │ │ │ model = self.model │ │ │ │ │ @@ -2444,15 +2444,15 @@ │ │ │ │ │ ], │ │ │ │ │ context, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_formset_kwargs(self, request, obj, inline, prefix): │ │ │ │ │ formset_params = { │ │ │ │ │ "instance": obj, │ │ │ │ │ "prefix": prefix, │ │ │ │ │ "queryset": inline.get_queryset(request), │ │ │ │ │ } │ │ │ │ │ if request.method == "POST": │ │ │ │ │ @@ -2729,24 +2729,24 @@ │ │ │ │ │ # also implies the 'view' permission. │ │ │ │ │ return self._has_any_perms_for_target_model(request, ["view", │ │ │ │ │ "change"]) │ │ │ │ │ return super().has_view_permission(request) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class StackedInline(InlineModelAdmin): │ │ │ │ │ template = "admin/edit_inline/stacked.html" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TabularInline(InlineModelAdmin): │ │ │ │ │ template = "admin/edit_inline/tabular.html" │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/sites.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.admin.sites — Django 4.2.13 documentation │ │ │ │ + django.contrib.admin.sites — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.admin.sites

│ │ │ │ +  

Broncode voor django.contrib.admin.sites

│ │ │ │  import re
│ │ │ │  from functools import update_wrapper
│ │ │ │  from weakref import WeakSet
│ │ │ │  
│ │ │ │  from django.apps import apps
│ │ │ │  from django.conf import settings
│ │ │ │  from django.contrib.admin import ModelAdmin, actions
│ │ │ │ @@ -104,15 +105,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class NotRegistered(Exception):
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AdminSite: │ │ │ │ """ │ │ │ │ An AdminSite object encapsulates an instance of the Django admin application, ready │ │ │ │ to be hooked in to your URLconf. Models are registered with the AdminSite using the │ │ │ │ register() method, and the get_urls() method can then be used to access Django view │ │ │ │ functions that present a full admin interface for the collection of registered │ │ │ │ models. │ │ │ │ @@ -169,15 +170,15 @@ │ │ │ │ ) │ │ │ │ for modeladmin in modeladmins: │ │ │ │ if modeladmin.model._meta.app_config in app_configs: │ │ │ │ errors.extend(modeladmin.check()) │ │ │ │ return errors │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def register(self, model_or_iterable, admin_class=None, **options): │ │ │ │ """ │ │ │ │ Register the given model(s) with the given admin class. │ │ │ │ │ │ │ │ The model(s) should be Model classes, not instances. │ │ │ │ │ │ │ │ If an admin class isn't given, use ModelAdmin (the default admin │ │ │ │ @@ -223,15 +224,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ # Instantiate the admin class to save in the registry │ │ │ │ self._registry[model] = admin_class(model, self)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def unregister(self, model_or_iterable): │ │ │ │ """ │ │ │ │ Unregister the given model(s). │ │ │ │ │ │ │ │ If a model isn't already registered, raise NotRegistered. │ │ │ │ """ │ │ │ │ if isinstance(model_or_iterable, ModelBase): │ │ │ │ @@ -245,26 +246,26 @@ │ │ │ │ def is_registered(self, model): │ │ │ │ """ │ │ │ │ Check if a model class is registered with this `AdminSite`. │ │ │ │ """ │ │ │ │ return model in self._registry │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_action(self, action, name=None): │ │ │ │ """ │ │ │ │ Register an action to be available globally. │ │ │ │ """ │ │ │ │ name = name or action.__name__ │ │ │ │ self._actions[name] = action │ │ │ │ self._global_actions[name] = action
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def disable_action(self, name): │ │ │ │ """ │ │ │ │ Disable a globally-registered action. Raise KeyError for invalid names. │ │ │ │ """ │ │ │ │ del self._actions[name]
│ │ │ │ │ │ │ │ │ │ │ │ @@ -279,15 +280,15 @@ │ │ │ │ def actions(self): │ │ │ │ """ │ │ │ │ Get all the enabled actions as an iterable of (name, func). │ │ │ │ """ │ │ │ │ return self._actions.items() │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def has_permission(self, request): │ │ │ │ """ │ │ │ │ Return True if the given HttpRequest has permission to view │ │ │ │ *at least one* page in the admin site. │ │ │ │ """ │ │ │ │ return request.user.is_active and request.user.is_staff
│ │ │ │ │ │ │ │ @@ -404,15 +405,15 @@ │ │ │ │ return urlpatterns │ │ │ │ │ │ │ │ @property │ │ │ │ def urls(self): │ │ │ │ return self.get_urls(), "admin", self.name │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def each_context(self, request): │ │ │ │ """ │ │ │ │ Return a dictionary of variables to put in the template context for │ │ │ │ *every* page in the admin site. │ │ │ │ │ │ │ │ For sites running on a subpath, use the SCRIPT_NAME value if site_url │ │ │ │ hasn't been customized. │ │ │ │ @@ -618,15 +619,15 @@ │ │ │ │ "has_module_perms": has_module_perms, │ │ │ │ "models": [model_dict], │ │ │ │ } │ │ │ │ │ │ │ │ return app_dict │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_app_list(self, request, app_label=None): │ │ │ │ """ │ │ │ │ Return a sorted list of all the installed apps that have been │ │ │ │ registered in this site. │ │ │ │ """ │ │ │ │ app_dict = self._build_app_dict(request, app_label) │ │ │ │ │ │ │ │ @@ -709,35 +710,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ssiitteess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..ssiitteess ************ │ │ │ │ │ import re │ │ │ │ │ from functools import update_wrapper │ │ │ │ │ from weakref import WeakSet │ │ │ │ │ │ │ │ │ │ from django.apps import apps │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.contrib.admin import ModelAdmin, actions │ │ │ │ │ @@ -36,15 +36,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class NotRegistered(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AdminSite: │ │ │ │ │ """ │ │ │ │ │ An AdminSite object encapsulates an instance of the Django admin │ │ │ │ │ application, ready │ │ │ │ │ to be hooked in to your URLconf. Models are registered with the AdminSite │ │ │ │ │ using the │ │ │ │ │ register() method, and the get_urls() method can then be used to access │ │ │ │ │ @@ -105,15 +105,15 @@ │ │ │ │ │ ) │ │ │ │ │ for modeladmin in modeladmins: │ │ │ │ │ if modeladmin.model._meta.app_config in app_configs: │ │ │ │ │ errors.extend(modeladmin.check()) │ │ │ │ │ return errors │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def register(self, model_or_iterable, admin_class=None, **options): │ │ │ │ │ """ │ │ │ │ │ Register the given model(s) with the given admin class. │ │ │ │ │ │ │ │ │ │ The model(s) should be Model classes, not instances. │ │ │ │ │ │ │ │ │ │ If an admin class isn't given, use ModelAdmin (the default admin │ │ │ │ │ @@ -163,15 +163,15 @@ │ │ │ │ │ │ │ │ │ │ # Instantiate the admin class to save in the registry │ │ │ │ │ self._registry[model] = admin_class(model, self) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def unregister(self, model_or_iterable): │ │ │ │ │ """ │ │ │ │ │ Unregister the given model(s). │ │ │ │ │ │ │ │ │ │ If a model isn't already registered, raise NotRegistered. │ │ │ │ │ """ │ │ │ │ │ if isinstance(model_or_iterable, ModelBase): │ │ │ │ │ @@ -187,27 +187,27 @@ │ │ │ │ │ def is_registered(self, model): │ │ │ │ │ """ │ │ │ │ │ Check if a model class is registered with this `AdminSite`. │ │ │ │ │ """ │ │ │ │ │ return model in self._registry │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_action(self, action, name=None): │ │ │ │ │ """ │ │ │ │ │ Register an action to be available globally. │ │ │ │ │ """ │ │ │ │ │ name = name or action.__name__ │ │ │ │ │ self._actions[name] = action │ │ │ │ │ self._global_actions[name] = action │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def disable_action(self, name): │ │ │ │ │ """ │ │ │ │ │ Disable a globally-registered action. Raise KeyError for invalid names. │ │ │ │ │ """ │ │ │ │ │ del self._actions[name] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -223,15 +223,15 @@ │ │ │ │ │ def actions(self): │ │ │ │ │ """ │ │ │ │ │ Get all the enabled actions as an iterable of (name, func). │ │ │ │ │ """ │ │ │ │ │ return self._actions.items() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def has_permission(self, request): │ │ │ │ │ """ │ │ │ │ │ Return True if the given HttpRequest has permission to view │ │ │ │ │ *at least one* page in the admin site. │ │ │ │ │ """ │ │ │ │ │ return request.user.is_active and request.user.is_staff │ │ │ │ │ │ │ │ │ │ @@ -353,15 +353,15 @@ │ │ │ │ │ return urlpatterns │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def urls(self): │ │ │ │ │ return self.get_urls(), "admin", self.name │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def each_context(self, request): │ │ │ │ │ """ │ │ │ │ │ Return a dictionary of variables to put in the template context for │ │ │ │ │ *every* page in the admin site. │ │ │ │ │ │ │ │ │ │ For sites running on a subpath, use the SCRIPT_NAME value if site_url │ │ │ │ │ hasn't been customized. │ │ │ │ │ @@ -573,15 +573,15 @@ │ │ │ │ │ "has_module_perms": has_module_perms, │ │ │ │ │ "models": [model_dict], │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ return app_dict │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_app_list(self, request, app_label=None): │ │ │ │ │ """ │ │ │ │ │ Return a sorted list of all the installed apps that have been │ │ │ │ │ registered in this site. │ │ │ │ │ """ │ │ │ │ │ app_dict = self._build_app_dict(request, app_label) │ │ │ │ │ │ │ │ │ │ @@ -656,12 +656,12 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # This global object represents the default admin site, for the common case. │ │ │ │ │ # You can provide your own AdminSite using the (Simple)AdminConfig.default_site │ │ │ │ │ # attribute. You can also instantiate AdminSite in your own code to create a │ │ │ │ │ # custom admin site. │ │ │ │ │ site = DefaultAdminSite() │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin/views/decorators.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.admin.views.decorators — Django 4.2.13 documentation │ │ │ │ + django.contrib.admin.views.decorators — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.admin.views.decorators

│ │ │ │ +  

Broncode voor django.contrib.admin.views.decorators

│ │ │ │  from django.contrib.auth import REDIRECT_FIELD_NAME
│ │ │ │  from django.contrib.auth.decorators import user_passes_test
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def staff_member_required( │ │ │ │ view_func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url="admin:login" │ │ │ │ ): │ │ │ │ """ │ │ │ │ Decorator for views that checks that the user is logged in and is a staff │ │ │ │ member, redirecting to the login page if necessary. │ │ │ │ """ │ │ │ │ @@ -101,35 +102,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,17 +1,17 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..vviieewwss..ddeeccoorraattoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn..vviieewwss..ddeeccoorraattoorrss ************ │ │ │ │ │ from django.contrib.auth import REDIRECT_FIELD_NAME │ │ │ │ │ from django.contrib.auth.decorators import user_passes_test │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def staff_member_required( │ │ │ │ │ view_func=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url="admin: │ │ │ │ │ login" │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Decorator for views that checks that the user is logged in and is a staff │ │ │ │ │ member, redirecting to the login page if necessary. │ │ │ │ │ @@ -21,12 +21,12 @@ │ │ │ │ │ login_url=login_url, │ │ │ │ │ redirect_field_name=redirect_field_name, │ │ │ │ │ ) │ │ │ │ │ if view_func: │ │ │ │ │ return actual_decorator(view_func) │ │ │ │ │ return actual_decorator │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/admin.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.admin — Django 4.2.13 documentation │ │ │ │ + django.contrib.admin — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.admin

│ │ │ │ +  

Broncode voor django.contrib.admin

│ │ │ │  from django.contrib.admin.decorators import action, display, register
│ │ │ │  from django.contrib.admin.filters import (
│ │ │ │      AllValuesFieldListFilter,
│ │ │ │      BooleanFieldListFilter,
│ │ │ │      ChoicesFieldListFilter,
│ │ │ │      DateFieldListFilter,
│ │ │ │      EmptyFieldListFilter,
│ │ │ │ @@ -116,15 +117,15 @@
│ │ │ │      "EmptyFieldListFilter",
│ │ │ │      "RelatedOnlyFieldListFilter",
│ │ │ │      "autodiscover",
│ │ │ │  ]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def autodiscover(): │ │ │ │ autodiscover_modules("admin", register_to=site)
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ @@ -132,35 +133,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aaddmmiinn ************ │ │ │ │ │ from django.contrib.admin.decorators import action, display, register │ │ │ │ │ from django.contrib.admin.filters import ( │ │ │ │ │ AllValuesFieldListFilter, │ │ │ │ │ BooleanFieldListFilter, │ │ │ │ │ ChoicesFieldListFilter, │ │ │ │ │ DateFieldListFilter, │ │ │ │ │ EmptyFieldListFilter, │ │ │ │ │ @@ -47,16 +47,16 @@ │ │ │ │ │ "EmptyFieldListFilter", │ │ │ │ │ "RelatedOnlyFieldListFilter", │ │ │ │ │ "autodiscover", │ │ │ │ │ ] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def autodiscover(): │ │ │ │ │ autodiscover_modules("admin", register_to=site) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/context_processors.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.auth.context_processors — Django 4.2.13 documentation │ │ │ │ + django.contrib.auth.context_processors — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.auth.context_processors

│ │ │ │ +  

Broncode voor django.contrib.auth.context_processors

│ │ │ │  # PermWrapper and PermLookupDict proxy the permissions system into objects that
│ │ │ │  # the template system can understand.
│ │ │ │  
│ │ │ │  
│ │ │ │  class PermLookupDict:
│ │ │ │      def __init__(self, user, app_label):
│ │ │ │          self.user, self.app_label = user, app_label
│ │ │ │ @@ -116,15 +117,15 @@
│ │ │ │              # The name refers to module.
│ │ │ │              return bool(self[perm_name])
│ │ │ │          app_label, perm_name = perm_name.split(".", 1)
│ │ │ │          return self[app_label][perm_name]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def auth(request): │ │ │ │ """ │ │ │ │ Return context variables required by apps that use Django's authentication │ │ │ │ system. │ │ │ │ │ │ │ │ If there is no 'user' attribute in the request, use AnonymousUser (from │ │ │ │ django.contrib.auth). │ │ │ │ @@ -149,35 +150,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ccoonntteexxtt__pprroocceessssoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ccoonntteexxtt__pprroocceessssoorrss ************ │ │ │ │ │ # PermWrapper and PermLookupDict proxy the permissions system into objects that │ │ │ │ │ # the template system can understand. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class PermLookupDict: │ │ │ │ │ def __init__(self, user, app_label): │ │ │ │ │ self.user, self.app_label = user, app_label │ │ │ │ │ @@ -47,15 +47,15 @@ │ │ │ │ │ # The name refers to module. │ │ │ │ │ return bool(self[perm_name]) │ │ │ │ │ app_label, perm_name = perm_name.split(".", 1) │ │ │ │ │ return self[app_label][perm_name] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def auth(request): │ │ │ │ │ """ │ │ │ │ │ Return context variables required by apps that use Django's authentication │ │ │ │ │ system. │ │ │ │ │ │ │ │ │ │ If there is no 'user' attribute in the request, use AnonymousUser (from │ │ │ │ │ django.contrib.auth). │ │ │ │ │ @@ -68,12 +68,12 @@ │ │ │ │ │ user = AnonymousUser() │ │ │ │ │ │ │ │ │ │ return { │ │ │ │ │ "user": user, │ │ │ │ │ "perms": PermWrapper(user), │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/decorators.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.auth.decorators — Django 4.2.13 documentation │ │ │ │ + django.contrib.auth.decorators — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.auth.decorators

│ │ │ │ +  

Broncode voor django.contrib.auth.decorators

│ │ │ │  from functools import wraps
│ │ │ │  from urllib.parse import urlparse
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.contrib.auth import REDIRECT_FIELD_NAME
│ │ │ │  from django.core.exceptions import PermissionDenied
│ │ │ │  from django.shortcuts import resolve_url
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def user_passes_test( │ │ │ │ test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME │ │ │ │ ): │ │ │ │ """ │ │ │ │ Decorator for views that checks that the user passes the given test, │ │ │ │ redirecting to the log-in page if necessary. The test should be a callable │ │ │ │ that takes the user object and returns True if the user passes. │ │ │ │ @@ -113,15 +114,15 @@ │ │ │ │ return _wrapper_view │ │ │ │ │ │ │ │ return decorator
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def login_required( │ │ │ │ function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None │ │ │ │ ): │ │ │ │ """ │ │ │ │ Decorator for views that checks that the user is logged in, redirecting │ │ │ │ to the log-in page if necessary. │ │ │ │ """ │ │ │ │ @@ -133,15 +134,15 @@ │ │ │ │ if function: │ │ │ │ return actual_decorator(function) │ │ │ │ return actual_decorator
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def permission_required(perm, login_url=None, raise_exception=False): │ │ │ │ """ │ │ │ │ Decorator for views that checks whether a user has a particular permission │ │ │ │ enabled, redirecting to the log-in page if necessary. │ │ │ │ If the raise_exception parameter is given the PermissionDenied exception │ │ │ │ is raised. │ │ │ │ """ │ │ │ │ @@ -170,35 +171,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ddeeccoorraattoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ddeeccoorraattoorrss ************ │ │ │ │ │ from functools import wraps │ │ │ │ │ from urllib.parse import urlparse │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.contrib.auth import REDIRECT_FIELD_NAME │ │ │ │ │ from django.core.exceptions import PermissionDenied │ │ │ │ │ from django.shortcuts import resolve_url │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def user_passes_test( │ │ │ │ │ test_func, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Decorator for views that checks that the user passes the given test, │ │ │ │ │ redirecting to the log-in page if necessary. The test should be a callable │ │ │ │ │ that takes the user object and returns True if the user passes. │ │ │ │ │ @@ -46,15 +46,15 @@ │ │ │ │ │ │ │ │ │ │ return decorator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def login_required( │ │ │ │ │ function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Decorator for views that checks that the user is logged in, redirecting │ │ │ │ │ to the log-in page if necessary. │ │ │ │ │ """ │ │ │ │ │ @@ -67,15 +67,15 @@ │ │ │ │ │ return actual_decorator(function) │ │ │ │ │ return actual_decorator │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def permission_required(perm, login_url=None, raise_exception=False): │ │ │ │ │ """ │ │ │ │ │ Decorator for views that checks whether a user has a particular permission │ │ │ │ │ enabled, redirecting to the log-in page if necessary. │ │ │ │ │ If the raise_exception parameter is given the PermissionDenied exception │ │ │ │ │ is raised. │ │ │ │ │ """ │ │ │ │ │ @@ -92,12 +92,12 @@ │ │ │ │ │ if raise_exception: │ │ │ │ │ raise PermissionDenied │ │ │ │ │ # As the last resort, show the login form │ │ │ │ │ return False │ │ │ │ │ │ │ │ │ │ return user_passes_test(check_perms, login_url=login_url) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/hashers.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.auth.hashers — Django 4.2.13 documentation │ │ │ │ + django.contrib.auth.hashers — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.auth.hashers

│ │ │ │ +  

Broncode voor django.contrib.auth.hashers

│ │ │ │  import base64
│ │ │ │  import binascii
│ │ │ │  import functools
│ │ │ │  import hashlib
│ │ │ │  import importlib
│ │ │ │  import math
│ │ │ │  import warnings
│ │ │ │ @@ -97,26 +98,26 @@
│ │ │ │  UNUSABLE_PASSWORD_PREFIX = "!"  # This will never be a valid encoded hash
│ │ │ │  UNUSABLE_PASSWORD_SUFFIX_LENGTH = (
│ │ │ │      40  # number of random chars to add after UNUSABLE_PASSWORD_PREFIX
│ │ │ │  )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def is_password_usable(encoded): │ │ │ │ """ │ │ │ │ Return True if this password wasn't generated by │ │ │ │ User.set_unusable_password(), i.e. make_password(None). │ │ │ │ """ │ │ │ │ return encoded is None or not encoded.startswith(UNUSABLE_PASSWORD_PREFIX)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def check_password(password, encoded, setter=None, preferred="default"): │ │ │ │ """ │ │ │ │ Return a boolean of whether the raw password matches the three │ │ │ │ part encoded digest. │ │ │ │ │ │ │ │ If setter is specified, it'll be called when you need to │ │ │ │ regenerate the password. │ │ │ │ @@ -145,15 +146,15 @@ │ │ │ │ if setter and is_correct and must_update: │ │ │ │ setter(password) │ │ │ │ return is_correct
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def make_password(password, salt=None, hasher="default"): │ │ │ │ """ │ │ │ │ Turn a plain-text password into a hash for database storage │ │ │ │ │ │ │ │ Same as encode() but generate a new random salt. If password is None then │ │ │ │ return a concatenation of UNUSABLE_PASSWORD_PREFIX and a random string, │ │ │ │ which disallows logins. Additional random string reduces chances of gaining │ │ │ │ @@ -972,35 +973,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aauutthh..hhaasshheerrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aauutthh..hhaasshheerrss ************ │ │ │ │ │ import base64 │ │ │ │ │ import binascii │ │ │ │ │ import functools │ │ │ │ │ import hashlib │ │ │ │ │ import importlib │ │ │ │ │ import math │ │ │ │ │ import warnings │ │ │ │ │ @@ -29,27 +29,27 @@ │ │ │ │ │ UNUSABLE_PASSWORD_PREFIX = "!" # This will never be a valid encoded hash │ │ │ │ │ UNUSABLE_PASSWORD_SUFFIX_LENGTH = ( │ │ │ │ │ 40 # number of random chars to add after UNUSABLE_PASSWORD_PREFIX │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def is_password_usable(encoded): │ │ │ │ │ """ │ │ │ │ │ Return True if this password wasn't generated by │ │ │ │ │ User.set_unusable_password(), i.e. make_password(None). │ │ │ │ │ """ │ │ │ │ │ return encoded is None or not encoded.startswith(UNUSABLE_PASSWORD_PREFIX) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def check_password(password, encoded, setter=None, preferred="default"): │ │ │ │ │ """ │ │ │ │ │ Return a boolean of whether the raw password matches the three │ │ │ │ │ part encoded digest. │ │ │ │ │ │ │ │ │ │ If setter is specified, it'll be called when you need to │ │ │ │ │ regenerate the password. │ │ │ │ │ @@ -79,15 +79,15 @@ │ │ │ │ │ setter(password) │ │ │ │ │ return is_correct │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def make_password(password, salt=None, hasher="default"): │ │ │ │ │ """ │ │ │ │ │ Turn a plain-text password into a hash for database storage │ │ │ │ │ │ │ │ │ │ Same as encode() but generate a new random salt. If password is None then │ │ │ │ │ return a concatenation of UNUSABLE_PASSWORD_PREFIX and a random string, │ │ │ │ │ which disallows logins. Additional random string reduces chances of gaining │ │ │ │ │ @@ -904,12 +904,12 @@ │ │ │ │ │ _("algorithm"): decoded["algorithm"], │ │ │ │ │ _("salt"): decoded["salt"], │ │ │ │ │ _("hash"): mask_hash(decoded["hash"], show=3), │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ def harden_runtime(self, password, encoded): │ │ │ │ │ pass │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth/password_validation.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.auth.password_validation — Django 4.2.13 documentation │ │ │ │ + django.contrib.auth.password_validation — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.auth.password_validation

│ │ │ │ +  

Broncode voor django.contrib.auth.password_validation

│ │ │ │  import functools
│ │ │ │  import gzip
│ │ │ │  import re
│ │ │ │  from difflib import SequenceMatcher
│ │ │ │  from pathlib import Path
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │ @@ -92,15 +93,15 @@
│ │ │ │  
│ │ │ │  @functools.lru_cache(maxsize=None)
│ │ │ │  def get_default_password_validators():
│ │ │ │      return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_password_validators(validator_config): │ │ │ │ validators = [] │ │ │ │ for validator in validator_config: │ │ │ │ try: │ │ │ │ klass = import_string(validator["NAME"]) │ │ │ │ except ImportError: │ │ │ │ msg = ( │ │ │ │ @@ -111,15 +112,15 @@ │ │ │ │ validators.append(klass(**validator.get("OPTIONS", {}))) │ │ │ │ │ │ │ │ return validators
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_password(password, user=None, password_validators=None): │ │ │ │ """ │ │ │ │ Validate that the password meets all validator requirements. │ │ │ │ │ │ │ │ If the password is valid, return ``None``. │ │ │ │ If the password is invalid, raise ValidationError with all error messages. │ │ │ │ """ │ │ │ │ @@ -133,30 +134,30 @@ │ │ │ │ errors.append(error) │ │ │ │ if errors: │ │ │ │ raise ValidationError(errors)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def password_changed(password, user=None, password_validators=None): │ │ │ │ """ │ │ │ │ Inform all validators that have implemented a password_changed() method │ │ │ │ that the password has been changed. │ │ │ │ """ │ │ │ │ if password_validators is None: │ │ │ │ password_validators = get_default_password_validators() │ │ │ │ for validator in password_validators: │ │ │ │ password_changed = getattr(validator, "password_changed", lambda *a: None) │ │ │ │ password_changed(password, user)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def password_validators_help_texts(password_validators=None): │ │ │ │ """ │ │ │ │ Return a list of all help texts of all configured validators. │ │ │ │ """ │ │ │ │ help_texts = [] │ │ │ │ if password_validators is None: │ │ │ │ password_validators = get_default_password_validators() │ │ │ │ @@ -178,15 +179,15 @@ │ │ │ │ return format_html("<ul>{}</ul>", help_items) if help_items else "" │ │ │ │ │ │ │ │ │ │ │ │ password_validators_help_text_html = lazy(_password_validators_help_text_html, str) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MinimumLengthValidator: │ │ │ │ """ │ │ │ │ Validate that the password is of a minimum length. │ │ │ │ """ │ │ │ │ │ │ │ │ def __init__(self, min_length=8): │ │ │ │ self.min_length = min_length │ │ │ │ @@ -241,15 +242,15 @@ │ │ │ │ pwd_len = len(password) │ │ │ │ length_bound_similarity = max_similarity / 2 * pwd_len │ │ │ │ value_len = len(value) │ │ │ │ return pwd_len >= 10 * value_len and value_len < length_bound_similarity │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class UserAttributeSimilarityValidator: │ │ │ │ """ │ │ │ │ Validate that the password is sufficiently different from the user's │ │ │ │ attributes. │ │ │ │ │ │ │ │ If no specific attributes are provided, look at a sensible list of │ │ │ │ defaults. Attributes that don't exist are ignored. Comparison is made to │ │ │ │ @@ -302,15 +303,15 @@ │ │ │ │ return _( │ │ │ │ "Your password can’t be too similar to your other personal information." │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CommonPasswordValidator: │ │ │ │ """ │ │ │ │ Validate that the password is not a common password. │ │ │ │ │ │ │ │ The password is rejected if it occurs in a provided list of passwords, │ │ │ │ which may be gzipped. The list Django ships with contains 20000 common │ │ │ │ passwords (lowercased and deduplicated), created by Royce Williams: │ │ │ │ @@ -341,15 +342,15 @@ │ │ │ │ │ │ │ │ def get_help_text(self): │ │ │ │ return _("Your password can’t be a commonly used password.")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class NumericPasswordValidator: │ │ │ │ """ │ │ │ │ Validate that the password is not entirely numeric. │ │ │ │ """ │ │ │ │ │ │ │ │ def validate(self, password, user=None): │ │ │ │ if password.isdigit(): │ │ │ │ @@ -369,35 +370,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ppaasssswwoorrdd__vvaalliiddaattiioonn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aauutthh..ppaasssswwoorrdd__vvaalliiddaattiioonn ************ │ │ │ │ │ import functools │ │ │ │ │ import gzip │ │ │ │ │ import re │ │ │ │ │ from difflib import SequenceMatcher │ │ │ │ │ from pathlib import Path │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ @@ -23,15 +23,15 @@ │ │ │ │ │ │ │ │ │ │ @functools.lru_cache(maxsize=None) │ │ │ │ │ def get_default_password_validators(): │ │ │ │ │ return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_password_validators(validator_config): │ │ │ │ │ validators = [] │ │ │ │ │ for validator in validator_config: │ │ │ │ │ try: │ │ │ │ │ klass = import_string(validator["NAME"]) │ │ │ │ │ except ImportError: │ │ │ │ │ msg = ( │ │ │ │ │ @@ -43,15 +43,15 @@ │ │ │ │ │ │ │ │ │ │ return validators │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_password(password, user=None, password_validators=None): │ │ │ │ │ """ │ │ │ │ │ Validate that the password meets all validator requirements. │ │ │ │ │ │ │ │ │ │ If the password is valid, return ``None``. │ │ │ │ │ If the password is invalid, raise ValidationError with all error messages. │ │ │ │ │ """ │ │ │ │ │ @@ -66,15 +66,15 @@ │ │ │ │ │ if errors: │ │ │ │ │ raise ValidationError(errors) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def password_changed(password, user=None, password_validators=None): │ │ │ │ │ """ │ │ │ │ │ Inform all validators that have implemented a password_changed() method │ │ │ │ │ that the password has been changed. │ │ │ │ │ """ │ │ │ │ │ if password_validators is None: │ │ │ │ │ password_validators = get_default_password_validators() │ │ │ │ │ @@ -83,15 +83,15 @@ │ │ │ │ │ None) │ │ │ │ │ password_changed(password, user) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def password_validators_help_texts(password_validators=None): │ │ │ │ │ """ │ │ │ │ │ Return a list of all help texts of all configured validators. │ │ │ │ │ """ │ │ │ │ │ help_texts = [] │ │ │ │ │ if password_validators is None: │ │ │ │ │ password_validators = get_default_password_validators() │ │ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ password_validators_help_text_html = lazy(_password_validators_help_text_html, │ │ │ │ │ str) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MinimumLengthValidator: │ │ │ │ │ """ │ │ │ │ │ Validate that the password is of a minimum length. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def __init__(self, min_length=8): │ │ │ │ │ self.min_length = min_length │ │ │ │ │ @@ -179,15 +179,15 @@ │ │ │ │ │ pwd_len = len(password) │ │ │ │ │ length_bound_similarity = max_similarity / 2 * pwd_len │ │ │ │ │ value_len = len(value) │ │ │ │ │ return pwd_len >= 10 * value_len and value_len < length_bound_similarity │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class UserAttributeSimilarityValidator: │ │ │ │ │ """ │ │ │ │ │ Validate that the password is sufficiently different from the user's │ │ │ │ │ attributes. │ │ │ │ │ │ │ │ │ │ If no specific attributes are provided, look at a sensible list of │ │ │ │ │ defaults. Attributes that don't exist are ignored. Comparison is made to │ │ │ │ │ @@ -244,15 +244,15 @@ │ │ │ │ │ information." │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CommonPasswordValidator: │ │ │ │ │ """ │ │ │ │ │ Validate that the password is not a common password. │ │ │ │ │ │ │ │ │ │ The password is rejected if it occurs in a provided list of passwords, │ │ │ │ │ which may be gzipped. The list Django ships with contains 20000 common │ │ │ │ │ passwords (lowercased and deduplicated), created by Royce Williams: │ │ │ │ │ @@ -285,15 +285,15 @@ │ │ │ │ │ def get_help_text(self): │ │ │ │ │ return _("Your password can’t be a commonly used password.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class NumericPasswordValidator: │ │ │ │ │ """ │ │ │ │ │ Validate that the password is not entirely numeric. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def validate(self, password, user=None): │ │ │ │ │ if password.isdigit(): │ │ │ │ │ @@ -301,12 +301,12 @@ │ │ │ │ │ _("This password is entirely numeric."), │ │ │ │ │ code="password_entirely_numeric", │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ def get_help_text(self): │ │ │ │ │ return _("Your password can’t be entirely numeric.") │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/auth.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.auth — Django 4.2.13 documentation │ │ │ │ + django.contrib.auth — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.auth

│ │ │ │ +  

Broncode voor django.contrib.auth

│ │ │ │  import inspect
│ │ │ │  import re
│ │ │ │  
│ │ │ │  from django.apps import apps as django_apps
│ │ │ │  from django.conf import settings
│ │ │ │  from django.core.exceptions import ImproperlyConfigured, PermissionDenied
│ │ │ │  from django.middleware.csrf import rotate_token
│ │ │ │ @@ -130,15 +131,15 @@
│ │ │ │  def _get_user_session_key(request):
│ │ │ │      # This value in the session is always serialized to a string, so we need
│ │ │ │      # to convert it back to Python whenever we access it.
│ │ │ │      return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @sensitive_variables("credentials") │ │ │ │ def authenticate(request=None, **credentials): │ │ │ │ """ │ │ │ │ If the given credentials are valid, return a User object. │ │ │ │ """ │ │ │ │ for backend, backend_path in _get_backends(return_tuples=True): │ │ │ │ backend_signature = inspect.signature(backend.authenticate) │ │ │ │ @@ -164,15 +165,15 @@ │ │ │ │ user_login_failed.send( │ │ │ │ sender=__name__, credentials=_clean_credentials(credentials), request=request │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def login(request, user, backend=None): │ │ │ │ """ │ │ │ │ Persist a user id and a backend in the request. This way a user doesn't │ │ │ │ have to reauthenticate on every request. Note that data set during │ │ │ │ the anonymous session is retained when the user logs in. │ │ │ │ """ │ │ │ │ session_auth_hash = "" │ │ │ │ @@ -220,15 +221,15 @@ │ │ │ │ request.user = user │ │ │ │ rotate_token(request) │ │ │ │ user_logged_in.send(sender=user.__class__, request=request, user=user)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def logout(request): │ │ │ │ """ │ │ │ │ Remove the authenticated user's ID from the request and flush their session │ │ │ │ data. │ │ │ │ """ │ │ │ │ # Dispatch the signal before the user is logged out so the receivers have a │ │ │ │ # chance to find out *who* logged out. │ │ │ │ @@ -241,15 +242,15 @@ │ │ │ │ from django.contrib.auth.models import AnonymousUser │ │ │ │ │ │ │ │ request.user = AnonymousUser()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_user_model(): │ │ │ │ """ │ │ │ │ Return the User model that is active in this project. │ │ │ │ """ │ │ │ │ try: │ │ │ │ return django_apps.get_model(settings.AUTH_USER_MODEL, require_ready=False) │ │ │ │ except ValueError: │ │ │ │ @@ -261,15 +262,15 @@ │ │ │ │ "AUTH_USER_MODEL refers to model '%s' that has not been installed" │ │ │ │ % settings.AUTH_USER_MODEL │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_user(request): │ │ │ │ """ │ │ │ │ Return the user model instance associated with the given request session. │ │ │ │ If no user is retrieved, return an instance of `AnonymousUser`. │ │ │ │ """ │ │ │ │ from .models import AnonymousUser │ │ │ │ │ │ │ │ @@ -315,15 +316,15 @@ │ │ │ │ """ │ │ │ │ Return the codename of the permission for the specified action. │ │ │ │ """ │ │ │ │ return "%s_%s" % (action, opts.model_name) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def update_session_auth_hash(request, user): │ │ │ │ """ │ │ │ │ Updating a user's password logs out all sessions for the user. │ │ │ │ │ │ │ │ Take the current request and the updated user object from which the new │ │ │ │ session hash will be derived and update the session hash appropriately to │ │ │ │ prevent a password change from logging out the session from which the │ │ │ │ @@ -341,35 +342,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..aauutthh ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..aauutthh ************ │ │ │ │ │ import inspect │ │ │ │ │ import re │ │ │ │ │ │ │ │ │ │ from django.apps import apps as django_apps │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.core.exceptions import ImproperlyConfigured, PermissionDenied │ │ │ │ │ from django.middleware.csrf import rotate_token │ │ │ │ │ @@ -62,15 +62,15 @@ │ │ │ │ │ def _get_user_session_key(request): │ │ │ │ │ # This value in the session is always serialized to a string, so we need │ │ │ │ │ # to convert it back to Python whenever we access it. │ │ │ │ │ return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY]) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @sensitive_variables("credentials") │ │ │ │ │ def authenticate(request=None, **credentials): │ │ │ │ │ """ │ │ │ │ │ If the given credentials are valid, return a User object. │ │ │ │ │ """ │ │ │ │ │ for backend, backend_path in _get_backends(return_tuples=True): │ │ │ │ │ backend_signature = inspect.signature(backend.authenticate) │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │ │ │ request=request │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def login(request, user, backend=None): │ │ │ │ │ """ │ │ │ │ │ Persist a user id and a backend in the request. This way a user doesn't │ │ │ │ │ have to reauthenticate on every request. Note that data set during │ │ │ │ │ the anonymous session is retained when the user logs in. │ │ │ │ │ """ │ │ │ │ │ session_auth_hash = "" │ │ │ │ │ @@ -156,15 +156,15 @@ │ │ │ │ │ rotate_token(request) │ │ │ │ │ user_logged_in.send(sender=user.__class__, request=request, user=user) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def logout(request): │ │ │ │ │ """ │ │ │ │ │ Remove the authenticated user's ID from the request and flush their session │ │ │ │ │ data. │ │ │ │ │ """ │ │ │ │ │ # Dispatch the signal before the user is logged out so the receivers have a │ │ │ │ │ # chance to find out *who* logged out. │ │ │ │ │ @@ -178,15 +178,15 @@ │ │ │ │ │ │ │ │ │ │ request.user = AnonymousUser() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_user_model(): │ │ │ │ │ """ │ │ │ │ │ Return the User model that is active in this project. │ │ │ │ │ """ │ │ │ │ │ try: │ │ │ │ │ return django_apps.get_model(settings.AUTH_USER_MODEL, │ │ │ │ │ require_ready=False) │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ % settings.AUTH_USER_MODEL │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_user(request): │ │ │ │ │ """ │ │ │ │ │ Return the user model instance associated with the given request session. │ │ │ │ │ If no user is retrieved, return an instance of `AnonymousUser`. │ │ │ │ │ """ │ │ │ │ │ from .models import AnonymousUser │ │ │ │ │ │ │ │ │ │ @@ -256,26 +256,26 @@ │ │ │ │ │ """ │ │ │ │ │ Return the codename of the permission for the specified action. │ │ │ │ │ """ │ │ │ │ │ return "%s_%s" % (action, opts.model_name) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def update_session_auth_hash(request, user): │ │ │ │ │ """ │ │ │ │ │ Updating a user's password logs out all sessions for the user. │ │ │ │ │ │ │ │ │ │ Take the current request and the updated user object from which the new │ │ │ │ │ session hash will be derived and update the session hash appropriately to │ │ │ │ │ prevent a password change from logging out the session from which the │ │ │ │ │ password was changed. │ │ │ │ │ """ │ │ │ │ │ request.session.cycle_key() │ │ │ │ │ if hasattr(user, "get_session_auth_hash") and request.user == user: │ │ │ │ │ request.session[HASH_SESSION_KEY] = user.get_session_auth_hash() │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/flatpages/sitemaps.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.flatpages.sitemaps — Django 4.2.13 documentation │ │ │ │ + django.contrib.flatpages.sitemaps — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.flatpages.sitemaps

│ │ │ │ +  

Broncode voor django.contrib.flatpages.sitemaps

│ │ │ │  from django.apps import apps as django_apps
│ │ │ │  from django.contrib.sitemaps import Sitemap
│ │ │ │  from django.core.exceptions import ImproperlyConfigured
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FlatPageSitemap(Sitemap): │ │ │ │ def items(self): │ │ │ │ if not django_apps.is_installed("django.contrib.sites"): │ │ │ │ raise ImproperlyConfigured( │ │ │ │ "FlatPageSitemap requires django.contrib.sites, which isn't installed." │ │ │ │ ) │ │ │ │ Site = django_apps.get_model("sites.Site") │ │ │ │ @@ -96,35 +97,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,27 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ffllaattppaaggeess..ssiitteemmaappss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ffllaattppaaggeess..ssiitteemmaappss ************ │ │ │ │ │ from django.apps import apps as django_apps │ │ │ │ │ from django.contrib.sitemaps import Sitemap │ │ │ │ │ from django.core.exceptions import ImproperlyConfigured │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FlatPageSitemap(Sitemap): │ │ │ │ │ def items(self): │ │ │ │ │ if not django_apps.is_installed("django.contrib.sites"): │ │ │ │ │ raise ImproperlyConfigured( │ │ │ │ │ "FlatPageSitemap requires django.contrib.sites, which isn't │ │ │ │ │ installed." │ │ │ │ │ ) │ │ │ │ │ Site = django_apps.get_model("sites.Site") │ │ │ │ │ current_site = Site.objects.get_current() │ │ │ │ │ return current_site.flatpage_set.filter(registration_required=False) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/aggregates.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.db.models.aggregates — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.db.models.aggregates — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.db.models.aggregates

│ │ │ │ +  

Broncode voor django.contrib.gis.db.models.aggregates

│ │ │ │  from django.contrib.gis.db.models.fields import (
│ │ │ │      ExtentField,
│ │ │ │      GeometryCollectionField,
│ │ │ │      GeometryField,
│ │ │ │      LineStringField,
│ │ │ │  )
│ │ │ │  from django.db.models import Aggregate, Value
│ │ │ │ @@ -127,59 +128,59 @@
│ │ │ │                  raise ValueError(
│ │ │ │                      "Geospatial aggregates only allowed on geometry fields."
│ │ │ │                  )
│ │ │ │          return c
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Collect(GeoAggregate): │ │ │ │ name = "Collect" │ │ │ │ output_field_class = GeometryCollectionField
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Extent(GeoAggregate): │ │ │ │ name = "Extent" │ │ │ │ is_extent = "2D" │ │ │ │ │ │ │ │ def __init__(self, expression, **extra): │ │ │ │ super().__init__(expression, output_field=ExtentField(), **extra) │ │ │ │ │ │ │ │ def convert_value(self, value, expression, connection): │ │ │ │ return connection.ops.convert_extent(value)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Extent3D(GeoAggregate): │ │ │ │ name = "Extent3D" │ │ │ │ is_extent = "3D" │ │ │ │ │ │ │ │ def __init__(self, expression, **extra): │ │ │ │ super().__init__(expression, output_field=ExtentField(), **extra) │ │ │ │ │ │ │ │ def convert_value(self, value, expression, connection): │ │ │ │ return connection.ops.convert_extent3d(value)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MakeLine(GeoAggregate): │ │ │ │ name = "MakeLine" │ │ │ │ output_field_class = LineStringField
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Union(GeoAggregate): │ │ │ │ name = "Union" │ │ │ │ output_field_class = GeometryField
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -188,35 +189,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..aaggggrreeggaatteess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..aaggggrreeggaatteess ************ │ │ │ │ │ from django.contrib.gis.db.models.fields import ( │ │ │ │ │ ExtentField, │ │ │ │ │ GeometryCollectionField, │ │ │ │ │ GeometryField, │ │ │ │ │ LineStringField, │ │ │ │ │ ) │ │ │ │ │ from django.db.models import Aggregate, Value │ │ │ │ │ @@ -63,65 +63,65 @@ │ │ │ │ │ raise ValueError( │ │ │ │ │ "Geospatial aggregates only allowed on geometry fields." │ │ │ │ │ ) │ │ │ │ │ return c │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Collect(GeoAggregate): │ │ │ │ │ name = "Collect" │ │ │ │ │ output_field_class = GeometryCollectionField │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Extent(GeoAggregate): │ │ │ │ │ name = "Extent" │ │ │ │ │ is_extent = "2D" │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, **extra): │ │ │ │ │ super().__init__(expression, output_field=ExtentField(), **extra) │ │ │ │ │ │ │ │ │ │ def convert_value(self, value, expression, connection): │ │ │ │ │ return connection.ops.convert_extent(value) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Extent3D(GeoAggregate): │ │ │ │ │ name = "Extent3D" │ │ │ │ │ is_extent = "3D" │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, **extra): │ │ │ │ │ super().__init__(expression, output_field=ExtentField(), **extra) │ │ │ │ │ │ │ │ │ │ def convert_value(self, value, expression, connection): │ │ │ │ │ return connection.ops.convert_extent3d(value) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MakeLine(GeoAggregate): │ │ │ │ │ name = "MakeLine" │ │ │ │ │ output_field_class = LineStringField │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Union(GeoAggregate): │ │ │ │ │ name = "Union" │ │ │ │ │ output_field_class = GeometryField │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/fields.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.db.models.fields — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.db.models.fields — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.db.models.fields

│ │ │ │ +  

Broncode voor django.contrib.gis.db.models.fields

│ │ │ │  from collections import defaultdict, namedtuple
│ │ │ │  
│ │ │ │  from django.contrib.gis import forms, gdal
│ │ │ │  from django.contrib.gis.db.models.proxy import SpatialProxy
│ │ │ │  from django.contrib.gis.gdal.error import GDALException
│ │ │ │  from django.contrib.gis.geos import (
│ │ │ │      GeometryCollection,
│ │ │ │ @@ -294,15 +295,15 @@
│ │ │ │  
│ │ │ │          # Assigning the SRID value.
│ │ │ │          obj.srid = self.get_srid(obj)
│ │ │ │          return obj
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryField(BaseSpatialField): │ │ │ │ """ │ │ │ │ The base Geometry field -- maps to the OpenGIS Specification Geometry type. │ │ │ │ """ │ │ │ │ │ │ │ │ description = _( │ │ │ │ "The base Geometry field — maps to the OpenGIS Specification Geometry type." │ │ │ │ @@ -398,75 +399,75 @@ │ │ │ │ return compiler.connection.ops.select % sql, params │ │ │ │ return sql, params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # The OpenGIS Geometry Type Fields │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PointField(GeometryField): │ │ │ │ geom_type = "POINT" │ │ │ │ geom_class = Point │ │ │ │ form_class = forms.PointField │ │ │ │ description = _("Point")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LineStringField(GeometryField): │ │ │ │ geom_type = "LINESTRING" │ │ │ │ geom_class = LineString │ │ │ │ form_class = forms.LineStringField │ │ │ │ description = _("Line string")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PolygonField(GeometryField): │ │ │ │ geom_type = "POLYGON" │ │ │ │ geom_class = Polygon │ │ │ │ form_class = forms.PolygonField │ │ │ │ description = _("Polygon")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPointField(GeometryField): │ │ │ │ geom_type = "MULTIPOINT" │ │ │ │ geom_class = MultiPoint │ │ │ │ form_class = forms.MultiPointField │ │ │ │ description = _("Multi-point")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiLineStringField(GeometryField): │ │ │ │ geom_type = "MULTILINESTRING" │ │ │ │ geom_class = MultiLineString │ │ │ │ form_class = forms.MultiLineStringField │ │ │ │ description = _("Multi-line string")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPolygonField(GeometryField): │ │ │ │ geom_type = "MULTIPOLYGON" │ │ │ │ geom_class = MultiPolygon │ │ │ │ form_class = forms.MultiPolygonField │ │ │ │ description = _("Multi polygon")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryCollectionField(GeometryField): │ │ │ │ geom_type = "GEOMETRYCOLLECTION" │ │ │ │ geom_class = GeometryCollection │ │ │ │ form_class = forms.GeometryCollectionField │ │ │ │ description = _("Geometry collection")
│ │ │ │ │ │ │ │ │ │ │ │ @@ -481,15 +482,15 @@ │ │ │ │ │ │ │ │ def select_format(self, compiler, sql, params): │ │ │ │ select = compiler.connection.ops.select_extent │ │ │ │ return select % sql if select else sql, params │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RasterField(BaseSpatialField): │ │ │ │ """ │ │ │ │ Raster field for GeoDjango -- evaluates into GDALRaster objects. │ │ │ │ """ │ │ │ │ │ │ │ │ description = _("Raster Field") │ │ │ │ geom_type = "RASTER" │ │ │ │ @@ -542,35 +543,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..ffiieellddss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..ffiieellddss ************ │ │ │ │ │ from collections import defaultdict, namedtuple │ │ │ │ │ │ │ │ │ │ from django.contrib.gis import forms, gdal │ │ │ │ │ from django.contrib.gis.db.models.proxy import SpatialProxy │ │ │ │ │ from django.contrib.gis.gdal.error import GDALException │ │ │ │ │ from django.contrib.gis.geos import ( │ │ │ │ │ GeometryCollection, │ │ │ │ │ @@ -231,15 +231,15 @@ │ │ │ │ │ │ │ │ │ │ # Assigning the SRID value. │ │ │ │ │ obj.srid = self.get_srid(obj) │ │ │ │ │ return obj │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryField(BaseSpatialField): │ │ │ │ │ """ │ │ │ │ │ The base Geometry field -- maps to the OpenGIS Specification Geometry type. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ description = _( │ │ │ │ │ "The base Geometry field — maps to the OpenGIS Specification Geometry │ │ │ │ │ @@ -338,81 +338,81 @@ │ │ │ │ │ return sql, params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # The OpenGIS Geometry Type Fields │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PointField(GeometryField): │ │ │ │ │ geom_type = "POINT" │ │ │ │ │ geom_class = Point │ │ │ │ │ form_class = forms.PointField │ │ │ │ │ description = _("Point") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LineStringField(GeometryField): │ │ │ │ │ geom_type = "LINESTRING" │ │ │ │ │ geom_class = LineString │ │ │ │ │ form_class = forms.LineStringField │ │ │ │ │ description = _("Line string") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PolygonField(GeometryField): │ │ │ │ │ geom_type = "POLYGON" │ │ │ │ │ geom_class = Polygon │ │ │ │ │ form_class = forms.PolygonField │ │ │ │ │ description = _("Polygon") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPointField(GeometryField): │ │ │ │ │ geom_type = "MULTIPOINT" │ │ │ │ │ geom_class = MultiPoint │ │ │ │ │ form_class = forms.MultiPointField │ │ │ │ │ description = _("Multi-point") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiLineStringField(GeometryField): │ │ │ │ │ geom_type = "MULTILINESTRING" │ │ │ │ │ geom_class = MultiLineString │ │ │ │ │ form_class = forms.MultiLineStringField │ │ │ │ │ description = _("Multi-line string") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPolygonField(GeometryField): │ │ │ │ │ geom_type = "MULTIPOLYGON" │ │ │ │ │ geom_class = MultiPolygon │ │ │ │ │ form_class = forms.MultiPolygonField │ │ │ │ │ description = _("Multi polygon") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryCollectionField(GeometryField): │ │ │ │ │ geom_type = "GEOMETRYCOLLECTION" │ │ │ │ │ geom_class = GeometryCollection │ │ │ │ │ form_class = forms.GeometryCollectionField │ │ │ │ │ description = _("Geometry collection") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │ │ │ │ │ │ │ │ def select_format(self, compiler, sql, params): │ │ │ │ │ select = compiler.connection.ops.select_extent │ │ │ │ │ return select % sql if select else sql, params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RasterField(BaseSpatialField): │ │ │ │ │ """ │ │ │ │ │ Raster field for GeoDjango -- evaluates into GDALRaster objects. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ description = _("Raster Field") │ │ │ │ │ geom_type = "RASTER" │ │ │ │ │ @@ -478,12 +478,12 @@ │ │ │ │ │ (RasterBandTransform,), │ │ │ │ │ {"band_index": band_index}, │ │ │ │ │ ) │ │ │ │ │ except ValueError: │ │ │ │ │ pass │ │ │ │ │ return super().get_transform(name) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/db/models/functions.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.db.models.functions — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.db.models.functions — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.db.models.functions

│ │ │ │ +  

Broncode voor django.contrib.gis.db.models.functions

│ │ │ │  from decimal import Decimal
│ │ │ │  
│ │ │ │  from django.contrib.gis.db.models.fields import BaseSpatialField, GeometryField
│ │ │ │  from django.contrib.gis.db.models.sql import AreaField, DistanceField
│ │ │ │  from django.contrib.gis.geos import GEOSGeometry
│ │ │ │  from django.core.exceptions import FieldError
│ │ │ │  from django.db import NotSupportedError
│ │ │ │ @@ -222,15 +223,15 @@
│ │ │ │          )
│ │ │ │          clone = self.copy()
│ │ │ │          clone.set_source_expressions([*self.get_source_expressions(), tolerance])
│ │ │ │          return clone.as_sql(compiler, connection, **extra_context)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Area(OracleToleranceMixin, GeoFunc): │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ @cached_property │ │ │ │ def output_field(self): │ │ │ │ return AreaField(self.geo_field) │ │ │ │ │ │ │ │ @@ -248,24 +249,24 @@ │ │ │ │ extra_context["template"] = "%(function)s(%(expressions)s, %(spheroid)d)" │ │ │ │ extra_context["spheroid"] = True │ │ │ │ return self.as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Azimuth(GeoFunc): │ │ │ │ output_field = FloatField() │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsGeoJSON(GeoFunc): │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ def __init__(self, expression, bbox=False, crs=False, precision=8, **extra): │ │ │ │ expressions = [expression] │ │ │ │ if precision is not None: │ │ │ │ expressions.append(self._handle_param(precision, "precision", int)) │ │ │ │ @@ -285,15 +286,15 @@ │ │ │ │ clone = self.copy() │ │ │ │ clone.set_source_expressions(source_expressions[:1]) │ │ │ │ return super(AsGeoJSON, clone).as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsGML(GeoFunc): │ │ │ │ geom_param_pos = (1,) │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ def __init__(self, expression, version=2, precision=8, **extra): │ │ │ │ expressions = [version, expression] │ │ │ │ if precision is not None: │ │ │ │ @@ -311,28 +312,28 @@ │ │ │ │ else "SDO_UTIL.TO_GMLGEOMETRY" │ │ │ │ ) │ │ │ │ return super(AsGML, clone).as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsKML(GeoFunc): │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ def __init__(self, expression, precision=8, **extra): │ │ │ │ expressions = [expression] │ │ │ │ if precision is not None: │ │ │ │ expressions.append(self._handle_param(precision, "precision", int)) │ │ │ │ super().__init__(*expressions, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsSVG(GeoFunc): │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ def __init__(self, expression, relative=False, precision=8, **extra): │ │ │ │ relative = ( │ │ │ │ relative if hasattr(relative, "resolve_expression") else int(relative) │ │ │ │ ) │ │ │ │ @@ -342,53 +343,53 @@ │ │ │ │ self._handle_param(precision, "precision", int), │ │ │ │ ] │ │ │ │ super().__init__(*expressions, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsWKB(GeoFunc): │ │ │ │ output_field = BinaryField() │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AsWKT(GeoFunc): │ │ │ │ output_field = TextField() │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BoundingCircle(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ def __init__(self, expression, num_seg=48, **extra): │ │ │ │ super().__init__(expression, num_seg, **extra) │ │ │ │ │ │ │ │ def as_oracle(self, compiler, connection, **extra_context): │ │ │ │ clone = self.copy() │ │ │ │ clone.set_source_expressions([self.get_source_expressions()[0]]) │ │ │ │ return super(BoundingCircle, clone).as_oracle( │ │ │ │ compiler, connection, **extra_context │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Centroid(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Difference(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class DistanceResultMixin: │ │ │ │ @@ -397,15 +398,15 @@ │ │ │ │ return DistanceField(self.geo_field) │ │ │ │ │ │ │ │ def source_is_geography(self): │ │ │ │ return self.geo_field.geography and self.geo_field.srid == 4326 │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Distance(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ spheroid = None │ │ │ │ │ │ │ │ def __init__(self, expr1, expr2, spheroid=None, **extra): │ │ │ │ expressions = [expr1, expr2] │ │ │ │ if spheroid is not None: │ │ │ │ @@ -451,47 +452,47 @@ │ │ │ │ ] = "COALESCE(%(function)s(%(expressions)s, %(spheroid)s), 0)" │ │ │ │ extra_context["spheroid"] = int(bool(self.spheroid)) │ │ │ │ return super().as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Envelope(GeomOutputGeoFunc): │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ForcePolygonCW(GeomOutputGeoFunc): │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FromWKB(GeoFunc): │ │ │ │ output_field = GeometryField(srid=0) │ │ │ │ arity = 1 │ │ │ │ geom_param_pos = ()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FromWKT(GeoFunc): │ │ │ │ output_field = GeometryField(srid=0) │ │ │ │ arity = 1 │ │ │ │ geom_param_pos = ()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeoHash(GeoFunc): │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ def __init__(self, expression, precision=None, **extra): │ │ │ │ expressions = [expression] │ │ │ │ if precision is not None: │ │ │ │ expressions.append(self._handle_param(precision, "precision", int)) │ │ │ │ @@ -503,56 +504,56 @@ │ │ │ │ if len(clone.source_expressions) < 2: │ │ │ │ clone.source_expressions.append(Value(100)) │ │ │ │ return clone.as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryDistance(GeoFunc): │ │ │ │ output_field = FloatField() │ │ │ │ arity = 2 │ │ │ │ function = "" │ │ │ │ arg_joiner = " <-> " │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Intersection(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @BaseSpatialField.register_lookup │ │ │ │ class IsEmpty(GeoFuncMixin, Transform): │ │ │ │ lookup_name = "isempty" │ │ │ │ output_field = BooleanField()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @BaseSpatialField.register_lookup │ │ │ │ class IsValid(OracleToleranceMixin, GeoFuncMixin, Transform): │ │ │ │ lookup_name = "isvalid" │ │ │ │ output_field = BooleanField() │ │ │ │ │ │ │ │ def as_oracle(self, compiler, connection, **extra_context): │ │ │ │ sql, params = super().as_oracle(compiler, connection, **extra_context) │ │ │ │ return "CASE %s WHEN 'TRUE' THEN 1 ELSE 0 END" % sql, params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Length(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ def __init__(self, expr1, spheroid=True, **extra): │ │ │ │ self.spheroid = spheroid │ │ │ │ super().__init__(expr1, **extra) │ │ │ │ │ │ │ │ def as_sql(self, compiler, connection, **extra_context): │ │ │ │ if ( │ │ │ │ @@ -586,55 +587,55 @@ │ │ │ │ if self.geo_field.geodetic(connection): │ │ │ │ function = "GeodesicLength" if self.spheroid else "GreatCircleLength" │ │ │ │ return super().as_sql(compiler, connection, function=function, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LineLocatePoint(GeoFunc): │ │ │ │ output_field = FloatField() │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MakeValid(GeomOutputGeoFunc): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MemSize(GeoFunc): │ │ │ │ output_field = IntegerField() │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class NumGeometries(GeoFunc): │ │ │ │ output_field = IntegerField() │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class NumPoints(GeoFunc): │ │ │ │ output_field = IntegerField() │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Perimeter(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ def as_postgresql(self, compiler, connection, **extra_context): │ │ │ │ function = None │ │ │ │ if self.geo_field.geodetic(connection) and not self.source_is_geography(): │ │ │ │ raise NotSupportedError( │ │ │ │ @@ -649,44 +650,44 @@ │ │ │ │ if self.geo_field.geodetic(connection): │ │ │ │ raise NotSupportedError("Perimeter cannot use a non-projected field.") │ │ │ │ return super().as_sql(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PointOnSurface(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Reverse(GeoFunc): │ │ │ │ arity = 1
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Scale(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc): │ │ │ │ def __init__(self, expression, x, y, z=0.0, **extra): │ │ │ │ expressions = [ │ │ │ │ expression, │ │ │ │ self._handle_param(x, "x", NUMERIC_TYPES), │ │ │ │ self._handle_param(y, "y", NUMERIC_TYPES), │ │ │ │ ] │ │ │ │ if z != 0.0: │ │ │ │ expressions.append(self._handle_param(z, "z", NUMERIC_TYPES)) │ │ │ │ super().__init__(*expressions, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SnapToGrid(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc): │ │ │ │ def __init__(self, expression, *args, **extra): │ │ │ │ nargs = len(args) │ │ │ │ expressions = [expression] │ │ │ │ if nargs in (1, 2): │ │ │ │ expressions.extend( │ │ │ │ [self._handle_param(arg, "", NUMERIC_TYPES) for arg in args] │ │ │ │ @@ -700,49 +701,49 @@ │ │ │ │ else: │ │ │ │ raise ValueError("Must provide 1, 2, or 4 arguments to `SnapToGrid`.") │ │ │ │ super().__init__(*expressions, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SymDifference(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Transform(GeomOutputGeoFunc): │ │ │ │ def __init__(self, expression, srid, **extra): │ │ │ │ expressions = [ │ │ │ │ expression, │ │ │ │ self._handle_param(srid, "srid", int), │ │ │ │ ] │ │ │ │ if "output_field" not in extra: │ │ │ │ extra["output_field"] = GeometryField(srid=srid) │ │ │ │ super().__init__(*expressions, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Translate(Scale): │ │ │ │ def as_sqlite(self, compiler, connection, **extra_context): │ │ │ │ clone = self.copy() │ │ │ │ if len(self.source_expressions) < 4: │ │ │ │ # Always provide the z parameter for ST_Translate │ │ │ │ clone.source_expressions.append(Value(0)) │ │ │ │ return super(Translate, clone).as_sqlite(compiler, connection, **extra_context)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Union(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ arity = 2 │ │ │ │ geom_param_pos = (0, 1)
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -751,35 +752,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..ffuunnccttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ddbb..mmooddeellss..ffuunnccttiioonnss ************ │ │ │ │ │ from decimal import Decimal │ │ │ │ │ │ │ │ │ │ from django.contrib.gis.db.models.fields import BaseSpatialField, GeometryField │ │ │ │ │ from django.contrib.gis.db.models.sql import AreaField, DistanceField │ │ │ │ │ from django.contrib.gis.geos import GEOSGeometry │ │ │ │ │ from django.core.exceptions import FieldError │ │ │ │ │ from django.db import NotSupportedError │ │ │ │ │ @@ -157,15 +157,15 @@ │ │ │ │ │ clone = self.copy() │ │ │ │ │ clone.set_source_expressions([*self.get_source_expressions(), │ │ │ │ │ tolerance]) │ │ │ │ │ return clone.as_sql(compiler, connection, **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Area(OracleToleranceMixin, GeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ @cached_property │ │ │ │ │ def output_field(self): │ │ │ │ │ return AreaField(self.geo_field) │ │ │ │ │ │ │ │ │ │ @@ -186,25 +186,25 @@ │ │ │ │ │ extra_context["spheroid"] = True │ │ │ │ │ return self.as_sql(compiler, connection, **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Azimuth(GeoFunc): │ │ │ │ │ output_field = FloatField() │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsGeoJSON(GeoFunc): │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, bbox=False, crs=False, precision=8, │ │ │ │ │ **extra): │ │ │ │ │ expressions = [expression] │ │ │ │ │ if precision is not None: │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │ │ return super(AsGeoJSON, clone).as_sql(compiler, connection, │ │ │ │ │ **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsGML(GeoFunc): │ │ │ │ │ geom_param_pos = (1,) │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, version=2, precision=8, **extra): │ │ │ │ │ expressions = [version, expression] │ │ │ │ │ if precision is not None: │ │ │ │ │ @@ -255,29 +255,29 @@ │ │ │ │ │ return super(AsGML, clone).as_sql(compiler, connection, │ │ │ │ │ **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsKML(GeoFunc): │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, precision=8, **extra): │ │ │ │ │ expressions = [expression] │ │ │ │ │ if precision is not None: │ │ │ │ │ expressions.append(self._handle_param(precision, "precision", int)) │ │ │ │ │ super().__init__(*expressions, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsSVG(GeoFunc): │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, relative=False, precision=8, **extra): │ │ │ │ │ relative = ( │ │ │ │ │ relative if hasattr(relative, "resolve_expression") else int │ │ │ │ │ (relative) │ │ │ │ │ @@ -289,33 +289,33 @@ │ │ │ │ │ ] │ │ │ │ │ super().__init__(*expressions, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsWKB(GeoFunc): │ │ │ │ │ output_field = BinaryField() │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AsWKT(GeoFunc): │ │ │ │ │ output_field = TextField() │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BoundingCircle(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ def __init__(self, expression, num_seg=48, **extra): │ │ │ │ │ super().__init__(expression, num_seg, **extra) │ │ │ │ │ │ │ │ │ │ def as_oracle(self, compiler, connection, **extra_context): │ │ │ │ │ clone = self.copy() │ │ │ │ │ clone.set_source_expressions([self.get_source_expressions()[0]]) │ │ │ │ │ @@ -323,23 +323,23 @@ │ │ │ │ │ compiler, connection, **extra_context │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Centroid(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Difference(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -349,15 +349,15 @@ │ │ │ │ │ return DistanceField(self.geo_field) │ │ │ │ │ │ │ │ │ │ def source_is_geography(self): │ │ │ │ │ return self.geo_field.geography and self.geo_field.srid == 4326 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Distance(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ spheroid = None │ │ │ │ │ │ │ │ │ │ def __init__(self, expr1, expr2, spheroid=None, **extra): │ │ │ │ │ expressions = [expr1, expr2] │ │ │ │ │ if spheroid is not None: │ │ │ │ │ @@ -407,51 +407,51 @@ │ │ │ │ │ extra_context["spheroid"] = int(bool(self.spheroid)) │ │ │ │ │ return super().as_sql(compiler, connection, **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Envelope(GeomOutputGeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ForcePolygonCW(GeomOutputGeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FromWKB(GeoFunc): │ │ │ │ │ output_field = GeometryField(srid=0) │ │ │ │ │ arity = 1 │ │ │ │ │ geom_param_pos = () │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FromWKT(GeoFunc): │ │ │ │ │ output_field = GeometryField(srid=0) │ │ │ │ │ arity = 1 │ │ │ │ │ geom_param_pos = () │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeoHash(GeoFunc): │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, precision=None, **extra): │ │ │ │ │ expressions = [expression] │ │ │ │ │ if precision is not None: │ │ │ │ │ expressions.append(self._handle_param(precision, "precision", int)) │ │ │ │ │ @@ -464,60 +464,60 @@ │ │ │ │ │ clone.source_expressions.append(Value(100)) │ │ │ │ │ return clone.as_sql(compiler, connection, **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryDistance(GeoFunc): │ │ │ │ │ output_field = FloatField() │ │ │ │ │ arity = 2 │ │ │ │ │ function = "" │ │ │ │ │ arg_joiner = " <-> " │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Intersection(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @BaseSpatialField.register_lookup │ │ │ │ │ class IsEmpty(GeoFuncMixin, Transform): │ │ │ │ │ lookup_name = "isempty" │ │ │ │ │ output_field = BooleanField() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @BaseSpatialField.register_lookup │ │ │ │ │ class IsValid(OracleToleranceMixin, GeoFuncMixin, Transform): │ │ │ │ │ lookup_name = "isvalid" │ │ │ │ │ output_field = BooleanField() │ │ │ │ │ │ │ │ │ │ def as_oracle(self, compiler, connection, **extra_context): │ │ │ │ │ sql, params = super().as_oracle(compiler, connection, **extra_context) │ │ │ │ │ return "CASE %s WHEN 'TRUE' THEN 1 ELSE 0 END" % sql, params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Length(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ │ def __init__(self, expr1, spheroid=True, **extra): │ │ │ │ │ self.spheroid = spheroid │ │ │ │ │ super().__init__(expr1, **extra) │ │ │ │ │ │ │ │ │ │ def as_sql(self, compiler, connection, **extra_context): │ │ │ │ │ if ( │ │ │ │ │ @@ -556,60 +556,60 @@ │ │ │ │ │ return super().as_sql(compiler, connection, function=function, │ │ │ │ │ **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LineLocatePoint(GeoFunc): │ │ │ │ │ output_field = FloatField() │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MakeValid(GeomOutputGeoFunc): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MemSize(GeoFunc): │ │ │ │ │ output_field = IntegerField() │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class NumGeometries(GeoFunc): │ │ │ │ │ output_field = IntegerField() │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class NumPoints(GeoFunc): │ │ │ │ │ output_field = IntegerField() │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Perimeter(DistanceResultMixin, OracleToleranceMixin, GeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ def as_postgresql(self, compiler, connection, **extra_context): │ │ │ │ │ function = None │ │ │ │ │ if self.geo_field.geodetic(connection) and not self.source_is_geography │ │ │ │ │ (): │ │ │ │ │ @@ -628,31 +628,31 @@ │ │ │ │ │ field.") │ │ │ │ │ return super().as_sql(compiler, connection, **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PointOnSurface(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Reverse(GeoFunc): │ │ │ │ │ arity = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Scale(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc): │ │ │ │ │ def __init__(self, expression, x, y, z=0.0, **extra): │ │ │ │ │ expressions = [ │ │ │ │ │ expression, │ │ │ │ │ self._handle_param(x, "x", NUMERIC_TYPES), │ │ │ │ │ self._handle_param(y, "y", NUMERIC_TYPES), │ │ │ │ │ ] │ │ │ │ │ @@ -660,15 +660,15 @@ │ │ │ │ │ expressions.append(self._handle_param(z, "z", NUMERIC_TYPES)) │ │ │ │ │ super().__init__(*expressions, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SnapToGrid(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc): │ │ │ │ │ def __init__(self, expression, *args, **extra): │ │ │ │ │ nargs = len(args) │ │ │ │ │ expressions = [expression] │ │ │ │ │ if nargs in (1, 2): │ │ │ │ │ expressions.extend( │ │ │ │ │ [self._handle_param(arg, "", NUMERIC_TYPES) for arg in args] │ │ │ │ │ @@ -686,55 +686,55 @@ │ │ │ │ │ `SnapToGrid`.") │ │ │ │ │ super().__init__(*expressions, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SymDifference(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Transform(GeomOutputGeoFunc): │ │ │ │ │ def __init__(self, expression, srid, **extra): │ │ │ │ │ expressions = [ │ │ │ │ │ expression, │ │ │ │ │ self._handle_param(srid, "srid", int), │ │ │ │ │ ] │ │ │ │ │ if "output_field" not in extra: │ │ │ │ │ extra["output_field"] = GeometryField(srid=srid) │ │ │ │ │ super().__init__(*expressions, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Translate(Scale): │ │ │ │ │ def as_sqlite(self, compiler, connection, **extra_context): │ │ │ │ │ clone = self.copy() │ │ │ │ │ if len(self.source_expressions) < 4: │ │ │ │ │ # Always provide the z parameter for ST_Translate │ │ │ │ │ clone.source_expressions.append(Value(0)) │ │ │ │ │ return super(Translate, clone).as_sqlite(compiler, connection, │ │ │ │ │ **extra_context) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Union(OracleToleranceMixin, GeomOutputGeoFunc): │ │ │ │ │ arity = 2 │ │ │ │ │ geom_param_pos = (0, 1) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/feeds.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.feeds — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.feeds — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.feeds

│ │ │ │ +  

Broncode voor django.contrib.gis.feeds

│ │ │ │  from django.contrib.syndication.views import Feed as BaseFeed
│ │ │ │  from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
│ │ │ │  
│ │ │ │  
│ │ │ │  class GeoFeedMixin:
│ │ │ │      """
│ │ │ │      This mixin provides the necessary routines for SyndicationFeed subclasses
│ │ │ │ @@ -158,15 +159,15 @@
│ │ │ │                          raise ValueError(
│ │ │ │                              'Geometry type "%s" not supported.' % geom.geom_type
│ │ │ │                          )
│ │ │ │  
│ │ │ │  
│ │ │ │  # ### SyndicationFeed subclasses ###
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeoRSSFeed(Rss201rev2Feed, GeoFeedMixin): │ │ │ │ def rss_attributes(self): │ │ │ │ attrs = super().rss_attributes() │ │ │ │ attrs["xmlns:georss"] = "http://www.georss.org/georss" │ │ │ │ return attrs │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ @@ -176,15 +177,15 @@ │ │ │ │ def add_root_elements(self, handler): │ │ │ │ super().add_root_elements(handler) │ │ │ │ self.add_georss_element(handler, self.feed)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeoAtom1Feed(Atom1Feed, GeoFeedMixin): │ │ │ │ def root_attributes(self): │ │ │ │ attrs = super().root_attributes() │ │ │ │ attrs["xmlns:georss"] = "http://www.georss.org/georss" │ │ │ │ return attrs │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ @@ -194,15 +195,15 @@ │ │ │ │ def add_root_elements(self, handler): │ │ │ │ super().add_root_elements(handler) │ │ │ │ self.add_georss_element(handler, self.feed)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class W3CGeoFeed(Rss201rev2Feed, GeoFeedMixin): │ │ │ │ def rss_attributes(self): │ │ │ │ attrs = super().rss_attributes() │ │ │ │ attrs["xmlns:geo"] = "http://www.w3.org/2003/01/geo/wgs84_pos#" │ │ │ │ return attrs │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ @@ -213,15 +214,15 @@ │ │ │ │ super().add_root_elements(handler) │ │ │ │ self.add_georss_element(handler, self.feed, w3c_geo=True)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # ### Feed subclass ### │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Feed(BaseFeed): │ │ │ │ """ │ │ │ │ This is a subclass of the `Feed` from `django.contrib.syndication`. │ │ │ │ This allows users to define a `geometry(obj)` and/or `item_geometry(item)` │ │ │ │ methods on their own subclasses so that geo-referenced information may │ │ │ │ placed in the feed. │ │ │ │ """ │ │ │ │ @@ -242,35 +243,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffeeeeddss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffeeeeddss ************ │ │ │ │ │ from django.contrib.syndication.views import Feed as BaseFeed │ │ │ │ │ from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class GeoFeedMixin: │ │ │ │ │ """ │ │ │ │ │ This mixin provides the necessary routines for SyndicationFeed subclasses │ │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ │ │ 'Geometry type "%s" not supported.' % │ │ │ │ │ geom.geom_type │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # ### SyndicationFeed subclasses ### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeoRSSFeed(Rss201rev2Feed, GeoFeedMixin): │ │ │ │ │ def rss_attributes(self): │ │ │ │ │ attrs = super().rss_attributes() │ │ │ │ │ attrs["xmlns:georss"] = "http://www.georss.org/georss" │ │ │ │ │ return attrs │ │ │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │ │ super().add_root_elements(handler) │ │ │ │ │ self.add_georss_element(handler, self.feed) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeoAtom1Feed(Atom1Feed, GeoFeedMixin): │ │ │ │ │ def root_attributes(self): │ │ │ │ │ attrs = super().root_attributes() │ │ │ │ │ attrs["xmlns:georss"] = "http://www.georss.org/georss" │ │ │ │ │ return attrs │ │ │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │ │ │ super().add_root_elements(handler) │ │ │ │ │ self.add_georss_element(handler, self.feed) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class W3CGeoFeed(Rss201rev2Feed, GeoFeedMixin): │ │ │ │ │ def rss_attributes(self): │ │ │ │ │ attrs = super().rss_attributes() │ │ │ │ │ attrs["xmlns:geo"] = "http://www.w3.org/2003/01/geo/wgs84_pos#" │ │ │ │ │ return attrs │ │ │ │ │ │ │ │ │ │ def add_item_elements(self, handler, item): │ │ │ │ │ @@ -154,15 +154,15 @@ │ │ │ │ │ self.add_georss_element(handler, self.feed, w3c_geo=True) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # ### Feed subclass ### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Feed(BaseFeed): │ │ │ │ │ """ │ │ │ │ │ This is a subclass of the `Feed` from `django.contrib.syndication`. │ │ │ │ │ This allows users to define a `geometry(obj)` and/or `item_geometry(item)` │ │ │ │ │ methods on their own subclasses so that geo-referenced information may │ │ │ │ │ placed in the feed. │ │ │ │ │ """ │ │ │ │ │ @@ -171,12 +171,12 @@ │ │ │ │ │ │ │ │ │ │ def feed_extra_kwargs(self, obj): │ │ │ │ │ return {"geometry": self._get_dynamic_attr("geometry", obj)} │ │ │ │ │ │ │ │ │ │ def item_extra_kwargs(self, item): │ │ │ │ │ return {"geometry": self._get_dynamic_attr("item_geometry", item)} │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/fields.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.forms.fields — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.forms.fields — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.forms.fields

│ │ │ │ +  

Broncode voor django.contrib.gis.forms.fields

│ │ │ │  from django import forms
│ │ │ │  from django.contrib.gis.gdal import GDALException
│ │ │ │  from django.contrib.gis.geos import GEOSException, GEOSGeometry
│ │ │ │  from django.core.exceptions import ValidationError
│ │ │ │  from django.utils.translation import gettext_lazy as _
│ │ │ │  
│ │ │ │  from .widgets import OpenLayersWidget
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryField(forms.Field): │ │ │ │ """ │ │ │ │ This is the basic form field for a Geometry. Any textual input that is │ │ │ │ accepted by GEOSGeometry is accepted by this form. By default, │ │ │ │ this includes WKT, HEXEWKB, WKB (in a buffer), and GeoJSON. │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -189,57 +190,57 @@ │ │ │ │ else: │ │ │ │ # Check for change of state of existence │ │ │ │ return bool(initial) != bool(data)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryCollectionField(GeometryField): │ │ │ │ geom_type = "GEOMETRYCOLLECTION"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PointField(GeometryField): │ │ │ │ geom_type = "POINT"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPointField(GeometryField): │ │ │ │ geom_type = "MULTIPOINT"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LineStringField(GeometryField): │ │ │ │ geom_type = "LINESTRING"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiLineStringField(GeometryField): │ │ │ │ geom_type = "MULTILINESTRING"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PolygonField(GeometryField): │ │ │ │ geom_type = "POLYGON"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPolygonField(GeometryField): │ │ │ │ geom_type = "MULTIPOLYGON"
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ @@ -247,35 +248,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffoorrmmss..ffiieellddss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffoorrmmss..ffiieellddss ************ │ │ │ │ │ from django import forms │ │ │ │ │ from django.contrib.gis.gdal import GDALException │ │ │ │ │ from django.contrib.gis.geos import GEOSException, GEOSGeometry │ │ │ │ │ from django.core.exceptions import ValidationError │ │ │ │ │ from django.utils.translation import gettext_lazy as _ │ │ │ │ │ │ │ │ │ │ from .widgets import OpenLayersWidget │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryField(forms.Field): │ │ │ │ │ """ │ │ │ │ │ This is the basic form field for a Geometry. Any textual input that is │ │ │ │ │ accepted by GEOSGeometry is accepted by this form. By default, │ │ │ │ │ this includes WKT, HEXEWKB, WKB (in a buffer), and GeoJSON. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -123,64 +123,64 @@ │ │ │ │ │ # Check for change of state of existence │ │ │ │ │ return bool(initial) != bool(data) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryCollectionField(GeometryField): │ │ │ │ │ geom_type = "GEOMETRYCOLLECTION" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PointField(GeometryField): │ │ │ │ │ geom_type = "POINT" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPointField(GeometryField): │ │ │ │ │ geom_type = "MULTIPOINT" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LineStringField(GeometryField): │ │ │ │ │ geom_type = "LINESTRING" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiLineStringField(GeometryField): │ │ │ │ │ geom_type = "MULTILINESTRING" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PolygonField(GeometryField): │ │ │ │ │ geom_type = "POLYGON" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPolygonField(GeometryField): │ │ │ │ │ geom_type = "MULTIPOLYGON" │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/forms/widgets.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.forms.widgets — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.forms.widgets — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.forms.widgets

│ │ │ │ +  

Broncode voor django.contrib.gis.forms.widgets

│ │ │ │  import logging
│ │ │ │  import warnings
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.contrib.gis import gdal
│ │ │ │  from django.contrib.gis.geometry import json_regex
│ │ │ │  from django.contrib.gis.geos import GEOSException, GEOSGeometry
│ │ │ │ @@ -82,15 +83,15 @@
│ │ │ │  from django.utils import translation
│ │ │ │  from django.utils.deprecation import RemovedInDjango51Warning
│ │ │ │  
│ │ │ │  logger = logging.getLogger("django.contrib.gis")
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BaseGeometryWidget(Widget): │ │ │ │ """ │ │ │ │ The base class for rich geometry widgets. │ │ │ │ Render a map using the WKT of the geometry. │ │ │ │ """ │ │ │ │ │ │ │ │ geom_type = "GEOMETRY" │ │ │ │ @@ -168,15 +169,15 @@ │ │ │ │ ) │ │ │ │ ) │ │ │ │ return context
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class OpenLayersWidget(BaseGeometryWidget): │ │ │ │ template_name = "gis/openlayers.html" │ │ │ │ map_srid = 3857 │ │ │ │ │ │ │ │ class Media: │ │ │ │ css = { │ │ │ │ "all": ( │ │ │ │ @@ -198,15 +199,15 @@ │ │ │ │ if geom and json_regex.match(value) and self.map_srid != 4326: │ │ │ │ geom.srid = self.map_srid │ │ │ │ return geom
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class OSMWidget(OpenLayersWidget): │ │ │ │ """ │ │ │ │ An OpenLayers/OpenStreetMap-based widget. │ │ │ │ """ │ │ │ │ │ │ │ │ template_name = "gis/openlayers-osm.html" │ │ │ │ default_lon = 5 │ │ │ │ @@ -228,35 +229,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffoorrmmss..wwiiddggeettss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ffoorrmmss..wwiiddggeettss ************ │ │ │ │ │ import logging │ │ │ │ │ import warnings │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.contrib.gis import gdal │ │ │ │ │ from django.contrib.gis.geometry import json_regex │ │ │ │ │ from django.contrib.gis.geos import GEOSException, GEOSGeometry │ │ │ │ │ @@ -13,15 +13,15 @@ │ │ │ │ │ from django.utils import translation │ │ │ │ │ from django.utils.deprecation import RemovedInDjango51Warning │ │ │ │ │ │ │ │ │ │ logger = logging.getLogger("django.contrib.gis") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BaseGeometryWidget(Widget): │ │ │ │ │ """ │ │ │ │ │ The base class for rich geometry widgets. │ │ │ │ │ Render a map using the WKT of the geometry. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ geom_type = "GEOMETRY" │ │ │ │ │ @@ -106,15 +106,15 @@ │ │ │ │ │ ) │ │ │ │ │ return context │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OpenLayersWidget(BaseGeometryWidget): │ │ │ │ │ template_name = "gis/openlayers.html" │ │ │ │ │ map_srid = 3857 │ │ │ │ │ │ │ │ │ │ class Media: │ │ │ │ │ css = { │ │ │ │ │ "all": ( │ │ │ │ │ @@ -137,15 +137,15 @@ │ │ │ │ │ geom.srid = self.map_srid │ │ │ │ │ return geom │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OSMWidget(OpenLayersWidget): │ │ │ │ │ """ │ │ │ │ │ An OpenLayers/OpenStreetMap-based widget. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ template_name = "gis/openlayers-osm.html" │ │ │ │ │ default_lon = 5 │ │ │ │ │ @@ -155,12 +155,12 @@ │ │ │ │ │ def __init__(self, attrs=None): │ │ │ │ │ super().__init__() │ │ │ │ │ for key in ("default_lon", "default_lat", "default_zoom"): │ │ │ │ │ self.attrs[key] = getattr(self, key) │ │ │ │ │ if attrs: │ │ │ │ │ self.attrs.update(attrs) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/datasource.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.datasource — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.datasource — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.datasource

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.datasource

│ │ │ │  """
│ │ │ │   DataSource is a wrapper for the OGR Data Source object, which provides
│ │ │ │   an interface for reading vector geometry data from many different file
│ │ │ │   formats (including ESRI shapefiles).
│ │ │ │  
│ │ │ │   When instantiating a DataSource object, use the filename of a
│ │ │ │   GDAL-supported data source.  For example, a SHP file or a
│ │ │ │ @@ -118,15 +119,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  # For more information, see the OGR C API documentation:
│ │ │ │  #  https://gdal.org/api/vector_c_api.html
│ │ │ │  #
│ │ │ │  # The OGR_DS_* routines are relevant here.
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class DataSource(GDALBase): │ │ │ │ "Wraps an OGR Data Source object." │ │ │ │ destructor = capi.destroy_ds │ │ │ │ │ │ │ │ def __init__(self, ds_input, ds_driver=False, write=False, encoding="utf-8"): │ │ │ │ # The write flag. │ │ │ │ if write: │ │ │ │ @@ -208,35 +209,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ddaattaassoouurrccee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ddaattaassoouurrccee ************ │ │ │ │ │ """ │ │ │ │ │ DataSource is a wrapper for the OGR Data Source object, which provides │ │ │ │ │ an interface for reading vector geometry data from many different file │ │ │ │ │ formats (including ESRI shapefiles). │ │ │ │ │ │ │ │ │ │ When instantiating a DataSource object, use the filename of a │ │ │ │ │ GDAL-supported data source. For example, a SHP file or a │ │ │ │ │ @@ -49,15 +49,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # For more information, see the OGR C API documentation: │ │ │ │ │ # https://gdal.org/api/vector_c_api.html │ │ │ │ │ # │ │ │ │ │ # The OGR_DS_* routines are relevant here. │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class DataSource(GDALBase): │ │ │ │ │ "Wraps an OGR Data Source object." │ │ │ │ │ destructor = capi.destroy_ds │ │ │ │ │ │ │ │ │ │ def __init__(self, ds_input, ds_driver=False, write=False, encoding="utf- │ │ │ │ │ 8"): │ │ │ │ │ # The write flag. │ │ │ │ │ @@ -132,12 +132,12 @@ │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def name(self): │ │ │ │ │ "Return the name of the data source." │ │ │ │ │ name = capi.get_ds_name(self._ptr) │ │ │ │ │ return force_str(name, self.encoding, strings_only=True) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/driver.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.driver — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.driver — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.driver

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.driver

│ │ │ │  from ctypes import c_void_p
│ │ │ │  
│ │ │ │  from django.contrib.gis.gdal.base import GDALBase
│ │ │ │  from django.contrib.gis.gdal.error import GDALException
│ │ │ │  from django.contrib.gis.gdal.prototypes import ds as vcapi
│ │ │ │  from django.contrib.gis.gdal.prototypes import raster as rcapi
│ │ │ │  from django.utils.encoding import force_bytes, force_str
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Driver(GDALBase): │ │ │ │ """ │ │ │ │ Wrap a GDAL/OGR Data Source Driver. │ │ │ │ For more information, see the C API documentation: │ │ │ │ https://gdal.org/api/vector_c_api.html │ │ │ │ https://gdal.org/api/raster_c_api.html │ │ │ │ """ │ │ │ │ @@ -160,15 +161,15 @@ │ │ │ │ # will be registered over and over again) │ │ │ │ if not vcapi.get_driver_count(): │ │ │ │ vcapi.register_all() │ │ │ │ if not rcapi.get_driver_count(): │ │ │ │ rcapi.register_all() │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @classmethod │ │ │ │ def driver_count(cls): │ │ │ │ """ │ │ │ │ Return the number of GDAL/OGR data source drivers registered. │ │ │ │ """ │ │ │ │ return vcapi.get_driver_count() + rcapi.get_driver_count()
│ │ │ │ │ │ │ │ @@ -188,35 +189,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ddrriivveerr ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ddrriivveerr ************ │ │ │ │ │ from ctypes import c_void_p │ │ │ │ │ │ │ │ │ │ from django.contrib.gis.gdal.base import GDALBase │ │ │ │ │ from django.contrib.gis.gdal.error import GDALException │ │ │ │ │ from django.contrib.gis.gdal.prototypes import ds as vcapi │ │ │ │ │ from django.contrib.gis.gdal.prototypes import raster as rcapi │ │ │ │ │ from django.utils.encoding import force_bytes, force_str │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Driver(GDALBase): │ │ │ │ │ """ │ │ │ │ │ Wrap a GDAL/OGR Data Source Driver. │ │ │ │ │ For more information, see the C API documentation: │ │ │ │ │ https://gdal.org/api/vector_c_api.html │ │ │ │ │ https://gdal.org/api/raster_c_api.html │ │ │ │ │ """ │ │ │ │ │ @@ -92,15 +92,15 @@ │ │ │ │ │ # will be registered over and over again) │ │ │ │ │ if not vcapi.get_driver_count(): │ │ │ │ │ vcapi.register_all() │ │ │ │ │ if not rcapi.get_driver_count(): │ │ │ │ │ rcapi.register_all() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @classmethod │ │ │ │ │ def driver_count(cls): │ │ │ │ │ """ │ │ │ │ │ Return the number of GDAL/OGR data source drivers registered. │ │ │ │ │ """ │ │ │ │ │ return vcapi.get_driver_count() + rcapi.get_driver_count() │ │ │ │ │ │ │ │ │ │ @@ -109,12 +109,12 @@ │ │ │ │ │ @property │ │ │ │ │ def name(self): │ │ │ │ │ """ │ │ │ │ │ Return description/name string for this driver. │ │ │ │ │ """ │ │ │ │ │ return force_str(rcapi.get_driver_description(self.ptr)) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/envelope.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.envelope — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.envelope — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.envelope

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.envelope

│ │ │ │  """
│ │ │ │   The GDAL/OGR library uses an Envelope structure to hold the bounding
│ │ │ │   box information for a geometry.  The envelope (bounding box) contains
│ │ │ │   two pairs of coordinates, one for the lower left coordinate and one
│ │ │ │   for the upper right coordinate:
│ │ │ │  
│ │ │ │                             +----------o Upper right; (max_x, max_y)
│ │ │ │ @@ -98,15 +99,15 @@
│ │ │ │          ("MaxX", c_double),
│ │ │ │          ("MinY", c_double),
│ │ │ │          ("MaxY", c_double),
│ │ │ │      ]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Envelope: │ │ │ │ """ │ │ │ │ The Envelope object is a C structure that contains the minimum and │ │ │ │ maximum X, Y coordinates for a rectangle bounding box. The naming │ │ │ │ of the variables is compatible with the OGR Envelope structure. │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -174,15 +175,15 @@ │ │ │ │ self._envelope = OGREnvelope() │ │ │ │ self._envelope.MinX = seq[0] │ │ │ │ self._envelope.MinY = seq[1] │ │ │ │ self._envelope.MaxX = seq[2] │ │ │ │ self._envelope.MaxY = seq[3] │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def expand_to_include(self, *args): │ │ │ │ """ │ │ │ │ Modify the envelope to expand to include the boundaries of │ │ │ │ the passed-in 2-tuple (a point), 4-tuple (an extent) or │ │ │ │ envelope. │ │ │ │ """ │ │ │ │ # We provide a number of different signatures for this method, │ │ │ │ @@ -288,35 +289,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..eennvveellooppee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..eennvveellooppee ************ │ │ │ │ │ """ │ │ │ │ │ The GDAL/OGR library uses an Envelope structure to hold the bounding │ │ │ │ │ box information for a geometry. The envelope (bounding box) contains │ │ │ │ │ two pairs of coordinates, one for the lower left coordinate and one │ │ │ │ │ for the upper right coordinate: │ │ │ │ │ │ │ │ │ │ +----------o Upper right; (max_x, max_y) │ │ │ │ │ @@ -29,15 +29,15 @@ │ │ │ │ │ ("MaxX", c_double), │ │ │ │ │ ("MinY", c_double), │ │ │ │ │ ("MaxY", c_double), │ │ │ │ │ ] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Envelope: │ │ │ │ │ """ │ │ │ │ │ The Envelope object is a C structure that contains the minimum and │ │ │ │ │ maximum X, Y coordinates for a rectangle bounding box. The naming │ │ │ │ │ of the variables is compatible with the OGR Envelope structure. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ self._envelope = OGREnvelope() │ │ │ │ │ self._envelope.MinX = seq[0] │ │ │ │ │ self._envelope.MinY = seq[1] │ │ │ │ │ self._envelope.MaxX = seq[2] │ │ │ │ │ self._envelope.MaxY = seq[3] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def expand_to_include(self, *args): │ │ │ │ │ """ │ │ │ │ │ Modify the envelope to expand to include the boundaries of │ │ │ │ │ the passed-in 2-tuple (a point), 4-tuple (an extent) or │ │ │ │ │ envelope. │ │ │ │ │ """ │ │ │ │ │ # We provide a number of different signatures for this method, │ │ │ │ │ @@ -216,12 +216,12 @@ │ │ │ │ │ self.max_y, │ │ │ │ │ self.max_x, │ │ │ │ │ self.min_y, │ │ │ │ │ self.min_x, │ │ │ │ │ self.min_y, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/error.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.error — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.error — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.error

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.error

│ │ │ │  """
│ │ │ │   This module houses the GDAL & SRS Exception objects, and the
│ │ │ │   check_err() routine which checks the status code returned by
│ │ │ │   GDAL/OGR methods.
│ │ │ │  """
│ │ │ │  
│ │ │ │  
│ │ │ │  # #### GDAL & SRS Exceptions ####
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GDALException(Exception): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SRSException(Exception): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### GDAL/OGR error checking codes and routine #### │ │ │ │ │ │ │ │ @@ -146,35 +147,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,29 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..eerrrroorr ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..eerrrroorr ************ │ │ │ │ │ """ │ │ │ │ │ This module houses the GDAL & SRS Exception objects, and the │ │ │ │ │ check_err() routine which checks the status code returned by │ │ │ │ │ GDAL/OGR methods. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### GDAL & SRS Exceptions #### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GDALException(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SRSException(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### GDAL/OGR error checking codes and routine #### │ │ │ │ │ @@ -67,12 +67,12 @@ │ │ │ │ │ if code == ERR_NONE: │ │ │ │ │ return │ │ │ │ │ elif code in err_dict: │ │ │ │ │ e, msg = err_dict[code] │ │ │ │ │ raise e(msg) │ │ │ │ │ else: │ │ │ │ │ raise GDALException('Unknown error code: "%s"' % code) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geometries.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.geometries — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.geometries — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.geometries

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.geometries

│ │ │ │  """
│ │ │ │   The OGRGeometry is a wrapper for using the OGR Geometry class
│ │ │ │   (see https://gdal.org/api/ogrgeometry_cpp.html#_CPPv411OGRGeometry).
│ │ │ │   OGRGeometry may be instantiated when reading geometries from OGR Data Sources
│ │ │ │   (e.g. SHP files), or when given OGC WKT (a string).
│ │ │ │  
│ │ │ │   While the 'full' API is not present yet, the API is "pythonic" unlike
│ │ │ │ @@ -127,15 +128,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  # For more information, see the OGR C API source code:
│ │ │ │  #  https://gdal.org/api/vector_c_api.html
│ │ │ │  #
│ │ │ │  # The OGR_G_* routines are relevant here.
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class OGRGeometry(GDALBase): │ │ │ │ """Encapsulate an OGR geometry.""" │ │ │ │ │ │ │ │ destructor = capi.destroy_geom │ │ │ │ │ │ │ │ def __init__(self, geom_input, srs=None): │ │ │ │ """Initialize Geometry on either WKT or an OGR pointer as input.""" │ │ │ │ @@ -224,15 +225,15 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ @staticmethod │ │ │ │ def _from_json(geom_input): │ │ │ │ return capi.from_json(geom_input) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @classmethod │ │ │ │ def from_bbox(cls, bbox): │ │ │ │ "Construct a Polygon from a bounding box (4-tuple)." │ │ │ │ x0, y0, x1, y1 = bbox │ │ │ │ return OGRGeometry( │ │ │ │ "POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))" │ │ │ │ % (x0, y0, x0, y1, x1, y1, x1, y0, x0, y0) │ │ │ │ @@ -240,15 +241,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ @staticmethod │ │ │ │ def from_json(geom_input): │ │ │ │ return OGRGeometry(OGRGeometry._from_json(force_bytes(geom_input))) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @classmethod │ │ │ │ def from_gml(cls, gml_string): │ │ │ │ return cls(capi.from_gml(force_bytes(gml_string)))
│ │ │ │ │ │ │ │ │ │ │ │ # ### Geometry set-like operations ### │ │ │ │ # g = g1 | g2 │ │ │ │ @@ -462,34 +463,34 @@ │ │ │ │ if srs and srs.srid: │ │ │ │ return "SRID=%s;%s" % (srs.srid, self.wkt) │ │ │ │ else: │ │ │ │ return self.wkt │ │ │ │ │ │ │ │ # #### Geometry Methods #### │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def clone(self): │ │ │ │ "Clone this OGR Geometry." │ │ │ │ return OGRGeometry(capi.clone_geom(self.ptr), self.srs)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def close_rings(self): │ │ │ │ """ │ │ │ │ If there are any rings within this geometry that have not been │ │ │ │ closed, this routine will do so by adding the starting point at the │ │ │ │ end. │ │ │ │ """ │ │ │ │ # Closing the open rings. │ │ │ │ capi.geom_close_rings(self.ptr)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def transform(self, coord_trans, clone=False): │ │ │ │ """ │ │ │ │ Transform this geometry to a different spatial reference system. │ │ │ │ May take a CoordTransform object, a SpatialReference object, string │ │ │ │ WKT or PROJ, and/or an integer SRID. By default, return nothing │ │ │ │ and transform the geometry in-place. However, if the `clone` keyword is │ │ │ │ set, return a transformed clone of this geometry. │ │ │ │ @@ -525,64 +526,64 @@ │ │ │ │ ) │ │ │ │ │ │ │ │ # Returning the output of the given function with the other geometry's │ │ │ │ # pointer. │ │ │ │ return func(self.ptr, other.ptr) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def intersects(self, other): │ │ │ │ "Return True if this geometry intersects with the other." │ │ │ │ return self._topology(capi.ogr_intersects, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def equals(self, other): │ │ │ │ "Return True if this geometry is equivalent to the other." │ │ │ │ return self._topology(capi.ogr_equals, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def disjoint(self, other): │ │ │ │ "Return True if this geometry and the other are spatially disjoint." │ │ │ │ return self._topology(capi.ogr_disjoint, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def touches(self, other): │ │ │ │ "Return True if this geometry touches the other." │ │ │ │ return self._topology(capi.ogr_touches, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def crosses(self, other): │ │ │ │ "Return True if this geometry crosses the other." │ │ │ │ return self._topology(capi.ogr_crosses, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def within(self, other): │ │ │ │ "Return True if this geometry is within the other." │ │ │ │ return self._topology(capi.ogr_within, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def contains(self, other): │ │ │ │ "Return True if this geometry contains the other." │ │ │ │ return self._topology(capi.ogr_contains, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def overlaps(self, other): │ │ │ │ "Return True if this geometry overlaps the other." │ │ │ │ return self._topology(capi.ogr_overlaps, other)
│ │ │ │ │ │ │ │ │ │ │ │ # #### Geometry-generation Methods #### │ │ │ │ def _geomgen(self, gen_func, other=None): │ │ │ │ @@ -602,45 +603,45 @@ │ │ │ │ """ │ │ │ │ Return the smallest convex Polygon that contains all the points in │ │ │ │ this Geometry. │ │ │ │ """ │ │ │ │ return self._geomgen(capi.geom_convex_hull) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def difference(self, other): │ │ │ │ """ │ │ │ │ Return a new geometry consisting of the region which is the difference │ │ │ │ of this geometry and the other. │ │ │ │ """ │ │ │ │ return self._geomgen(capi.geom_diff, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def intersection(self, other): │ │ │ │ """ │ │ │ │ Return a new geometry consisting of the region of intersection of this │ │ │ │ geometry and the other. │ │ │ │ """ │ │ │ │ return self._geomgen(capi.geom_intersection, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def sym_difference(self, other): │ │ │ │ """ │ │ │ │ Return a new geometry which is the symmetric difference of this │ │ │ │ geometry and the other. │ │ │ │ """ │ │ │ │ return self._geomgen(capi.geom_sym_diff, other)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def union(self, other): │ │ │ │ """ │ │ │ │ Return a new geometry consisting of the region which is the union of │ │ │ │ this geometry and the other. │ │ │ │ """ │ │ │ │ return self._geomgen(capi.geom_union, other)
│ │ │ │
│ │ │ │ @@ -876,35 +877,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ggeeoommeettrriieess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ggeeoommeettrriieess ************ │ │ │ │ │ """ │ │ │ │ │ The OGRGeometry is a wrapper for using the OGR Geometry class │ │ │ │ │ (see https://gdal.org/api/ogrgeometry_cpp.html#_CPPv411OGRGeometry). │ │ │ │ │ OGRGeometry may be instantiated when reading geometries from OGR Data Sources │ │ │ │ │ (e.g. SHP files), or when given OGC WKT (a string). │ │ │ │ │ │ │ │ │ │ While the 'full' API is not present yet, the API is "pythonic" unlike │ │ │ │ │ @@ -61,15 +61,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # For more information, see the OGR C API source code: │ │ │ │ │ # https://gdal.org/api/vector_c_api.html │ │ │ │ │ # │ │ │ │ │ # The OGR_G_* routines are relevant here. │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OGRGeometry(GDALBase): │ │ │ │ │ """Encapsulate an OGR geometry.""" │ │ │ │ │ │ │ │ │ │ destructor = capi.destroy_geom │ │ │ │ │ │ │ │ │ │ def __init__(self, geom_input, srs=None): │ │ │ │ │ """Initialize Geometry on either WKT or an OGR pointer as input.""" │ │ │ │ │ @@ -160,15 +160,15 @@ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ @staticmethod │ │ │ │ │ def _from_json(geom_input): │ │ │ │ │ return capi.from_json(geom_input) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @classmethod │ │ │ │ │ def from_bbox(cls, bbox): │ │ │ │ │ "Construct a Polygon from a bounding box (4-tuple)." │ │ │ │ │ x0, y0, x1, y1 = bbox │ │ │ │ │ return OGRGeometry( │ │ │ │ │ "POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))" │ │ │ │ │ % (x0, y0, x0, y1, x1, y1, x1, y0, x0, y0) │ │ │ │ │ @@ -177,15 +177,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @staticmethod │ │ │ │ │ def from_json(geom_input): │ │ │ │ │ return OGRGeometry(OGRGeometry._from_json(force_bytes(geom_input))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @classmethod │ │ │ │ │ def from_gml(cls, gml_string): │ │ │ │ │ return cls(capi.from_gml(force_bytes(gml_string))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # ### Geometry set-like operations ### │ │ │ │ │ @@ -403,36 +403,36 @@ │ │ │ │ │ if srs and srs.srid: │ │ │ │ │ return "SRID=%s;%s" % (srs.srid, self.wkt) │ │ │ │ │ else: │ │ │ │ │ return self.wkt │ │ │ │ │ │ │ │ │ │ # #### Geometry Methods #### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def clone(self): │ │ │ │ │ "Clone this OGR Geometry." │ │ │ │ │ return OGRGeometry(capi.clone_geom(self.ptr), self.srs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def close_rings(self): │ │ │ │ │ """ │ │ │ │ │ If there are any rings within this geometry that have not been │ │ │ │ │ closed, this routine will do so by adding the starting point at the │ │ │ │ │ end. │ │ │ │ │ """ │ │ │ │ │ # Closing the open rings. │ │ │ │ │ capi.geom_close_rings(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def transform(self, coord_trans, clone=False): │ │ │ │ │ """ │ │ │ │ │ Transform this geometry to a different spatial reference system. │ │ │ │ │ May take a CoordTransform object, a SpatialReference object, string │ │ │ │ │ WKT or PROJ, and/or an integer SRID. By default, return nothing │ │ │ │ │ and transform the geometry in-place. However, if the `clone` keyword is │ │ │ │ │ set, return a transformed clone of this geometry. │ │ │ │ │ @@ -470,71 +470,71 @@ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ # Returning the output of the given function with the other geometry's │ │ │ │ │ # pointer. │ │ │ │ │ return func(self.ptr, other.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def intersects(self, other): │ │ │ │ │ "Return True if this geometry intersects with the other." │ │ │ │ │ return self._topology(capi.ogr_intersects, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def equals(self, other): │ │ │ │ │ "Return True if this geometry is equivalent to the other." │ │ │ │ │ return self._topology(capi.ogr_equals, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def disjoint(self, other): │ │ │ │ │ "Return True if this geometry and the other are spatially disjoint." │ │ │ │ │ return self._topology(capi.ogr_disjoint, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def touches(self, other): │ │ │ │ │ "Return True if this geometry touches the other." │ │ │ │ │ return self._topology(capi.ogr_touches, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def crosses(self, other): │ │ │ │ │ "Return True if this geometry crosses the other." │ │ │ │ │ return self._topology(capi.ogr_crosses, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def within(self, other): │ │ │ │ │ "Return True if this geometry is within the other." │ │ │ │ │ return self._topology(capi.ogr_within, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def contains(self, other): │ │ │ │ │ "Return True if this geometry contains the other." │ │ │ │ │ return self._topology(capi.ogr_contains, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def overlaps(self, other): │ │ │ │ │ "Return True if this geometry overlaps the other." │ │ │ │ │ return self._topology(capi.ogr_overlaps, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### Geometry-generation Methods #### │ │ │ │ │ @@ -555,48 +555,48 @@ │ │ │ │ │ """ │ │ │ │ │ Return the smallest convex Polygon that contains all the points in │ │ │ │ │ this Geometry. │ │ │ │ │ """ │ │ │ │ │ return self._geomgen(capi.geom_convex_hull) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def difference(self, other): │ │ │ │ │ """ │ │ │ │ │ Return a new geometry consisting of the region which is the difference │ │ │ │ │ of this geometry and the other. │ │ │ │ │ """ │ │ │ │ │ return self._geomgen(capi.geom_diff, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def intersection(self, other): │ │ │ │ │ """ │ │ │ │ │ Return a new geometry consisting of the region of intersection of this │ │ │ │ │ geometry and the other. │ │ │ │ │ """ │ │ │ │ │ return self._geomgen(capi.geom_intersection, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def sym_difference(self, other): │ │ │ │ │ """ │ │ │ │ │ Return a new geometry which is the symmetric difference of this │ │ │ │ │ geometry and the other. │ │ │ │ │ """ │ │ │ │ │ return self._geomgen(capi.geom_sym_diff, other) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def union(self, other): │ │ │ │ │ """ │ │ │ │ │ Return a new geometry consisting of the region which is the union of │ │ │ │ │ this geometry and the other. │ │ │ │ │ """ │ │ │ │ │ return self._geomgen(capi.geom_union, other) │ │ │ │ │ │ │ │ │ │ @@ -825,12 +825,12 @@ │ │ │ │ │ 2 + OGRGeomType.wkb25bit: LineString, │ │ │ │ │ 3 + OGRGeomType.wkb25bit: Polygon, │ │ │ │ │ 4 + OGRGeomType.wkb25bit: MultiPoint, │ │ │ │ │ 5 + OGRGeomType.wkb25bit: MultiLineString, │ │ │ │ │ 6 + OGRGeomType.wkb25bit: MultiPolygon, │ │ │ │ │ 7 + OGRGeomType.wkb25bit: GeometryCollection, │ │ │ │ │ } │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/geomtype.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.geomtype — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.geomtype — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.geomtype

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.geomtype

│ │ │ │  from django.contrib.gis.gdal.error import GDALException
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class OGRGeomType: │ │ │ │ "Encapsulate OGR Geometry Types." │ │ │ │ │ │ │ │ wkb25bit = -2147483648 │ │ │ │ │ │ │ │ # Dictionary of acceptable OGRwkbGeometryType s and their string names. │ │ │ │ _types = { │ │ │ │ @@ -177,35 +178,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,16 +1,16 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ggeeoommttyyppee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ggeeoommttyyppee ************ │ │ │ │ │ from django.contrib.gis.gdal.error import GDALException │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OGRGeomType: │ │ │ │ │ "Encapsulate OGR Geometry Types." │ │ │ │ │ │ │ │ │ │ wkb25bit = -2147483648 │ │ │ │ │ │ │ │ │ │ # Dictionary of acceptable OGRwkbGeometryType s and their string names. │ │ │ │ │ _types = { │ │ │ │ │ @@ -98,12 +98,12 @@ │ │ │ │ │ """ │ │ │ │ │ Transform Point, LineString, Polygon, and their 25D equivalents │ │ │ │ │ to their Multi... counterpart. │ │ │ │ │ """ │ │ │ │ │ if self.name.startswith(("Point", "LineString", "Polygon")): │ │ │ │ │ self.num += 3 │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/raster/source.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.raster.source — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.raster.source — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.raster.source

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.raster.source

│ │ │ │  import json
│ │ │ │  import os
│ │ │ │  import sys
│ │ │ │  import uuid
│ │ │ │  from ctypes import (
│ │ │ │      addressof,
│ │ │ │      byref,
│ │ │ │ @@ -137,15 +138,15 @@
│ │ │ │      def y(self, value):
│ │ │ │          gtf = self._raster.geotransform
│ │ │ │          gtf[self.indices[self._prop][1]] = value
│ │ │ │          self._raster.geotransform = gtf
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GDALRaster(GDALRasterBase): │ │ │ │ """ │ │ │ │ Wrap a raster GDAL Data Source object. │ │ │ │ """ │ │ │ │ │ │ │ │ destructor = capi.close_ds │ │ │ │ │ │ │ │ @@ -469,15 +470,15 @@ │ │ │ │ return xmin, ymin, xmax, ymax │ │ │ │ │ │ │ │ @property │ │ │ │ def bands(self): │ │ │ │ return BandList(self) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def warp(self, ds_input, resampling="NearestNeighbour", max_error=0.0): │ │ │ │ """ │ │ │ │ Return a warped GDALRaster with the given input characteristics. │ │ │ │ │ │ │ │ The input is expected to be a dictionary containing the parameters │ │ │ │ of the target raster. Allowed values are width, height, SRID, origin, │ │ │ │ scale, skew, datatype, driver, and name (filename). │ │ │ │ @@ -554,15 +555,15 @@ │ │ │ │ c_void_p(), │ │ │ │ c_void_p(), │ │ │ │ ), │ │ │ │ write=self._write, │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def transform( │ │ │ │ self, srs, driver=None, name=None, resampling="NearestNeighbour", max_error=0.0 │ │ │ │ ): │ │ │ │ """ │ │ │ │ Return a copy of this raster reprojected into the given spatial │ │ │ │ reference system. │ │ │ │ """ │ │ │ │ @@ -629,35 +630,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..rraasstteerr..ssoouurrccee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..rraasstteerr..ssoouurrccee ************ │ │ │ │ │ import json │ │ │ │ │ import os │ │ │ │ │ import sys │ │ │ │ │ import uuid │ │ │ │ │ from ctypes import ( │ │ │ │ │ addressof, │ │ │ │ │ byref, │ │ │ │ │ @@ -68,15 +68,15 @@ │ │ │ │ │ def y(self, value): │ │ │ │ │ gtf = self._raster.geotransform │ │ │ │ │ gtf[self.indices[self._prop][1]] = value │ │ │ │ │ self._raster.geotransform = gtf │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GDALRaster(GDALRasterBase): │ │ │ │ │ """ │ │ │ │ │ Wrap a raster GDAL Data Source object. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ destructor = capi.close_ds │ │ │ │ │ │ │ │ │ │ @@ -409,15 +409,15 @@ │ │ │ │ │ return xmin, ymin, xmax, ymax │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def bands(self): │ │ │ │ │ return BandList(self) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def warp(self, ds_input, resampling="NearestNeighbour", max_error=0.0): │ │ │ │ │ """ │ │ │ │ │ Return a warped GDALRaster with the given input characteristics. │ │ │ │ │ │ │ │ │ │ The input is expected to be a dictionary containing the parameters │ │ │ │ │ of the target raster. Allowed values are width, height, SRID, origin, │ │ │ │ │ scale, skew, datatype, driver, and name (filename). │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │ │ │ c_void_p(), │ │ │ │ │ c_void_p(), │ │ │ │ │ ), │ │ │ │ │ write=self._write, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def transform( │ │ │ │ │ self, srs, driver=None, name=None, resampling="NearestNeighbour", │ │ │ │ │ max_error=0.0 │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Return a copy of this raster reprojected into the given spatial │ │ │ │ │ reference system. │ │ │ │ │ @@ -566,12 +566,12 @@ │ │ │ │ │ def info(self): │ │ │ │ │ """ │ │ │ │ │ Return information about this raster in a string format equivalent │ │ │ │ │ to the output of the gdalinfo command line utility. │ │ │ │ │ """ │ │ │ │ │ return capi.get_ds_info(self.ptr, None).decode() │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/gdal/srs.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.gdal.srs — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.gdal.srs — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.gdal.srs

│ │ │ │ +  

Broncode voor django.contrib.gis.gdal.srs

│ │ │ │  """
│ │ │ │    The Spatial Reference class, represents OGR Spatial Reference objects.
│ │ │ │  
│ │ │ │    Example:
│ │ │ │    >>> from django.contrib.gis.gdal import SpatialReference
│ │ │ │    >>> srs = SpatialReference('WGS84')
│ │ │ │    >>> print(srs)
│ │ │ │ @@ -111,15 +112,15 @@
│ │ │ │  
│ │ │ │  class AxisOrder(IntEnum):
│ │ │ │      TRADITIONAL = 0
│ │ │ │      AUTHORITY = 1
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SpatialReference(GDALBase): │ │ │ │ """ │ │ │ │ A wrapper for the OGRSpatialReference object. According to the GDAL web site, │ │ │ │ the SpatialReference object "provide[s] services to represent coordinate │ │ │ │ systems (projections and datums) and to transform between them." │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -185,15 +186,15 @@ │ │ │ │ # Importing from either the user input string or an integer SRID. │ │ │ │ if srs_type == "user": │ │ │ │ self.import_user_input(srs_input) │ │ │ │ elif srs_type == "epsg": │ │ │ │ self.import_epsg(srs_input) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def __getitem__(self, target): │ │ │ │ """ │ │ │ │ Return the value of the given string attribute node, None if the node │ │ │ │ doesn't exist. Can also take a tuple as a parameter, (target, child), │ │ │ │ where child is the index of the attribute in the WKT. For example: │ │ │ │ │ │ │ │ >>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]' │ │ │ │ @@ -222,76 +223,76 @@ │ │ │ │ │ │ │ │ def __str__(self): │ │ │ │ "Use 'pretty' WKT." │ │ │ │ return self.pretty_wkt │ │ │ │ │ │ │ │ # #### SpatialReference Methods #### │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def attr_value(self, target, index=0): │ │ │ │ """ │ │ │ │ The attribute value for the given target node (e.g. 'PROJCS'). The index │ │ │ │ keyword specifies an index of the child node to return. │ │ │ │ """ │ │ │ │ if not isinstance(target, str) or not isinstance(index, int): │ │ │ │ raise TypeError │ │ │ │ return capi.get_attr_value(self.ptr, force_bytes(target), index)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def auth_name(self, target): │ │ │ │ "Return the authority name for the given string target node." │ │ │ │ return capi.get_auth_name( │ │ │ │ self.ptr, target if target is None else force_bytes(target) │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def auth_code(self, target): │ │ │ │ "Return the authority code for the given string target node." │ │ │ │ return capi.get_auth_code( │ │ │ │ self.ptr, target if target is None else force_bytes(target) │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def clone(self): │ │ │ │ "Return a clone of this SpatialReference object." │ │ │ │ return SpatialReference(capi.clone_srs(self.ptr), axis_order=self.axis_order)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def from_esri(self): │ │ │ │ "Morph this SpatialReference from ESRI's format to EPSG." │ │ │ │ capi.morph_from_esri(self.ptr)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def identify_epsg(self): │ │ │ │ """ │ │ │ │ This method inspects the WKT of this SpatialReference, and will │ │ │ │ add EPSG authority nodes where an EPSG identifier is applicable. │ │ │ │ """ │ │ │ │ capi.identify_epsg(self.ptr)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def to_esri(self): │ │ │ │ "Morph this SpatialReference to ESRI's format." │ │ │ │ capi.morph_to_esri(self.ptr)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate(self): │ │ │ │ "Check to see if the given spatial reference is valid." │ │ │ │ capi.srs_validate(self.ptr)
│ │ │ │ │ │ │ │ │ │ │ │ # #### Name & SRID properties #### │ │ │ │ @property │ │ │ │ @@ -398,43 +399,43 @@ │ │ │ │ Return True if this SpatialReference is a projected coordinate system │ │ │ │ (root node is PROJCS). │ │ │ │ """ │ │ │ │ return bool(capi.isprojected(self.ptr)) │ │ │ │ │ │ │ │ # #### Import Routines ##### │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def import_epsg(self, epsg): │ │ │ │ "Import the Spatial Reference from the EPSG code (an integer)." │ │ │ │ capi.from_epsg(self.ptr, epsg)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def import_proj(self, proj): │ │ │ │ """Import the Spatial Reference from a PROJ string.""" │ │ │ │ capi.from_proj(self.ptr, proj)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def import_user_input(self, user_input): │ │ │ │ "Import the Spatial Reference from the given user input string." │ │ │ │ capi.from_user_input(self.ptr, force_bytes(user_input))
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def import_wkt(self, wkt): │ │ │ │ "Import the Spatial Reference from OGC WKT (string)" │ │ │ │ capi.from_wkt(self.ptr, byref(c_char_p(force_bytes(wkt))))
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def import_xml(self, xml): │ │ │ │ "Import the Spatial Reference from an XML string." │ │ │ │ capi.from_xml(self.ptr, xml)
│ │ │ │ │ │ │ │ │ │ │ │ # #### Export Properties #### │ │ │ │ @property │ │ │ │ @@ -461,15 +462,15 @@ │ │ │ │ def xml(self, dialect=""): │ │ │ │ "Return the XML representation of this Spatial Reference." │ │ │ │ return capi.to_xml(self.ptr, byref(c_char_p()), force_bytes(dialect))
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CoordTransform(GDALBase): │ │ │ │ "The coordinate system transformation object." │ │ │ │ destructor = capi.destroy_ct │ │ │ │ │ │ │ │ def __init__(self, source, target): │ │ │ │ "Initialize on a source and target SpatialReference objects." │ │ │ │ if not isinstance(source, SpatialReference) or not isinstance( │ │ │ │ @@ -491,35 +492,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ssrrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggddaall..ssrrss ************ │ │ │ │ │ """ │ │ │ │ │ The Spatial Reference class, represents OGR Spatial Reference objects. │ │ │ │ │ │ │ │ │ │ Example: │ │ │ │ │ >>> from django.contrib.gis.gdal import SpatialReference │ │ │ │ │ >>> srs = SpatialReference('WGS84') │ │ │ │ │ >>> print(srs) │ │ │ │ │ @@ -42,15 +42,15 @@ │ │ │ │ │ │ │ │ │ │ class AxisOrder(IntEnum): │ │ │ │ │ TRADITIONAL = 0 │ │ │ │ │ AUTHORITY = 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SpatialReference(GDALBase): │ │ │ │ │ """ │ │ │ │ │ A wrapper for the OGRSpatialReference object. According to the GDAL web │ │ │ │ │ site, │ │ │ │ │ the SpatialReference object "provide[s] services to represent coordinate │ │ │ │ │ systems (projections and datums) and to transform between them." │ │ │ │ │ """ │ │ │ │ │ @@ -122,15 +122,15 @@ │ │ │ │ │ # Importing from either the user input string or an integer SRID. │ │ │ │ │ if srs_type == "user": │ │ │ │ │ self.import_user_input(srs_input) │ │ │ │ │ elif srs_type == "epsg": │ │ │ │ │ self.import_epsg(srs_input) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def __getitem__(self, target): │ │ │ │ │ """ │ │ │ │ │ Return the value of the given string attribute node, None if the node │ │ │ │ │ doesn't exist. Can also take a tuple as a parameter, (target, child), │ │ │ │ │ where child is the index of the attribute in the WKT. For example: │ │ │ │ │ │ │ │ │ │ >>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY │ │ │ │ │ @@ -161,85 +161,85 @@ │ │ │ │ │ │ │ │ │ │ def __str__(self): │ │ │ │ │ "Use 'pretty' WKT." │ │ │ │ │ return self.pretty_wkt │ │ │ │ │ │ │ │ │ │ # #### SpatialReference Methods #### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def attr_value(self, target, index=0): │ │ │ │ │ """ │ │ │ │ │ The attribute value for the given target node (e.g. 'PROJCS'). The │ │ │ │ │ index │ │ │ │ │ keyword specifies an index of the child node to return. │ │ │ │ │ """ │ │ │ │ │ if not isinstance(target, str) or not isinstance(index, int): │ │ │ │ │ raise TypeError │ │ │ │ │ return capi.get_attr_value(self.ptr, force_bytes(target), index) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def auth_name(self, target): │ │ │ │ │ "Return the authority name for the given string target node." │ │ │ │ │ return capi.get_auth_name( │ │ │ │ │ self.ptr, target if target is None else force_bytes(target) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def auth_code(self, target): │ │ │ │ │ "Return the authority code for the given string target node." │ │ │ │ │ return capi.get_auth_code( │ │ │ │ │ self.ptr, target if target is None else force_bytes(target) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def clone(self): │ │ │ │ │ "Return a clone of this SpatialReference object." │ │ │ │ │ return SpatialReference(capi.clone_srs(self.ptr), │ │ │ │ │ axis_order=self.axis_order) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def from_esri(self): │ │ │ │ │ "Morph this SpatialReference from ESRI's format to EPSG." │ │ │ │ │ capi.morph_from_esri(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def identify_epsg(self): │ │ │ │ │ """ │ │ │ │ │ This method inspects the WKT of this SpatialReference, and will │ │ │ │ │ add EPSG authority nodes where an EPSG identifier is applicable. │ │ │ │ │ """ │ │ │ │ │ capi.identify_epsg(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def to_esri(self): │ │ │ │ │ "Morph this SpatialReference to ESRI's format." │ │ │ │ │ capi.morph_to_esri(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate(self): │ │ │ │ │ "Check to see if the given spatial reference is valid." │ │ │ │ │ capi.srs_validate(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### Name & SRID properties #### │ │ │ │ │ @@ -348,47 +348,47 @@ │ │ │ │ │ Return True if this SpatialReference is a projected coordinate system │ │ │ │ │ (root node is PROJCS). │ │ │ │ │ """ │ │ │ │ │ return bool(capi.isprojected(self.ptr)) │ │ │ │ │ │ │ │ │ │ # #### Import Routines ##### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def import_epsg(self, epsg): │ │ │ │ │ "Import the Spatial Reference from the EPSG code (an integer)." │ │ │ │ │ capi.from_epsg(self.ptr, epsg) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def import_proj(self, proj): │ │ │ │ │ """Import the Spatial Reference from a PROJ string.""" │ │ │ │ │ capi.from_proj(self.ptr, proj) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def import_user_input(self, user_input): │ │ │ │ │ "Import the Spatial Reference from the given user input string." │ │ │ │ │ capi.from_user_input(self.ptr, force_bytes(user_input)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def import_wkt(self, wkt): │ │ │ │ │ "Import the Spatial Reference from OGC WKT (string)" │ │ │ │ │ capi.from_wkt(self.ptr, byref(c_char_p(force_bytes(wkt)))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def import_xml(self, xml): │ │ │ │ │ "Import the Spatial Reference from an XML string." │ │ │ │ │ capi.from_xml(self.ptr, xml) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # #### Export Properties #### │ │ │ │ │ @@ -417,15 +417,15 @@ │ │ │ │ │ "Return the XML representation of this Spatial Reference." │ │ │ │ │ return capi.to_xml(self.ptr, byref(c_char_p()), force_bytes(dialect)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CoordTransform(GDALBase): │ │ │ │ │ "The coordinate system transformation object." │ │ │ │ │ destructor = capi.destroy_ct │ │ │ │ │ │ │ │ │ │ def __init__(self, source, target): │ │ │ │ │ "Initialize on a source and target SpatialReference objects." │ │ │ │ │ if not isinstance(source, SpatialReference) or not isinstance( │ │ │ │ │ @@ -437,12 +437,12 @@ │ │ │ │ │ self._srs1_name = source.name │ │ │ │ │ self._srs2_name = target.name │ │ │ │ │ │ │ │ │ │ def __str__(self): │ │ │ │ │ return 'Transform from "%s" to "%s"' % (self._srs1_name, │ │ │ │ │ self._srs2_name) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/collections.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.collections — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.collections — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.collections

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.collections

│ │ │ │  """
│ │ │ │   This module houses the Geometry Collection objects:
│ │ │ │   GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon
│ │ │ │  """
│ │ │ │  from django.contrib.gis.geos import prototypes as capi
│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin
│ │ │ │  from django.contrib.gis.geos.libgeos import GEOM_PTR
│ │ │ │  from django.contrib.gis.geos.linestring import LinearRing, LineString
│ │ │ │  from django.contrib.gis.geos.point import Point
│ │ │ │  from django.contrib.gis.geos.polygon import Polygon
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GeometryCollection(GEOSGeometry): │ │ │ │ _typeid = 7 │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ "Initialize a Geometry Collection from a sequence of Geometry objects." │ │ │ │ # Checking the arguments │ │ │ │ if len(args) == 1: │ │ │ │ @@ -165,31 +166,31 @@ │ │ │ │ │ │ │ │ coords = tuple
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # MultiPoint, MultiLineString, and MultiPolygon class definitions. │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPoint(GeometryCollection): │ │ │ │ _allowed = Point │ │ │ │ _typeid = 4
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiLineString(LinearGeometryMixin, GeometryCollection): │ │ │ │ _allowed = (LineString, LinearRing) │ │ │ │ _typeid = 5
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultiPolygon(GeometryCollection): │ │ │ │ _allowed = Polygon │ │ │ │ _typeid = 6
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # Setting the allowed types here since GeometryCollection is defined before │ │ │ │ @@ -211,35 +212,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,25 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ccoolllleeccttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ccoolllleeccttiioonnss ************ │ │ │ │ │ """ │ │ │ │ │ This module houses the Geometry Collection objects: │ │ │ │ │ GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon │ │ │ │ │ """ │ │ │ │ │ from django.contrib.gis.geos import prototypes as capi │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin │ │ │ │ │ from django.contrib.gis.geos.libgeos import GEOM_PTR │ │ │ │ │ from django.contrib.gis.geos.linestring import LinearRing, LineString │ │ │ │ │ from django.contrib.gis.geos.point import Point │ │ │ │ │ from django.contrib.gis.geos.polygon import Polygon │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GeometryCollection(GEOSGeometry): │ │ │ │ │ _typeid = 7 │ │ │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ "Initialize a Geometry Collection from a sequence of Geometry objects." │ │ │ │ │ # Checking the arguments │ │ │ │ │ if len(args) == 1: │ │ │ │ │ @@ -101,33 +101,33 @@ │ │ │ │ │ coords = tuple │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # MultiPoint, MultiLineString, and MultiPolygon class definitions. │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPoint(GeometryCollection): │ │ │ │ │ _allowed = Point │ │ │ │ │ _typeid = 4 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiLineString(LinearGeometryMixin, GeometryCollection): │ │ │ │ │ _allowed = (LineString, LinearRing) │ │ │ │ │ _typeid = 5 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultiPolygon(GeometryCollection): │ │ │ │ │ _allowed = Polygon │ │ │ │ │ _typeid = 6 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -138,12 +138,12 @@ │ │ │ │ │ LineString, │ │ │ │ │ LinearRing, │ │ │ │ │ Polygon, │ │ │ │ │ MultiPoint, │ │ │ │ │ MultiLineString, │ │ │ │ │ MultiPolygon, │ │ │ │ │ ) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/error.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.error — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.error — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.error

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.error

│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GEOSException(Exception): │ │ │ │ "The base GEOS exception, indicates a GEOS-related error." │ │ │ │ pass
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -85,35 +86,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..eerrrroorr ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..eerrrroorr ************ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GEOSException(Exception): │ │ │ │ │ "The base GEOS exception, indicates a GEOS-related error." │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/factory.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.factory — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.factory — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.factory

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.factory

│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry, hex_regex, wkt_regex
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def fromfile(file_h): │ │ │ │ """ │ │ │ │ Given a string file name, returns a GEOSGeometry. The file may contain WKB, │ │ │ │ WKT, or HEX. │ │ │ │ """ │ │ │ │ # If given a file name, get a real handle. │ │ │ │ if isinstance(file_h, str): │ │ │ │ @@ -101,15 +102,15 @@ │ │ │ │ return GEOSGeometry(buf) │ │ │ │ │ │ │ │ return GEOSGeometry(memoryview(buf))
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def fromstr(string, **kwargs): │ │ │ │ "Given a string value, return a GEOSGeometry object." │ │ │ │ return GEOSGeometry(string, **kwargs)
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -118,35 +119,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,16 +1,16 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ffaaccttoorryy ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ffaaccttoorryy ************ │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry, hex_regex, wkt_regex │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def fromfile(file_h): │ │ │ │ │ """ │ │ │ │ │ Given a string file name, returns a GEOSGeometry. The file may contain WKB, │ │ │ │ │ WKT, or HEX. │ │ │ │ │ """ │ │ │ │ │ # If given a file name, get a real handle. │ │ │ │ │ if isinstance(file_h, str): │ │ │ │ │ @@ -33,17 +33,17 @@ │ │ │ │ │ │ │ │ │ │ return GEOSGeometry(memoryview(buf)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def fromstr(string, **kwargs): │ │ │ │ │ "Given a string value, return a GEOSGeometry object." │ │ │ │ │ return GEOSGeometry(string, **kwargs) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/geometry.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.geometry — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.geometry — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.geometry

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.geometry

│ │ │ │  """
│ │ │ │   This module contains the 'base' GEOSGeometry object -- all GEOS Geometries
│ │ │ │   inherit from this object.
│ │ │ │  """
│ │ │ │  import re
│ │ │ │  from ctypes import addressof, byref, c_double
│ │ │ │  
│ │ │ │ @@ -777,15 +778,15 @@
│ │ │ │          """
│ │ │ │          Return whether or not this Geometry is closed.
│ │ │ │          """
│ │ │ │          return capi.geos_isclosed(self.ptr)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class GEOSGeometry(GEOSGeometryBase, ListMixin): │ │ │ │ "A class that, generally, encapsulates a GEOS geometry." │ │ │ │ │ │ │ │ def __init__(self, geo_input, srid=None): │ │ │ │ """ │ │ │ │ The base constructor for GEOS geometry objects. It may take the │ │ │ │ @@ -853,35 +854,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ggeeoommeettrryy ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ggeeoommeettrryy ************ │ │ │ │ │ """ │ │ │ │ │ This module contains the 'base' GEOSGeometry object -- all GEOS Geometries │ │ │ │ │ inherit from this object. │ │ │ │ │ """ │ │ │ │ │ import re │ │ │ │ │ from ctypes import addressof, byref, c_double │ │ │ │ │ │ │ │ │ │ @@ -726,15 +726,15 @@ │ │ │ │ │ """ │ │ │ │ │ Return whether or not this Geometry is closed. │ │ │ │ │ """ │ │ │ │ │ return capi.geos_isclosed(self.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class GEOSGeometry(GEOSGeometryBase, ListMixin): │ │ │ │ │ "A class that, generally, encapsulates a GEOS geometry." │ │ │ │ │ │ │ │ │ │ def __init__(self, geo_input, srid=None): │ │ │ │ │ """ │ │ │ │ │ The base constructor for GEOS geometry objects. It may take the │ │ │ │ │ @@ -794,12 +794,12 @@ │ │ │ │ │ │ │ │ │ │ super().__init__(g, None) │ │ │ │ │ # Set the SRID, if given. │ │ │ │ │ srid = input_srid or srid │ │ │ │ │ if srid and isinstance(srid, int): │ │ │ │ │ self.srid = srid │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/io.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.io — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.io — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.io

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.io

│ │ │ │  """
│ │ │ │  Module that holds classes for performing I/O operations on GEOS geometry
│ │ │ │  objects.  Specifically, this has Python implementations of WKB/WKT
│ │ │ │  reader and writer classes.
│ │ │ │  """
│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry
│ │ │ │  from django.contrib.gis.geos.prototypes.io import (
│ │ │ │ @@ -85,24 +86,24 @@
│ │ │ │  )
│ │ │ │  
│ │ │ │  __all__ = ["WKBWriter", "WKTWriter", "WKBReader", "WKTReader"]
│ │ │ │  
│ │ │ │  
│ │ │ │  # Public classes for (WKB|WKT)Reader, which return GEOSGeometry
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class WKBReader(_WKBReader): │ │ │ │ def read(self, wkb): │ │ │ │ "Return a GEOSGeometry for the given WKB buffer." │ │ │ │ return GEOSGeometry(super().read(wkb))
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class WKTReader(_WKTReader): │ │ │ │ def read(self, wkt): │ │ │ │ "Return a GEOSGeometry for the given WKT string." │ │ │ │ return GEOSGeometry(super().read(wkt))
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -112,35 +113,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..iioo ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..iioo ************ │ │ │ │ │ """ │ │ │ │ │ Module that holds classes for performing I/O operations on GEOS geometry │ │ │ │ │ objects. Specifically, this has Python implementations of WKB/WKT │ │ │ │ │ reader and writer classes. │ │ │ │ │ """ │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry │ │ │ │ │ from django.contrib.gis.geos.prototypes.io import ( │ │ │ │ │ @@ -16,28 +16,28 @@ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ __all__ = ["WKBWriter", "WKTWriter", "WKBReader", "WKTReader"] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # Public classes for (WKB|WKT)Reader, which return GEOSGeometry │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class WKBReader(_WKBReader): │ │ │ │ │ def read(self, wkb): │ │ │ │ │ "Return a GEOSGeometry for the given WKB buffer." │ │ │ │ │ return GEOSGeometry(super().read(wkb)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class WKTReader(_WKTReader): │ │ │ │ │ def read(self, wkt): │ │ │ │ │ "Return a GEOSGeometry for the given WKT string." │ │ │ │ │ return GEOSGeometry(super().read(wkt)) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/linestring.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.linestring — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.linestring — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.linestring

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.linestring

│ │ │ │  from django.contrib.gis.geos import prototypes as capi
│ │ │ │  from django.contrib.gis.geos.coordseq import GEOSCoordSeq
│ │ │ │  from django.contrib.gis.geos.error import GEOSException
│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin
│ │ │ │  from django.contrib.gis.geos.point import Point
│ │ │ │  from django.contrib.gis.shortcuts import numpy
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LineString(LinearGeometryMixin, GEOSGeometry): │ │ │ │ _init_func = capi.create_linestring │ │ │ │ _minlength = 2 │ │ │ │ has_cs = True │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ """ │ │ │ │ @@ -255,15 +256,15 @@ │ │ │ │ else: │ │ │ │ return self._listarr(self._cs.getZ)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # LinearRings are LineStrings used within Polygons. │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LinearRing(LineString): │ │ │ │ _minlength = 4 │ │ │ │ _init_func = capi.create_linearring │ │ │ │ │ │ │ │ @property │ │ │ │ def is_counterclockwise(self): │ │ │ │ if self.empty: │ │ │ │ @@ -278,35 +279,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..lliinneessttrriinngg ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..lliinneessttrriinngg ************ │ │ │ │ │ from django.contrib.gis.geos import prototypes as capi │ │ │ │ │ from django.contrib.gis.geos.coordseq import GEOSCoordSeq │ │ │ │ │ from django.contrib.gis.geos.error import GEOSException │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin │ │ │ │ │ from django.contrib.gis.geos.point import Point │ │ │ │ │ from django.contrib.gis.shortcuts import numpy │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LineString(LinearGeometryMixin, GEOSGeometry): │ │ │ │ │ _init_func = capi.create_linestring │ │ │ │ │ _minlength = 2 │ │ │ │ │ has_cs = True │ │ │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ """ │ │ │ │ │ @@ -191,24 +191,24 @@ │ │ │ │ │ return self._listarr(self._cs.getZ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # LinearRings are LineStrings used within Polygons. │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LinearRing(LineString): │ │ │ │ │ _minlength = 4 │ │ │ │ │ _init_func = capi.create_linearring │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def is_counterclockwise(self): │ │ │ │ │ if self.empty: │ │ │ │ │ raise ValueError("Orientation of an empty LinearRing cannot be │ │ │ │ │ determined.") │ │ │ │ │ return self._cs.is_counterclockwise │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/point.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.point — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.point — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.point

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.point

│ │ │ │  from ctypes import c_uint
│ │ │ │  
│ │ │ │  from django.contrib.gis import gdal
│ │ │ │  from django.contrib.gis.geos import prototypes as capi
│ │ │ │  from django.contrib.gis.geos.error import GEOSException
│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Point(GEOSGeometry): │ │ │ │ _minlength = 2 │ │ │ │ _maxlength = 3 │ │ │ │ has_cs = True │ │ │ │ │ │ │ │ def __init__(self, x=None, y=None, z=None, srid=None): │ │ │ │ """ │ │ │ │ @@ -244,35 +245,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ppooiinntt ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ppooiinntt ************ │ │ │ │ │ from ctypes import c_uint │ │ │ │ │ │ │ │ │ │ from django.contrib.gis import gdal │ │ │ │ │ from django.contrib.gis.geos import prototypes as capi │ │ │ │ │ from django.contrib.gis.geos.error import GEOSException │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Point(GEOSGeometry): │ │ │ │ │ _minlength = 2 │ │ │ │ │ _maxlength = 3 │ │ │ │ │ has_cs = True │ │ │ │ │ │ │ │ │ │ def __init__(self, x=None, y=None, z=None, srid=None): │ │ │ │ │ """ │ │ │ │ │ @@ -169,12 +169,12 @@ │ │ │ │ │ def tuple(self, tup): │ │ │ │ │ "Set the coordinates of the point with the given tuple." │ │ │ │ │ self._cs[0] = tup │ │ │ │ │ │ │ │ │ │ # The tuple and coords properties │ │ │ │ │ coords = tuple │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/polygon.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.polygon — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.polygon — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.polygon

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.polygon

│ │ │ │  from django.contrib.gis.geos import prototypes as capi
│ │ │ │  from django.contrib.gis.geos.geometry import GEOSGeometry
│ │ │ │  from django.contrib.gis.geos.libgeos import GEOM_PTR
│ │ │ │  from django.contrib.gis.geos.linestring import LinearRing
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Polygon(GEOSGeometry): │ │ │ │ _minlength = 1 │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ """ │ │ │ │ Initialize on an exterior ring and a sequence of holes (both │ │ │ │ instances may be either LinearRing instances, or a tuple/list │ │ │ │ @@ -126,15 +127,15 @@ │ │ │ │ yield self[i] │ │ │ │ │ │ │ │ def __len__(self): │ │ │ │ "Return the number of rings in this Polygon." │ │ │ │ return self.num_interior_rings + 1 │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @classmethod │ │ │ │ def from_bbox(cls, bbox): │ │ │ │ "Construct a Polygon from a bounding box (4-tuple)." │ │ │ │ x0, y0, x1, y1 = bbox │ │ │ │ for z in bbox: │ │ │ │ if not isinstance(z, (float, int)): │ │ │ │ return GEOSGeometry( │ │ │ │ @@ -274,35 +275,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,19 +1,19 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ppoollyyggoonn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..ppoollyyggoonn ************ │ │ │ │ │ from django.contrib.gis.geos import prototypes as capi │ │ │ │ │ from django.contrib.gis.geos.geometry import GEOSGeometry │ │ │ │ │ from django.contrib.gis.geos.libgeos import GEOM_PTR │ │ │ │ │ from django.contrib.gis.geos.linestring import LinearRing │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Polygon(GEOSGeometry): │ │ │ │ │ _minlength = 1 │ │ │ │ │ │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Initialize on an exterior ring and a sequence of holes (both │ │ │ │ │ instances may be either LinearRing instances, or a tuple/list │ │ │ │ │ @@ -57,15 +57,15 @@ │ │ │ │ │ yield self[i] │ │ │ │ │ │ │ │ │ │ def __len__(self): │ │ │ │ │ "Return the number of rings in this Polygon." │ │ │ │ │ return self.num_interior_rings + 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @classmethod │ │ │ │ │ def from_bbox(cls, bbox): │ │ │ │ │ "Construct a Polygon from a bounding box (4-tuple)." │ │ │ │ │ x0, y0, x1, y1 = bbox │ │ │ │ │ for z in bbox: │ │ │ │ │ if not isinstance(z, (float, int)): │ │ │ │ │ return GEOSGeometry( │ │ │ │ │ @@ -196,12 +196,12 @@ │ │ │ │ │ for i in range(self.num_interior_rings) │ │ │ │ │ ) │ │ │ │ │ return "%s%s" % ( │ │ │ │ │ self[0].kml, │ │ │ │ │ inner_kml, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/geos/prototypes/io.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.geos.prototypes.io — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.geos.prototypes.io — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.geos.prototypes.io

│ │ │ │ +  

Broncode voor django.contrib.gis.geos.prototypes.io

│ │ │ │  import threading
│ │ │ │  from ctypes import POINTER, Structure, byref, c_byte, c_char_p, c_int, c_size_t
│ │ │ │  
│ │ │ │  from django.contrib.gis.geos.base import GEOSBase
│ │ │ │  from django.contrib.gis.geos.libgeos import (
│ │ │ │      GEOM_PTR,
│ │ │ │      GEOSFuncFactory,
│ │ │ │ @@ -249,15 +250,15 @@
│ │ │ │              return wkb_reader_read_hex(self.ptr, wkb_s, len(wkb_s))
│ │ │ │          else:
│ │ │ │              raise TypeError
│ │ │ │  
│ │ │ │  
│ │ │ │  # ### WKB/WKT Writer Classes ###
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class WKTWriter(IOBase): │ │ │ │ _constructor = wkt_writer_create │ │ │ │ ptr_type = WKT_WRITE_PTR │ │ │ │ destructor = wkt_writer_destroy │ │ │ │ │ │ │ │ _trim = False │ │ │ │ _precision = None │ │ │ │ @@ -267,15 +268,15 @@ │ │ │ │ if bool(trim) != self._trim: │ │ │ │ self.trim = trim │ │ │ │ if precision is not None: │ │ │ │ self.precision = precision │ │ │ │ self.outdim = dim │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def write(self, geom): │ │ │ │ "Return the WKT representation of the given geometry." │ │ │ │ return wkt_writer_write(self.ptr, geom.ptr)
│ │ │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ def outdim(self): │ │ │ │ @@ -310,15 +311,15 @@ │ │ │ │ if precision != self._precision: │ │ │ │ self._precision = precision │ │ │ │ wkt_writer_set_precision(self.ptr, -1 if precision is None else precision)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class WKBWriter(IOBase): │ │ │ │ _constructor = wkb_writer_create │ │ │ │ ptr_type = WKB_WRITE_PTR │ │ │ │ destructor = wkb_writer_destroy │ │ │ │ geos_version = geos_version_tuple() │ │ │ │ │ │ │ │ def __init__(self, dim=2): │ │ │ │ @@ -335,30 +336,30 @@ │ │ │ │ # https://trac.osgeo.org/postgis/ticket/3181 │ │ │ │ geom = Point(float("NaN"), float("NaN"), srid=geom.srid) │ │ │ │ else: │ │ │ │ raise ValueError("Empty point is not representable in WKB.") │ │ │ │ return geom │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def write(self, geom): │ │ │ │ "Return the WKB representation of the given geometry." │ │ │ │ from django.contrib.gis.geos import Polygon │ │ │ │ │ │ │ │ geom = self._handle_empty_point(geom) │ │ │ │ wkb = wkb_writer_write(self.ptr, geom.ptr, byref(c_size_t())) │ │ │ │ if self.geos_version < (3, 6, 1) and isinstance(geom, Polygon) and geom.empty: │ │ │ │ # Fix GEOS output for empty polygon. │ │ │ │ # See https://trac.osgeo.org/geos/ticket/680. │ │ │ │ wkb = wkb[:-8] + b"\0" * 4 │ │ │ │ return memoryview(wkb)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def write_hex(self, geom): │ │ │ │ "Return the HEXEWKB representation of the given geometry." │ │ │ │ from django.contrib.gis.geos.polygon import Polygon │ │ │ │ │ │ │ │ geom = self._handle_empty_point(geom) │ │ │ │ wkb = wkb_writer_write_hex(self.ptr, geom.ptr, byref(c_size_t())) │ │ │ │ if self.geos_version < (3, 6, 1) and isinstance(geom, Polygon) and geom.empty: │ │ │ │ @@ -463,35 +464,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..pprroottoottyyppeess..iioo ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..ggeeooss..pprroottoottyyppeess..iioo ************ │ │ │ │ │ import threading │ │ │ │ │ from ctypes import POINTER, Structure, byref, c_byte, c_char_p, c_int, c_size_t │ │ │ │ │ │ │ │ │ │ from django.contrib.gis.geos.base import GEOSBase │ │ │ │ │ from django.contrib.gis.geos.libgeos import ( │ │ │ │ │ GEOM_PTR, │ │ │ │ │ GEOSFuncFactory, │ │ │ │ │ @@ -188,15 +188,15 @@ │ │ │ │ │ return wkb_reader_read_hex(self.ptr, wkb_s, len(wkb_s)) │ │ │ │ │ else: │ │ │ │ │ raise TypeError │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # ### WKB/WKT Writer Classes ### │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class WKTWriter(IOBase): │ │ │ │ │ _constructor = wkt_writer_create │ │ │ │ │ ptr_type = WKT_WRITE_PTR │ │ │ │ │ destructor = wkt_writer_destroy │ │ │ │ │ │ │ │ │ │ _trim = False │ │ │ │ │ _precision = None │ │ │ │ │ @@ -206,15 +206,15 @@ │ │ │ │ │ if bool(trim) != self._trim: │ │ │ │ │ self.trim = trim │ │ │ │ │ if precision is not None: │ │ │ │ │ self.precision = precision │ │ │ │ │ self.outdim = dim │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def write(self, geom): │ │ │ │ │ "Return the WKT representation of the given geometry." │ │ │ │ │ return wkt_writer_write(self.ptr, geom.ptr) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ @@ -254,15 +254,15 @@ │ │ │ │ │ wkt_writer_set_precision(self.ptr, -1 if precision is None else │ │ │ │ │ precision) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class WKBWriter(IOBase): │ │ │ │ │ _constructor = wkb_writer_create │ │ │ │ │ ptr_type = WKB_WRITE_PTR │ │ │ │ │ destructor = wkb_writer_destroy │ │ │ │ │ geos_version = geos_version_tuple() │ │ │ │ │ │ │ │ │ │ def __init__(self, dim=2): │ │ │ │ │ @@ -279,15 +279,15 @@ │ │ │ │ │ # https://trac.osgeo.org/postgis/ticket/3181 │ │ │ │ │ geom = Point(float("NaN"), float("NaN"), srid=geom.srid) │ │ │ │ │ else: │ │ │ │ │ raise ValueError("Empty point is not representable in WKB.") │ │ │ │ │ return geom │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def write(self, geom): │ │ │ │ │ "Return the WKB representation of the given geometry." │ │ │ │ │ from django.contrib.gis.geos import Polygon │ │ │ │ │ │ │ │ │ │ geom = self._handle_empty_point(geom) │ │ │ │ │ wkb = wkb_writer_write(self.ptr, geom.ptr, byref(c_size_t())) │ │ │ │ │ if self.geos_version < (3, 6, 1) and isinstance(geom, Polygon) and │ │ │ │ │ @@ -296,15 +296,15 @@ │ │ │ │ │ # See https://trac.osgeo.org/geos/ticket/680. │ │ │ │ │ wkb = wkb[:-8] + b"\0" * 4 │ │ │ │ │ return memoryview(wkb) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def write_hex(self, geom): │ │ │ │ │ "Return the HEXEWKB representation of the given geometry." │ │ │ │ │ from django.contrib.gis.geos.polygon import Polygon │ │ │ │ │ │ │ │ │ │ geom = self._handle_empty_point(geom) │ │ │ │ │ wkb = wkb_writer_write_hex(self.ptr, geom.ptr, byref(c_size_t())) │ │ │ │ │ if self.geos_version < (3, 6, 1) and isinstance(geom, Polygon) and │ │ │ │ │ @@ -402,12 +402,12 @@ │ │ │ │ │ def ewkb_w(dim=2): │ │ │ │ │ if not thread_context.ewkb_w: │ │ │ │ │ thread_context.ewkb_w = WKBWriter(dim=dim) │ │ │ │ │ thread_context.ewkb_w.srid = True │ │ │ │ │ else: │ │ │ │ │ thread_context.ewkb_w.outdim = dim │ │ │ │ │ return thread_context.ewkb_w │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/measure.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.measure — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.measure — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.measure

│ │ │ │ +  

Broncode voor django.contrib.gis.measure

│ │ │ │  # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
│ │ │ │  # All rights reserved.
│ │ │ │  #
│ │ │ │  # Redistribution and use in source and binary forms, with or without modification,
│ │ │ │  # are permitted provided that the following conditions are met:
│ │ │ │  #
│ │ │ │  #   1. Redistributions of source code must retain the above copyright notice,
│ │ │ │ @@ -317,15 +318,15 @@
│ │ │ │          else:
│ │ │ │              raise Exception(
│ │ │ │                  'Could not find a unit keyword associated with "%s"' % unit_str
│ │ │ │              )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Distance(MeasureBase): │ │ │ │ STANDARD_UNIT = "m" │ │ │ │ UNITS = { │ │ │ │ "chain": 20.1168, │ │ │ │ "chain_benoit": 20.116782, │ │ │ │ "chain_sears": 20.1167645, │ │ │ │ "british_chain_benoit": 20.1167824944, │ │ │ │ @@ -419,15 +420,15 @@ │ │ │ │ "distance": pretty_name(self.__class__), │ │ │ │ } │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Area(MeasureBase): │ │ │ │ STANDARD_UNIT = AREA_PREFIX + Distance.STANDARD_UNIT │ │ │ │ # Getting the square units values and the alias dictionary. │ │ │ │ UNITS = {"%s%s" % (AREA_PREFIX, k): v**2 for k, v in Distance.UNITS.items()} │ │ │ │ ALIAS = {k: "%s%s" % (AREA_PREFIX, v) for k, v in Distance.ALIAS.items()} │ │ │ │ LALIAS = {k.lower(): v for k, v in ALIAS.items()} │ │ │ │ │ │ │ │ @@ -455,35 +456,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..mmeeaassuurree ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..mmeeaassuurree ************ │ │ │ │ │ # Copyright (c) 2007, Robert Coup │ │ │ │ │ # All rights reserved. │ │ │ │ │ # │ │ │ │ │ # Redistribution and use in source and binary forms, with or without │ │ │ │ │ modification, │ │ │ │ │ # are permitted provided that the following conditions are met: │ │ │ │ │ # │ │ │ │ │ @@ -258,15 +258,15 @@ │ │ │ │ │ else: │ │ │ │ │ raise Exception( │ │ │ │ │ 'Could not find a unit keyword associated with "%s"' % unit_str │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Distance(MeasureBase): │ │ │ │ │ STANDARD_UNIT = "m" │ │ │ │ │ UNITS = { │ │ │ │ │ "chain": 20.1168, │ │ │ │ │ "chain_benoit": 20.116782, │ │ │ │ │ "chain_sears": 20.1167645, │ │ │ │ │ "british_chain_benoit": 20.1167824944, │ │ │ │ │ @@ -363,15 +363,15 @@ │ │ │ │ │ } │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Area(MeasureBase): │ │ │ │ │ STANDARD_UNIT = AREA_PREFIX + Distance.STANDARD_UNIT │ │ │ │ │ # Getting the square units values and the alias dictionary. │ │ │ │ │ UNITS = {"%s%s" % (AREA_PREFIX, k): v**2 for k, v in Distance.UNITS.items │ │ │ │ │ ()} │ │ │ │ │ ALIAS = {k: "%s%s" % (AREA_PREFIX, v) for k, v in Distance.ALIAS.items()} │ │ │ │ │ LALIAS = {k.lower(): v for k, v in ALIAS.items()} │ │ │ │ │ @@ -390,12 +390,12 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # Shortcuts │ │ │ │ │ D = Distance │ │ │ │ │ A = Area │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/layermapping.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.utils.layermapping — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.utils.layermapping — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.utils.layermapping

│ │ │ │ +  

Broncode voor django.contrib.gis.utils.layermapping

│ │ │ │  # LayerMapping -- A Django Model/OGR Layer Mapping Utility
│ │ │ │  """
│ │ │ │   The LayerMapping class provides a way to map the contents of OGR
│ │ │ │   vector files (e.g. SHP files) to Geographic-enabled Django models.
│ │ │ │  
│ │ │ │   For more information, please consult the GeoDjango documentation:
│ │ │ │     https://docs.djangoproject.com/en/dev/ref/contrib/gis/layermapping/
│ │ │ │ @@ -125,15 +126,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class MissingForeignKey(LayerMapError):
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class LayerMapping: │ │ │ │ "A class that maps OGR Layers to GeoDjango Models." │ │ │ │ │ │ │ │ # Acceptable 'base' types for a multi-geometry type. │ │ │ │ MULTI_TYPES = { │ │ │ │ 1: OGRGeomType("MultiPoint"), │ │ │ │ 2: OGRGeomType("MultiLineString"), │ │ │ │ @@ -617,15 +618,15 @@ │ │ │ │ """ │ │ │ │ return ( │ │ │ │ geom_type.num in self.MULTI_TYPES │ │ │ │ and model_field.__class__.__name__ == "Multi%s" % geom_type.django │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save( │ │ │ │ self, │ │ │ │ verbose=False, │ │ │ │ fid_range=False, │ │ │ │ step=False, │ │ │ │ progress=False, │ │ │ │ silent=False, │ │ │ │ @@ -809,35 +810,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..uuttiillss..llaayyeerrmmaappppiinngg ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..uuttiillss..llaayyeerrmmaappppiinngg ************ │ │ │ │ │ # LayerMapping -- A Django Model/OGR Layer Mapping Utility │ │ │ │ │ """ │ │ │ │ │ The LayerMapping class provides a way to map the contents of OGR │ │ │ │ │ vector files (e.g. SHP files) to Geographic-enabled Django models. │ │ │ │ │ │ │ │ │ │ For more information, please consult the GeoDjango documentation: │ │ │ │ │ https://docs.djangoproject.com/en/dev/ref/contrib/gis/layermapping/ │ │ │ │ │ @@ -56,15 +56,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class MissingForeignKey(LayerMapError): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class LayerMapping: │ │ │ │ │ "A class that maps OGR Layers to GeoDjango Models." │ │ │ │ │ │ │ │ │ │ # Acceptable 'base' types for a multi-geometry type. │ │ │ │ │ MULTI_TYPES = { │ │ │ │ │ 1: OGRGeomType("MultiPoint"), │ │ │ │ │ 2: OGRGeomType("MultiLineString"), │ │ │ │ │ @@ -574,15 +574,15 @@ │ │ │ │ │ """ │ │ │ │ │ return ( │ │ │ │ │ geom_type.num in self.MULTI_TYPES │ │ │ │ │ and model_field.__class__.__name__ == "Multi%s" % geom_type.django │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save( │ │ │ │ │ self, │ │ │ │ │ verbose=False, │ │ │ │ │ fid_range=False, │ │ │ │ │ step=False, │ │ │ │ │ progress=False, │ │ │ │ │ silent=False, │ │ │ │ │ @@ -770,12 +770,12 @@ │ │ │ │ │ ) │ │ │ │ │ raise │ │ │ │ │ else: │ │ │ │ │ # Otherwise, just calling the previously defined _save() function. │ │ │ │ │ _save() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/gis/utils/ogrinspect.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.gis.utils.ogrinspect — Django 4.2.13 documentation │ │ │ │ + django.contrib.gis.utils.ogrinspect — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.gis.utils.ogrinspect

│ │ │ │ +  

Broncode voor django.contrib.gis.utils.ogrinspect

│ │ │ │  """
│ │ │ │  This module is for inspecting OGR data sources and generating either
│ │ │ │  models for GeoDjango and/or mapping dictionaries for use with the
│ │ │ │  `LayerMapping` utility.
│ │ │ │  """
│ │ │ │  from django.contrib.gis.gdal import DataSource
│ │ │ │  from django.contrib.gis.gdal.field import (
│ │ │ │ @@ -85,15 +86,15 @@
│ │ │ │      OFTReal,
│ │ │ │      OFTString,
│ │ │ │      OFTTime,
│ │ │ │  )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def mapping(data_source, geom_name="geom", layer_key=0, multi_geom=False): │ │ │ │ """ │ │ │ │ Given a DataSource, generate a dictionary that may be used │ │ │ │ for invoking the LayerMapping utility. │ │ │ │ │ │ │ │ Keyword Arguments: │ │ │ │ `geom_name` => The name of the geometry field to use for the model. │ │ │ │ @@ -128,15 +129,15 @@ │ │ │ │ gtype.to_multi() │ │ │ │ _mapping[geom_name] = str(gtype).upper() │ │ │ │ return _mapping
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def ogrinspect(*args, **kwargs): │ │ │ │ """ │ │ │ │ Given a data source (either a string or a DataSource object) and a string │ │ │ │ model name this function will generate a GeoDjango model. │ │ │ │ │ │ │ │ Usage: │ │ │ │ │ │ │ │ @@ -352,35 +353,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ggiiss..uuttiillss..ooggrriinnssppeecctt ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ggiiss..uuttiillss..ooggrriinnssppeecctt ************ │ │ │ │ │ """ │ │ │ │ │ This module is for inspecting OGR data sources and generating either │ │ │ │ │ models for GeoDjango and/or mapping dictionaries for use with the │ │ │ │ │ `LayerMapping` utility. │ │ │ │ │ """ │ │ │ │ │ from django.contrib.gis.gdal import DataSource │ │ │ │ │ from django.contrib.gis.gdal.field import ( │ │ │ │ │ @@ -16,15 +16,15 @@ │ │ │ │ │ OFTReal, │ │ │ │ │ OFTString, │ │ │ │ │ OFTTime, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def mapping(data_source, geom_name="geom", layer_key=0, multi_geom=False): │ │ │ │ │ """ │ │ │ │ │ Given a DataSource, generate a dictionary that may be used │ │ │ │ │ for invoking the LayerMapping utility. │ │ │ │ │ │ │ │ │ │ Keyword Arguments: │ │ │ │ │ `geom_name` => The name of the geometry field to use for the model. │ │ │ │ │ @@ -61,15 +61,15 @@ │ │ │ │ │ _mapping[geom_name] = str(gtype).upper() │ │ │ │ │ return _mapping │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def ogrinspect(*args, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Given a data source (either a string or a DataSource object) and a string │ │ │ │ │ model name this function will generate a GeoDjango model. │ │ │ │ │ │ │ │ │ │ Usage: │ │ │ │ │ │ │ │ │ │ @@ -284,12 +284,12 @@ │ │ │ │ │ srid_str = "srid=%s" % srid │ │ │ │ │ │ │ │ │ │ yield " %s = models.%s(%s)" % (geom_name, geom_field, srid_str) │ │ │ │ │ │ │ │ │ │ if name_field: │ │ │ │ │ yield "" │ │ │ │ │ yield " def __str__(self): return self.%s" % name_field │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/api.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.messages.api — Django 4.2.13 documentation │ │ │ │ + django.contrib.messages.api — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.messages.api

│ │ │ │ +  

Broncode voor django.contrib.messages.api

│ │ │ │  from django.contrib.messages import constants
│ │ │ │  from django.contrib.messages.storage import default_storage
│ │ │ │  
│ │ │ │  __all__ = (
│ │ │ │      "add_message",
│ │ │ │      "get_messages",
│ │ │ │      "get_level",
│ │ │ │ @@ -89,15 +90,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class MessageFailure(Exception):
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_message(request, level, message, extra_tags="", fail_silently=False): │ │ │ │ """ │ │ │ │ Attempt to add a message to the request using the 'messages' app. │ │ │ │ """ │ │ │ │ try: │ │ │ │ messages = request._messages │ │ │ │ except AttributeError: │ │ │ │ @@ -113,15 +114,15 @@ │ │ │ │ ) │ │ │ │ else: │ │ │ │ return messages.add(level, message, extra_tags)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_messages(request): │ │ │ │ """ │ │ │ │ Return the message storage on the request if it exists, otherwise return │ │ │ │ an empty list. │ │ │ │ """ │ │ │ │ return getattr(request, "_messages", [])
│ │ │ │ │ │ │ │ @@ -212,35 +213,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..mmeessssaaggeess..aappii ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..mmeessssaaggeess..aappii ************ │ │ │ │ │ from django.contrib.messages import constants │ │ │ │ │ from django.contrib.messages.storage import default_storage │ │ │ │ │ │ │ │ │ │ __all__ = ( │ │ │ │ │ "add_message", │ │ │ │ │ "get_messages", │ │ │ │ │ "get_level", │ │ │ │ │ @@ -20,15 +20,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class MessageFailure(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_message(request, level, message, extra_tags="", fail_silently=False): │ │ │ │ │ """ │ │ │ │ │ Attempt to add a message to the request using the 'messages' app. │ │ │ │ │ """ │ │ │ │ │ try: │ │ │ │ │ messages = request._messages │ │ │ │ │ except AttributeError: │ │ │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ else: │ │ │ │ │ return messages.add(level, message, extra_tags) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_messages(request): │ │ │ │ │ """ │ │ │ │ │ Return the message storage on the request if it exists, otherwise return │ │ │ │ │ an empty list. │ │ │ │ │ """ │ │ │ │ │ return getattr(request, "_messages", []) │ │ │ │ │ │ │ │ │ │ @@ -133,12 +133,12 @@ │ │ │ │ │ add_message( │ │ │ │ │ request, │ │ │ │ │ constants.ERROR, │ │ │ │ │ message, │ │ │ │ │ extra_tags=extra_tags, │ │ │ │ │ fail_silently=fail_silently, │ │ │ │ │ ) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/messages/middleware.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.messages.middleware — Django 4.2.13 documentation │ │ │ │ + django.contrib.messages.middleware — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.messages.middleware

│ │ │ │ +  

Broncode voor django.contrib.messages.middleware

│ │ │ │  from django.conf import settings
│ │ │ │  from django.contrib.messages.storage import default_storage
│ │ │ │  from django.utils.deprecation import MiddlewareMixin
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MessageMiddleware(MiddlewareMixin): │ │ │ │ """ │ │ │ │ Middleware that handles temporary messages. │ │ │ │ """ │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ request._messages = default_storage(request) │ │ │ │ @@ -108,35 +109,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,18 +1,18 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..mmeessssaaggeess..mmiiddddlleewwaarree ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..mmeessssaaggeess..mmiiddddlleewwaarree ************ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.contrib.messages.storage import default_storage │ │ │ │ │ from django.utils.deprecation import MiddlewareMixin │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MessageMiddleware(MiddlewareMixin): │ │ │ │ │ """ │ │ │ │ │ Middleware that handles temporary messages. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ │ request._messages = default_storage(request) │ │ │ │ │ @@ -27,12 +27,12 @@ │ │ │ │ │ # messages storage, so make no assumption that it will be there. │ │ │ │ │ if hasattr(request, "_messages"): │ │ │ │ │ unstored_messages = request._messages.update(response) │ │ │ │ │ if unstored_messages and settings.DEBUG: │ │ │ │ │ raise ValueError("Not all temporary messages could be stored.") │ │ │ │ │ return response │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/constraints.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.postgres.constraints — Django 4.2.13 documentation │ │ │ │ + django.contrib.postgres.constraints — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.postgres.constraints

│ │ │ │ +  

Broncode voor django.contrib.postgres.constraints

│ │ │ │  import warnings
│ │ │ │  
│ │ │ │  from django.contrib.postgres.indexes import OpClass
│ │ │ │  from django.core.exceptions import ValidationError
│ │ │ │  from django.db import DEFAULT_DB_ALIAS, NotSupportedError
│ │ │ │  from django.db.backends.ddl_references import Expressions, Statement, Table
│ │ │ │  from django.db.models import BaseConstraint, Deferrable, F, Q
│ │ │ │ @@ -88,15 +89,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class ExclusionConstraintExpression(IndexExpression):
│ │ │ │      template = "%(expressions)s WITH %(operator)s"
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ExclusionConstraint(BaseConstraint): │ │ │ │ template = ( │ │ │ │ "CONSTRAINT %(name)s EXCLUDE USING %(index_type)s " │ │ │ │ "(%(expressions)s)%(include)s%(where)s%(deferrable)s" │ │ │ │ ) │ │ │ │ │ │ │ │ def __init__( │ │ │ │ @@ -315,35 +316,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..ccoonnssttrraaiinnttss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..ccoonnssttrraaiinnttss ************ │ │ │ │ │ import warnings │ │ │ │ │ │ │ │ │ │ from django.contrib.postgres.indexes import OpClass │ │ │ │ │ from django.core.exceptions import ValidationError │ │ │ │ │ from django.db import DEFAULT_DB_ALIAS, NotSupportedError │ │ │ │ │ from django.db.backends.ddl_references import Expressions, Statement, Table │ │ │ │ │ from django.db.models import BaseConstraint, Deferrable, F, Q │ │ │ │ │ @@ -19,15 +19,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class ExclusionConstraintExpression(IndexExpression): │ │ │ │ │ template = "%(expressions)s WITH %(operator)s" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ExclusionConstraint(BaseConstraint): │ │ │ │ │ template = ( │ │ │ │ │ "CONSTRAINT %(name)s EXCLUDE USING %(index_type)s " │ │ │ │ │ "(%(expressions)s)%(include)s%(where)s%(deferrable)s" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ @@ -248,12 +248,12 @@ │ │ │ │ │ else: │ │ │ │ │ if (self.condition & Exists(queryset.filter(self.condition))).check │ │ │ │ │ ( │ │ │ │ │ replacement_map, using=using │ │ │ │ │ ): │ │ │ │ │ raise ValidationError(self.get_violation_error_message()) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/functions.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.postgres.functions — Django 4.2.13 documentation │ │ │ │ + django.contrib.postgres.functions — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.postgres.functions

│ │ │ │ +  

Broncode voor django.contrib.postgres.functions

│ │ │ │  from django.db.models import DateTimeField, Func, UUIDField
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RandomUUID(Func): │ │ │ │ template = "GEN_RANDOM_UUID()" │ │ │ │ output_field = UUIDField()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class TransactionNow(Func): │ │ │ │ template = "CURRENT_TIMESTAMP" │ │ │ │ output_field = DateTimeField()
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -96,35 +97,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,27 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..ffuunnccttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..ffuunnccttiioonnss ************ │ │ │ │ │ from django.db.models import DateTimeField, Func, UUIDField │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RandomUUID(Func): │ │ │ │ │ template = "GEN_RANDOM_UUID()" │ │ │ │ │ output_field = UUIDField() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TransactionNow(Func): │ │ │ │ │ template = "CURRENT_TIMESTAMP" │ │ │ │ │ output_field = DateTimeField() │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/indexes.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.postgres.indexes — Django 4.2.13 documentation │ │ │ │ + django.contrib.postgres.indexes — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.postgres.indexes

│ │ │ │ +  

Broncode voor django.contrib.postgres.indexes

│ │ │ │  from django.db import NotSupportedError
│ │ │ │  from django.db.models import Func, Index
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  
│ │ │ │  __all__ = [
│ │ │ │      "BloomIndex",
│ │ │ │      "BrinIndex",
│ │ │ │ @@ -112,15 +113,15 @@
│ │ │ │          pass
│ │ │ │  
│ │ │ │      def get_with_params(self):
│ │ │ │          return []
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BloomIndex(PostgresIndex): │ │ │ │ suffix = "bloom" │ │ │ │ │ │ │ │ def __init__(self, *expressions, length=None, columns=(), **kwargs): │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ if len(self.fields) > 32: │ │ │ │ raise ValueError("Bloom indexes support a maximum of 32 fields.") │ │ │ │ @@ -156,15 +157,15 @@ │ │ │ │ "col%d = %d" % (i, v) for i, v in enumerate(self.columns, start=1) │ │ │ │ ) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BrinIndex(PostgresIndex): │ │ │ │ suffix = "brin" │ │ │ │ │ │ │ │ def __init__( │ │ │ │ self, *expressions, autosummarize=None, pages_per_range=None, **kwargs │ │ │ │ ): │ │ │ │ if pages_per_range is not None and pages_per_range <= 0: │ │ │ │ @@ -190,15 +191,15 @@ │ │ │ │ if self.pages_per_range is not None: │ │ │ │ with_params.append("pages_per_range = %d" % self.pages_per_range) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BTreeIndex(PostgresIndex): │ │ │ │ suffix = "btree" │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ self.fillfactor = fillfactor │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ @@ -213,15 +214,15 @@ │ │ │ │ if self.fillfactor is not None: │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GinIndex(PostgresIndex): │ │ │ │ suffix = "gin" │ │ │ │ │ │ │ │ def __init__( │ │ │ │ self, *expressions, fastupdate=None, gin_pending_list_limit=None, **kwargs │ │ │ │ ): │ │ │ │ self.fastupdate = fastupdate │ │ │ │ @@ -245,15 +246,15 @@ │ │ │ │ if self.fastupdate is not None: │ │ │ │ with_params.append("fastupdate = %s" % ("on" if self.fastupdate else "off")) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GistIndex(PostgresIndex): │ │ │ │ suffix = "gist" │ │ │ │ │ │ │ │ def __init__(self, *expressions, buffering=None, fillfactor=None, **kwargs): │ │ │ │ self.buffering = buffering │ │ │ │ self.fillfactor = fillfactor │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ @@ -273,15 +274,15 @@ │ │ │ │ if self.fillfactor is not None: │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class HashIndex(PostgresIndex): │ │ │ │ suffix = "hash" │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ self.fillfactor = fillfactor │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ @@ -296,15 +297,15 @@ │ │ │ │ if self.fillfactor is not None: │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ return with_params
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SpGistIndex(PostgresIndex): │ │ │ │ suffix = "spgist" │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ self.fillfactor = fillfactor │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ @@ -326,15 +327,15 @@ │ │ │ │ and not schema_editor.connection.features.supports_covering_spgist_indexes │ │ │ │ ): │ │ │ │ raise NotSupportedError("Covering SP-GiST indexes require PostgreSQL 14+.")
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class OpClass(Func): │ │ │ │ template = "%(expressions)s %(name)s" │ │ │ │ │ │ │ │ def __init__(self, expression, name): │ │ │ │ super().__init__(expression, name=name)
│ │ │ │ │ │ │ │
│ │ │ │ @@ -345,35 +346,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..iinnddeexxeess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..iinnddeexxeess ************ │ │ │ │ │ from django.db import NotSupportedError │ │ │ │ │ from django.db.models import Func, Index │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ │ │ │ │ │ __all__ = [ │ │ │ │ │ "BloomIndex", │ │ │ │ │ "BrinIndex", │ │ │ │ │ @@ -44,15 +44,15 @@ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ def get_with_params(self): │ │ │ │ │ return [] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BloomIndex(PostgresIndex): │ │ │ │ │ suffix = "bloom" │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, length=None, columns=(), **kwargs): │ │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ if len(self.fields) > 32: │ │ │ │ │ raise ValueError("Bloom indexes support a maximum of 32 fields.") │ │ │ │ │ @@ -91,15 +91,15 @@ │ │ │ │ │ ) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BrinIndex(PostgresIndex): │ │ │ │ │ suffix = "brin" │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, *expressions, autosummarize=None, pages_per_range=None, **kwargs │ │ │ │ │ ): │ │ │ │ │ if pages_per_range is not None and pages_per_range <= 0: │ │ │ │ │ @@ -127,15 +127,15 @@ │ │ │ │ │ with_params.append("pages_per_range = %d" % self.pages_per_range) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BTreeIndex(PostgresIndex): │ │ │ │ │ suffix = "btree" │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ │ self.fillfactor = fillfactor │ │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ │ │ @@ -151,15 +151,15 @@ │ │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GinIndex(PostgresIndex): │ │ │ │ │ suffix = "gin" │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, *expressions, fastupdate=None, gin_pending_list_limit=None, │ │ │ │ │ **kwargs │ │ │ │ │ ): │ │ │ │ │ @@ -186,15 +186,15 @@ │ │ │ │ │ else "off")) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GistIndex(PostgresIndex): │ │ │ │ │ suffix = "gist" │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, buffering=None, fillfactor=None, │ │ │ │ │ **kwargs): │ │ │ │ │ self.buffering = buffering │ │ │ │ │ self.fillfactor = fillfactor │ │ │ │ │ @@ -217,15 +217,15 @@ │ │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class HashIndex(PostgresIndex): │ │ │ │ │ suffix = "hash" │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ │ self.fillfactor = fillfactor │ │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ with_params.append("fillfactor = %d" % self.fillfactor) │ │ │ │ │ return with_params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SpGistIndex(PostgresIndex): │ │ │ │ │ suffix = "spgist" │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, fillfactor=None, **kwargs): │ │ │ │ │ self.fillfactor = fillfactor │ │ │ │ │ super().__init__(*expressions, **kwargs) │ │ │ │ │ │ │ │ │ │ @@ -274,19 +274,19 @@ │ │ │ │ │ raise NotSupportedError("Covering SP-GiST indexes require │ │ │ │ │ PostgreSQL 14+.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OpClass(Func): │ │ │ │ │ template = "%(expressions)s %(name)s" │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, name): │ │ │ │ │ super().__init__(expression, name=name) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/search.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.postgres.search — Django 4.2.13 documentation │ │ │ │ + django.contrib.postgres.search — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ @@ -493,35 +494,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..sseeaarrcchh ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..sseeaarrcchh ************ │ │ │ │ │ from django.db.models import ( │ │ │ │ │ CharField, │ │ │ │ │ Expression, │ │ │ │ │ Field, │ │ │ │ │ FloatField, │ │ │ │ │ Func, │ │ │ │ │ Lookup, │ │ │ │ │ @@ -31,15 +31,15 @@ │ │ │ │ │ lhs, lhs_params = self.process_lhs(qn, connection) │ │ │ │ │ rhs, rhs_params = self.process_rhs(qn, connection) │ │ │ │ │ params = lhs_params + rhs_params │ │ │ │ │ return "%s @@ %s" % (lhs, rhs), params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SearchVectorField(Field): │ │ │ │ │ def db_type(self, connection): │ │ │ │ │ return "tsvector" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │ │ register_combinable_fields( │ │ │ │ │ SearchVectorField, SearchVectorCombinable.ADD, SearchVectorField, │ │ │ │ │ SearchVectorField │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SearchVector(SearchVectorCombinable, Func): │ │ │ │ │ function = "to_tsvector" │ │ │ │ │ arg_joiner = " || ' ' || " │ │ │ │ │ output_field = SearchVectorField() │ │ │ │ │ │ │ │ │ │ def __init__(self, *expressions, config=None, weight=None): │ │ │ │ │ super().__init__(*expressions) │ │ │ │ │ @@ -196,15 +196,15 @@ │ │ │ │ │ return self._combine(other, self.BITAND, False) │ │ │ │ │ │ │ │ │ │ def __rand__(self, other): │ │ │ │ │ return self._combine(other, self.BITAND, True) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SearchQuery(SearchQueryCombinable, Func): │ │ │ │ │ output_field = SearchQueryField() │ │ │ │ │ SEARCH_TYPES = { │ │ │ │ │ "plain": "plainto_tsquery", │ │ │ │ │ "phrase": "phraseto_tsquery", │ │ │ │ │ "raw": "to_tsquery", │ │ │ │ │ "websearch": "websearch_to_tsquery", │ │ │ │ │ @@ -256,15 +256,15 @@ │ │ │ │ │ super().__init__(lhs, connector, rhs, output_field) │ │ │ │ │ │ │ │ │ │ def __str__(self): │ │ │ │ │ return "(%s)" % super().__str__() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SearchRank(Func): │ │ │ │ │ function = "ts_rank" │ │ │ │ │ output_field = FloatField() │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ vector, │ │ │ │ │ @@ -293,15 +293,15 @@ │ │ │ │ │ self.function = "ts_rank_cd" │ │ │ │ │ super().__init__(*expressions) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SearchHeadline(Func): │ │ │ │ │ function = "ts_headline" │ │ │ │ │ template = "%(function)s(%(expressions)s%(options)s)" │ │ │ │ │ output_field = TextField() │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ @@ -381,59 +381,59 @@ │ │ │ │ │ def __init__(self, string, expression, **extra): │ │ │ │ │ if not hasattr(string, "resolve_expression"): │ │ │ │ │ string = Value(string) │ │ │ │ │ super().__init__(string, expression, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramSimilarity(TrigramBase): │ │ │ │ │ function = "SIMILARITY" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramDistance(TrigramBase): │ │ │ │ │ function = "" │ │ │ │ │ arg_joiner = " <-> " │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramWordDistance(TrigramWordBase): │ │ │ │ │ function = "" │ │ │ │ │ arg_joiner = " <<-> " │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramStrictWordDistance(TrigramWordBase): │ │ │ │ │ function = "" │ │ │ │ │ arg_joiner = " <<<-> " │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramWordSimilarity(TrigramWordBase): │ │ │ │ │ function = "WORD_SIMILARITY" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TrigramStrictWordSimilarity(TrigramWordBase): │ │ │ │ │ function = "STRICT_WORD_SIMILARITY" │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/postgres/validators.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.postgres.validators — Django 4.2.13 documentation │ │ │ │ + django.contrib.postgres.validators — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.postgres.validators

│ │ │ │ +  

Broncode voor django.contrib.postgres.validators

│ │ │ │  from django.core.exceptions import ValidationError
│ │ │ │  from django.core.validators import (
│ │ │ │      MaxLengthValidator,
│ │ │ │      MaxValueValidator,
│ │ │ │      MinLengthValidator,
│ │ │ │      MinValueValidator,
│ │ │ │  )
│ │ │ │ @@ -100,15 +101,15 @@
│ │ │ │          "List contains %(show_value)d items, it should contain no fewer than "
│ │ │ │          "%(limit_value)d.",
│ │ │ │          "limit_value",
│ │ │ │      )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class KeysValidator: │ │ │ │ """A validator designed for HStore to require/restrict keys.""" │ │ │ │ │ │ │ │ messages = { │ │ │ │ "missing_keys": _("Some keys were missing: %(keys)s"), │ │ │ │ "extra_keys": _("Some unknown keys were provided: %(keys)s"), │ │ │ │ @@ -146,27 +147,27 @@ │ │ │ │ and self.messages == other.messages │ │ │ │ and self.strict == other.strict │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RangeMaxValueValidator(MaxValueValidator): │ │ │ │ def compare(self, a, b): │ │ │ │ return a.upper is None or a.upper > b │ │ │ │ │ │ │ │ message = _( │ │ │ │ "Ensure that the upper bound of the range is not greater than %(limit_value)s." │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RangeMinValueValidator(MinValueValidator): │ │ │ │ def compare(self, a, b): │ │ │ │ return a.lower is None or a.lower < b │ │ │ │ │ │ │ │ message = _( │ │ │ │ "Ensure that the lower bound of the range is not less than %(limit_value)s." │ │ │ │ )
│ │ │ │ @@ -179,35 +180,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..vvaalliiddaattoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ppoossttggrreess..vvaalliiddaattoorrss ************ │ │ │ │ │ from django.core.exceptions import ValidationError │ │ │ │ │ from django.core.validators import ( │ │ │ │ │ MaxLengthValidator, │ │ │ │ │ MaxValueValidator, │ │ │ │ │ MinLengthValidator, │ │ │ │ │ MinValueValidator, │ │ │ │ │ ) │ │ │ │ │ @@ -31,15 +31,15 @@ │ │ │ │ │ "List contains %(show_value)d items, it should contain no fewer than " │ │ │ │ │ "%(limit_value)d.", │ │ │ │ │ "limit_value", │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class KeysValidator: │ │ │ │ │ """A validator designed for HStore to require/restrict keys.""" │ │ │ │ │ │ │ │ │ │ messages = { │ │ │ │ │ "missing_keys": _("Some keys were missing: %(keys)s"), │ │ │ │ │ "extra_keys": _("Some unknown keys were provided: %(keys)s"), │ │ │ │ │ @@ -78,36 +78,36 @@ │ │ │ │ │ and self.strict == other.strict │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RangeMaxValueValidator(MaxValueValidator): │ │ │ │ │ def compare(self, a, b): │ │ │ │ │ return a.upper is None or a.upper > b │ │ │ │ │ │ │ │ │ │ message = _( │ │ │ │ │ "Ensure that the upper bound of the range is not greater than % │ │ │ │ │ (limit_value)s." │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RangeMinValueValidator(MinValueValidator): │ │ │ │ │ def compare(self, a, b): │ │ │ │ │ return a.lower is None or a.lower < b │ │ │ │ │ │ │ │ │ │ message = _( │ │ │ │ │ "Ensure that the lower bound of the range is not less than % │ │ │ │ │ (limit_value)s." │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/exceptions.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.sessions.exceptions — Django 4.2.13 documentation │ │ │ │ + django.contrib.sessions.exceptions — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.sessions.exceptions

│ │ │ │ +  

Broncode voor django.contrib.sessions.exceptions

│ │ │ │  from django.core.exceptions import BadRequest, SuspiciousOperation
│ │ │ │  
│ │ │ │  
│ │ │ │  class InvalidSessionKey(SuspiciousOperation):
│ │ │ │      """Invalid characters in session key"""
│ │ │ │  
│ │ │ │      pass
│ │ │ │ @@ -83,15 +84,15 @@
│ │ │ │  class SuspiciousSession(SuspiciousOperation):
│ │ │ │      """The session may be tampered with"""
│ │ │ │  
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SessionInterrupted(BadRequest): │ │ │ │ """The session was interrupted.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -101,35 +102,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..sseessssiioonnss..eexxcceeppttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..sseessssiioonnss..eexxcceeppttiioonnss ************ │ │ │ │ │ from django.core.exceptions import BadRequest, SuspiciousOperation │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class InvalidSessionKey(SuspiciousOperation): │ │ │ │ │ """Invalid characters in session key""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ @@ -14,18 +14,18 @@ │ │ │ │ │ class SuspiciousSession(SuspiciousOperation): │ │ │ │ │ """The session may be tampered with""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SessionInterrupted(BadRequest): │ │ │ │ │ """The session was interrupted.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sessions/middleware.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.sessions.middleware — Django 4.2.13 documentation │ │ │ │ + django.contrib.sessions.middleware — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.sessions.middleware

│ │ │ │ +  

Broncode voor django.contrib.sessions.middleware

│ │ │ │  import time
│ │ │ │  from importlib import import_module
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.contrib.sessions.backends.base import UpdateError
│ │ │ │  from django.contrib.sessions.exceptions import SessionInterrupted
│ │ │ │  from django.utils.cache import patch_vary_headers
│ │ │ │  from django.utils.deprecation import MiddlewareMixin
│ │ │ │  from django.utils.http import http_date
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SessionMiddleware(MiddlewareMixin): │ │ │ │ def __init__(self, get_response): │ │ │ │ super().__init__(get_response) │ │ │ │ engine = import_module(settings.SESSION_ENGINE) │ │ │ │ self.SessionStore = engine.SessionStore │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ @@ -159,35 +160,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..sseessssiioonnss..mmiiddddlleewwaarree ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..sseessssiioonnss..mmiiddddlleewwaarree ************ │ │ │ │ │ import time │ │ │ │ │ from importlib import import_module │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.contrib.sessions.backends.base import UpdateError │ │ │ │ │ from django.contrib.sessions.exceptions import SessionInterrupted │ │ │ │ │ from django.utils.cache import patch_vary_headers │ │ │ │ │ from django.utils.deprecation import MiddlewareMixin │ │ │ │ │ from django.utils.http import http_date │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SessionMiddleware(MiddlewareMixin): │ │ │ │ │ def __init__(self, get_response): │ │ │ │ │ super().__init__(get_response) │ │ │ │ │ engine = import_module(settings.SESSION_ENGINE) │ │ │ │ │ self.SessionStore = engine.SessionStore │ │ │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ │ @@ -78,12 +78,12 @@ │ │ │ │ │ path=settings.SESSION_COOKIE_PATH, │ │ │ │ │ secure=settings.SESSION_COOKIE_SECURE or None, │ │ │ │ │ httponly=settings.SESSION_COOKIE_HTTPONLY or None, │ │ │ │ │ samesite=settings.SESSION_COOKIE_SAMESITE, │ │ │ │ │ ) │ │ │ │ │ return response │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sitemaps.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.sitemaps — Django 4.2.13 documentation │ │ │ │ + django.contrib.sitemaps — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.sitemaps

│ │ │ │ +  

Broncode voor django.contrib.sitemaps

│ │ │ │  import warnings
│ │ │ │  from urllib.parse import urlencode
│ │ │ │  from urllib.request import urlopen
│ │ │ │  
│ │ │ │  from django.apps import apps as django_apps
│ │ │ │  from django.conf import settings
│ │ │ │  from django.core import paginator
│ │ │ │ @@ -87,15 +88,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class SitemapNotFound(Exception):
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def ping_google(sitemap_url=None, ping_url=PING_URL, sitemap_uses_https=True): │ │ │ │ """ │ │ │ │ Alert Google that the sitemap for the current site has been updated. │ │ │ │ If sitemap_url is provided, it should be an absolute path to the sitemap │ │ │ │ for this site -- e.g., '/sitemap.xml'. If sitemap_url is not provided, this │ │ │ │ function will attempt to deduce it by using urls.reverse(). │ │ │ │ """ │ │ │ │ @@ -131,15 +132,15 @@ │ │ │ │ Site = django_apps.get_model("sites.Site") │ │ │ │ current_site = Site.objects.get_current() │ │ │ │ scheme = "https" if sitemap_uses_https else "http" │ │ │ │ return "%s://%s%s" % (scheme, current_site.domain, sitemap_url) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Sitemap: │ │ │ │ # This limit is defined by Google. See the index documentation at │ │ │ │ # https://www.sitemaps.org/protocol.html#index. │ │ │ │ limit = 50000 │ │ │ │ │ │ │ │ # If protocol is None, the URLs in the sitemap will use the protocol │ │ │ │ # with which the sitemap was requested. │ │ │ │ @@ -167,15 +168,15 @@ │ │ │ │ # Split the (item, lang_code) tuples again for the location, │ │ │ │ # priority, lastmod and changefreq method calls. │ │ │ │ item, lang_code = item │ │ │ │ return attr(item) │ │ │ │ return attr │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_languages_for_item(self, item): │ │ │ │ """Languages for which this item is displayed.""" │ │ │ │ return self._languages()
│ │ │ │ │ │ │ │ │ │ │ │ def _languages(self): │ │ │ │ if self.languages is not None: │ │ │ │ @@ -203,21 +204,21 @@ │ │ │ │ return self._get("location", item) │ │ │ │ │ │ │ │ @property │ │ │ │ def paginator(self): │ │ │ │ return paginator.Paginator(self._items(), self.limit) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def items(self): │ │ │ │ return []
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def location(self, item): │ │ │ │ return item.get_absolute_url()
│ │ │ │ │ │ │ │ │ │ │ │ def get_protocol(self, protocol=None): │ │ │ │ # Determine protocol │ │ │ │ if self.protocol is None and protocol is None: │ │ │ │ @@ -250,15 +251,15 @@ │ │ │ │ │ │ │ │ def get_urls(self, page=1, site=None, protocol=None): │ │ │ │ protocol = self.get_protocol(protocol) │ │ │ │ domain = self.get_domain(site) │ │ │ │ return self._urls(page, protocol, domain) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_latest_lastmod(self): │ │ │ │ if not hasattr(self, "lastmod"): │ │ │ │ return None │ │ │ │ if callable(self.lastmod): │ │ │ │ try: │ │ │ │ return max([self.lastmod(item) for item in self.items()], default=None) │ │ │ │ except TypeError: │ │ │ │ @@ -321,15 +322,15 @@ │ │ │ │ self.latest_lastmod = latest_lastmod │ │ │ │ │ │ │ │ return urls
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class GenericSitemap(Sitemap): │ │ │ │ priority = None │ │ │ │ changefreq = None │ │ │ │ │ │ │ │ def __init__(self, info_dict, priority=None, changefreq=None, protocol=None): │ │ │ │ self.queryset = info_dict["queryset"] │ │ │ │ self.date_field = info_dict.get("date_field") │ │ │ │ @@ -363,35 +364,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ssiitteemmaappss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ssiitteemmaappss ************ │ │ │ │ │ import warnings │ │ │ │ │ from urllib.parse import urlencode │ │ │ │ │ from urllib.request import urlopen │ │ │ │ │ │ │ │ │ │ from django.apps import apps as django_apps │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.core import paginator │ │ │ │ │ @@ -18,15 +18,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class SitemapNotFound(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def ping_google(sitemap_url=None, ping_url=PING_URL, sitemap_uses_https=True): │ │ │ │ │ """ │ │ │ │ │ Alert Google that the sitemap for the current site has been updated. │ │ │ │ │ If sitemap_url is provided, it should be an absolute path to the sitemap │ │ │ │ │ for this site -- e.g., '/sitemap.xml'. If sitemap_url is not provided, this │ │ │ │ │ function will attempt to deduce it by using urls.reverse(). │ │ │ │ │ """ │ │ │ │ │ @@ -64,15 +64,15 @@ │ │ │ │ │ Site = django_apps.get_model("sites.Site") │ │ │ │ │ current_site = Site.objects.get_current() │ │ │ │ │ scheme = "https" if sitemap_uses_https else "http" │ │ │ │ │ return "%s://%s%s" % (scheme, current_site.domain, sitemap_url) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Sitemap: │ │ │ │ │ # This limit is defined by Google. See the index documentation at │ │ │ │ │ # https://www.sitemaps.org/protocol.html#index. │ │ │ │ │ limit = 50000 │ │ │ │ │ │ │ │ │ │ # If protocol is None, the URLs in the sitemap will use the protocol │ │ │ │ │ # with which the sitemap was requested. │ │ │ │ │ @@ -100,15 +100,15 @@ │ │ │ │ │ # Split the (item, lang_code) tuples again for the location, │ │ │ │ │ # priority, lastmod and changefreq method calls. │ │ │ │ │ item, lang_code = item │ │ │ │ │ return attr(item) │ │ │ │ │ return attr │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_languages_for_item(self, item): │ │ │ │ │ """Languages for which this item is displayed.""" │ │ │ │ │ return self._languages() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def _languages(self): │ │ │ │ │ @@ -139,22 +139,22 @@ │ │ │ │ │ return self._get("location", item) │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def paginator(self): │ │ │ │ │ return paginator.Paginator(self._items(), self.limit) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def items(self): │ │ │ │ │ return [] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def location(self, item): │ │ │ │ │ return item.get_absolute_url() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def get_protocol(self, protocol=None): │ │ │ │ │ # Determine protocol │ │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ │ │ │ │ │ │ def get_urls(self, page=1, site=None, protocol=None): │ │ │ │ │ protocol = self.get_protocol(protocol) │ │ │ │ │ domain = self.get_domain(site) │ │ │ │ │ return self._urls(page, protocol, domain) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_latest_lastmod(self): │ │ │ │ │ if not hasattr(self, "lastmod"): │ │ │ │ │ return None │ │ │ │ │ if callable(self.lastmod): │ │ │ │ │ try: │ │ │ │ │ return max([self.lastmod(item) for item in self.items()], │ │ │ │ │ default=None) │ │ │ │ │ @@ -265,15 +265,15 @@ │ │ │ │ │ │ │ │ │ │ return urls │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class GenericSitemap(Sitemap): │ │ │ │ │ priority = None │ │ │ │ │ changefreq = None │ │ │ │ │ │ │ │ │ │ def __init__(self, info_dict, priority=None, changefreq=None, │ │ │ │ │ protocol=None): │ │ │ │ │ self.queryset = info_dict["queryset"] │ │ │ │ │ @@ -296,12 +296,12 @@ │ │ │ │ │ return ( │ │ │ │ │ self.queryset.order_by("-" + self.date_field) │ │ │ │ │ .values_list(self.date_field, flat=True) │ │ │ │ │ .first() │ │ │ │ │ ) │ │ │ │ │ return None │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/contrib/sites/middleware.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.contrib.sites.middleware — Django 4.2.13 documentation │ │ │ │ + django.contrib.sites.middleware — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.contrib.sites.middleware

│ │ │ │ +  

Broncode voor django.contrib.sites.middleware

│ │ │ │  from django.utils.deprecation import MiddlewareMixin
│ │ │ │  
│ │ │ │  from .shortcuts import get_current_site
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CurrentSiteMiddleware(MiddlewareMixin): │ │ │ │ """ │ │ │ │ Middleware that sets `site` attribute to request object. │ │ │ │ """ │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ request.site = get_current_site(request)
│ │ │ │ @@ -94,35 +95,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoonnttrriibb..ssiitteess..mmiiddddlleewwaarree ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoonnttrriibb..ssiitteess..mmiiddddlleewwaarree ************ │ │ │ │ │ from django.utils.deprecation import MiddlewareMixin │ │ │ │ │ │ │ │ │ │ from .shortcuts import get_current_site │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CurrentSiteMiddleware(MiddlewareMixin): │ │ │ │ │ """ │ │ │ │ │ Middleware that sets `site` attribute to request object. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def process_request(self, request): │ │ │ │ │ request.site = get_current_site(request) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/checks/messages.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.checks.messages — Django 4.2.13 documentation │ │ │ │ + django.core.checks.messages — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.checks.messages

│ │ │ │ +  

Broncode voor django.core.checks.messages

│ │ │ │  # Levels
│ │ │ │  DEBUG = 10
│ │ │ │  INFO = 20
│ │ │ │  WARNING = 30
│ │ │ │  ERROR = 40
│ │ │ │  CRITICAL = 50
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CheckMessage: │ │ │ │ def __init__(self, level, msg, hint=None, obj=None, id=None): │ │ │ │ if not isinstance(level, int): │ │ │ │ raise TypeError("The first argument should be level.") │ │ │ │ self.level = level │ │ │ │ self.msg = msg │ │ │ │ self.hint = hint │ │ │ │ @@ -129,47 +130,47 @@ │ │ │ │ from django.conf import settings │ │ │ │ │ │ │ │ return self.id in settings.SILENCED_SYSTEM_CHECKS
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Debug(CheckMessage): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ super().__init__(DEBUG, *args, **kwargs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Info(CheckMessage): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ super().__init__(INFO, *args, **kwargs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Warning(CheckMessage): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ super().__init__(WARNING, *args, **kwargs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Error(CheckMessage): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ super().__init__(ERROR, *args, **kwargs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Critical(CheckMessage): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ super().__init__(CRITICAL, *args, **kwargs)
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ @@ -178,35 +179,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,21 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..cchheecckkss..mmeessssaaggeess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..cchheecckkss..mmeessssaaggeess ************ │ │ │ │ │ # Levels │ │ │ │ │ DEBUG = 10 │ │ │ │ │ INFO = 20 │ │ │ │ │ WARNING = 30 │ │ │ │ │ ERROR = 40 │ │ │ │ │ CRITICAL = 50 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CheckMessage: │ │ │ │ │ def __init__(self, level, msg, hint=None, obj=None, id=None): │ │ │ │ │ if not isinstance(level, int): │ │ │ │ │ raise TypeError("The first argument should be level.") │ │ │ │ │ self.level = level │ │ │ │ │ self.msg = msg │ │ │ │ │ self.hint = hint │ │ │ │ │ @@ -62,53 +62,53 @@ │ │ │ │ │ │ │ │ │ │ return self.id in settings.SILENCED_SYSTEM_CHECKS │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Debug(CheckMessage): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ super().__init__(DEBUG, *args, **kwargs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Info(CheckMessage): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ super().__init__(INFO, *args, **kwargs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Warning(CheckMessage): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ super().__init__(WARNING, *args, **kwargs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Error(CheckMessage): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ super().__init__(ERROR, *args, **kwargs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Critical(CheckMessage): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ super().__init__(CRITICAL, *args, **kwargs) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/exceptions.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.exceptions — Django 4.2.13 documentation │ │ │ │ + django.core.exceptions — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.exceptions

│ │ │ │ +  

Broncode voor django.core.exceptions

│ │ │ │  """
│ │ │ │  Global Django exception and warning classes.
│ │ │ │  """
│ │ │ │  import operator
│ │ │ │  
│ │ │ │  from django.utils.hashable import make_hashable
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FieldDoesNotExist(Exception): │ │ │ │ """The requested model field does not exist""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AppRegistryNotReady(Exception): │ │ │ │ """The django.apps registry is not populated yet""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ObjectDoesNotExist(Exception): │ │ │ │ """The requested object does not exist""" │ │ │ │ │ │ │ │ silent_variable_failure = True
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MultipleObjectsReturned(Exception): │ │ │ │ """The query returned multiple objects when only one was expected.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SuspiciousOperation(Exception): │ │ │ │ """The user did something suspicious"""
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class SuspiciousMultipartForm(SuspiciousOperation): │ │ │ │ """Suspect MIME request in multipart form data""" │ │ │ │ @@ -170,81 +171,81 @@ │ │ │ │ settings.DATA_UPLOAD_MAX_MEMORY_SIZE. │ │ │ │ """ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RequestAborted(Exception): │ │ │ │ """The request was closed before it was completed, or timed out.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BadRequest(Exception): │ │ │ │ """The request is malformed and cannot be processed.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PermissionDenied(Exception): │ │ │ │ """The user did not have permission to do that""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ViewDoesNotExist(Exception): │ │ │ │ """The requested view does not exist""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MiddlewareNotUsed(Exception): │ │ │ │ """This middleware is not used in this server configuration""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ImproperlyConfigured(Exception): │ │ │ │ """Django is somehow improperly configured""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FieldError(Exception): │ │ │ │ """Some kind of problem with a model field.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ NON_FIELD_ERRORS = "__all__" │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ValidationError(Exception): │ │ │ │ """An error while validating data.""" │ │ │ │ │ │ │ │ def __init__(self, message, code=None, params=None): │ │ │ │ """ │ │ │ │ The `message` argument can be a single error, a list of errors, or a │ │ │ │ dictionary that maps field names to lists of errors. What we define as │ │ │ │ @@ -345,33 +346,33 @@ │ │ │ │ if hasattr(self, "error_dict"): │ │ │ │ return hash(make_hashable(self.error_dict)) │ │ │ │ return hash(tuple(sorted(self.error_list, key=operator.attrgetter("message"))))
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class EmptyResultSet(Exception): │ │ │ │ """A database query predicate is impossible.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FullResultSet(Exception): │ │ │ │ """A database query predicate is matches everything.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SynchronousOnlyOperation(Exception): │ │ │ │ """The user tried to call a sync-only function from an async context.""" │ │ │ │ │ │ │ │ pass
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -381,35 +382,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,61 +1,61 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..eexxcceeppttiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..eexxcceeppttiioonnss ************ │ │ │ │ │ """ │ │ │ │ │ Global Django exception and warning classes. │ │ │ │ │ """ │ │ │ │ │ import operator │ │ │ │ │ │ │ │ │ │ from django.utils.hashable import make_hashable │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FieldDoesNotExist(Exception): │ │ │ │ │ """The requested model field does not exist""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AppRegistryNotReady(Exception): │ │ │ │ │ """The django.apps registry is not populated yet""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ObjectDoesNotExist(Exception): │ │ │ │ │ """The requested object does not exist""" │ │ │ │ │ │ │ │ │ │ silent_variable_failure = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MultipleObjectsReturned(Exception): │ │ │ │ │ """The query returned multiple objects when only one was expected.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SuspiciousOperation(Exception): │ │ │ │ │ """The user did something suspicious""" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class SuspiciousMultipartForm(SuspiciousOperation): │ │ │ │ │ @@ -106,88 +106,88 @@ │ │ │ │ │ settings.DATA_UPLOAD_MAX_MEMORY_SIZE. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RequestAborted(Exception): │ │ │ │ │ """The request was closed before it was completed, or timed out.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BadRequest(Exception): │ │ │ │ │ """The request is malformed and cannot be processed.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PermissionDenied(Exception): │ │ │ │ │ """The user did not have permission to do that""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ViewDoesNotExist(Exception): │ │ │ │ │ """The requested view does not exist""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MiddlewareNotUsed(Exception): │ │ │ │ │ """This middleware is not used in this server configuration""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ImproperlyConfigured(Exception): │ │ │ │ │ """Django is somehow improperly configured""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FieldError(Exception): │ │ │ │ │ """Some kind of problem with a model field.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ NON_FIELD_ERRORS = "__all__" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ValidationError(Exception): │ │ │ │ │ """An error while validating data.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, message, code=None, params=None): │ │ │ │ │ """ │ │ │ │ │ The `message` argument can be a single error, a list of errors, or a │ │ │ │ │ dictionary that maps field names to lists of errors. What we define as │ │ │ │ │ @@ -292,38 +292,38 @@ │ │ │ │ │ return hash(tuple(sorted(self.error_list, key=operator.attrgetter │ │ │ │ │ ("message")))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class EmptyResultSet(Exception): │ │ │ │ │ """A database query predicate is impossible.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FullResultSet(Exception): │ │ │ │ │ """A database query predicate is matches everything.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SynchronousOnlyOperation(Exception): │ │ │ │ │ """The user tried to call a sync-only function from an async context.""" │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/base.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.base — Django 4.2.13 documentation │ │ │ │ + django.core.files.base — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.base

│ │ │ │ +  

Broncode voor django.core.files.base

│ │ │ │  import os
│ │ │ │  from io import BytesIO, StringIO, UnsupportedOperation
│ │ │ │  
│ │ │ │  from django.core.files.utils import FileProxyMixin
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class File(FileProxyMixin): │ │ │ │ DEFAULT_CHUNK_SIZE = 64 * 2**10 │ │ │ │ │ │ │ │ def __init__(self, file, name=None): │ │ │ │ self.file = file │ │ │ │ if name is None: │ │ │ │ name = getattr(file, "name", None) │ │ │ │ @@ -117,15 +118,15 @@ │ │ │ │ self.file.seek(0, os.SEEK_END) │ │ │ │ size = self.file.tell() │ │ │ │ self.file.seek(pos) │ │ │ │ return size │ │ │ │ raise AttributeError("Unable to determine the file's size.") │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def chunks(self, chunk_size=None): │ │ │ │ """ │ │ │ │ Read the file and yield chunks of ``chunk_size`` bytes (defaults to │ │ │ │ ``File.DEFAULT_CHUNK_SIZE``). │ │ │ │ """ │ │ │ │ chunk_size = chunk_size or self.DEFAULT_CHUNK_SIZE │ │ │ │ try: │ │ │ │ @@ -137,28 +138,28 @@ │ │ │ │ data = self.read(chunk_size) │ │ │ │ if not data: │ │ │ │ break │ │ │ │ yield data
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def multiple_chunks(self, chunk_size=None): │ │ │ │ """ │ │ │ │ Return ``True`` if you can expect multiple chunks. │ │ │ │ │ │ │ │ NB: If a particular file representation is in memory, subclasses should │ │ │ │ always return ``False`` -- there's no good reason to read from memory in │ │ │ │ chunks. │ │ │ │ """ │ │ │ │ return self.size > (chunk_size or self.DEFAULT_CHUNK_SIZE)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def __iter__(self): │ │ │ │ # Iterate over this file-like object by newlines │ │ │ │ buffer_ = None │ │ │ │ for chunk in self.chunks(): │ │ │ │ for line in chunk.splitlines(True): │ │ │ │ if buffer_: │ │ │ │ if endswith_cr(buffer_) and not equals_lf(line): │ │ │ │ @@ -186,35 +187,35 @@ │ │ │ │ def __enter__(self): │ │ │ │ return self │ │ │ │ │ │ │ │ def __exit__(self, exc_type, exc_value, tb): │ │ │ │ self.close() │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def open(self, mode=None): │ │ │ │ if not self.closed: │ │ │ │ self.seek(0) │ │ │ │ elif self.name and os.path.exists(self.name): │ │ │ │ self.file = open(self.name, mode or self.mode) │ │ │ │ else: │ │ │ │ raise ValueError("The file cannot be reopened.") │ │ │ │ return self
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def close(self): │ │ │ │ self.file.close()
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ContentFile(File): │ │ │ │ """ │ │ │ │ A File-like object that takes just raw content, rather than an actual file. │ │ │ │ """ │ │ │ │ │ │ │ │ def __init__(self, content, name=None): │ │ │ │ stream_class = StringIO if isinstance(content, str) else BytesIO │ │ │ │ @@ -261,35 +262,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,20 +1,20 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..bbaassee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..bbaassee ************ │ │ │ │ │ import os │ │ │ │ │ from io import BytesIO, StringIO, UnsupportedOperation │ │ │ │ │ │ │ │ │ │ from django.core.files.utils import FileProxyMixin │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class File(FileProxyMixin): │ │ │ │ │ DEFAULT_CHUNK_SIZE = 64 * 2**10 │ │ │ │ │ │ │ │ │ │ def __init__(self, file, name=None): │ │ │ │ │ self.file = file │ │ │ │ │ if name is None: │ │ │ │ │ name = getattr(file, "name", None) │ │ │ │ │ @@ -48,15 +48,15 @@ │ │ │ │ │ self.file.seek(0, os.SEEK_END) │ │ │ │ │ size = self.file.tell() │ │ │ │ │ self.file.seek(pos) │ │ │ │ │ return size │ │ │ │ │ raise AttributeError("Unable to determine the file's size.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def chunks(self, chunk_size=None): │ │ │ │ │ """ │ │ │ │ │ Read the file and yield chunks of ``chunk_size`` bytes (defaults to │ │ │ │ │ ``File.DEFAULT_CHUNK_SIZE``). │ │ │ │ │ """ │ │ │ │ │ chunk_size = chunk_size or self.DEFAULT_CHUNK_SIZE │ │ │ │ │ try: │ │ │ │ │ @@ -69,30 +69,30 @@ │ │ │ │ │ if not data: │ │ │ │ │ break │ │ │ │ │ yield data │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def multiple_chunks(self, chunk_size=None): │ │ │ │ │ """ │ │ │ │ │ Return ``True`` if you can expect multiple chunks. │ │ │ │ │ │ │ │ │ │ NB: If a particular file representation is in memory, subclasses should │ │ │ │ │ always return ``False`` -- there's no good reason to read from memory │ │ │ │ │ in │ │ │ │ │ chunks. │ │ │ │ │ """ │ │ │ │ │ return self.size > (chunk_size or self.DEFAULT_CHUNK_SIZE) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def __iter__(self): │ │ │ │ │ # Iterate over this file-like object by newlines │ │ │ │ │ buffer_ = None │ │ │ │ │ for chunk in self.chunks(): │ │ │ │ │ for line in chunk.splitlines(True): │ │ │ │ │ if buffer_: │ │ │ │ │ if endswith_cr(buffer_) and not equals_lf(line): │ │ │ │ │ @@ -121,37 +121,37 @@ │ │ │ │ │ def __enter__(self): │ │ │ │ │ return self │ │ │ │ │ │ │ │ │ │ def __exit__(self, exc_type, exc_value, tb): │ │ │ │ │ self.close() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def open(self, mode=None): │ │ │ │ │ if not self.closed: │ │ │ │ │ self.seek(0) │ │ │ │ │ elif self.name and os.path.exists(self.name): │ │ │ │ │ self.file = open(self.name, mode or self.mode) │ │ │ │ │ else: │ │ │ │ │ raise ValueError("The file cannot be reopened.") │ │ │ │ │ return self │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def close(self): │ │ │ │ │ self.file.close() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ContentFile(File): │ │ │ │ │ """ │ │ │ │ │ A File-like object that takes just raw content, rather than an actual file. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def __init__(self, content, name=None): │ │ │ │ │ stream_class = StringIO if isinstance(content, str) else BytesIO │ │ │ │ │ @@ -187,12 +187,12 @@ │ │ │ │ │ """Return True if line (a text or bytestring) ends with '\n'.""" │ │ │ │ │ return line.endswith("\n" if isinstance(line, str) else b"\n") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def equals_lf(line): │ │ │ │ │ """Return True if line (a text or bytestring) equals '\n'.""" │ │ │ │ │ return line == ("\n" if isinstance(line, str) else b"\n") │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/images.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.images — Django 4.2.13 documentation │ │ │ │ + django.core.files.images — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.images

│ │ │ │ +  

Broncode voor django.core.files.images

│ │ │ │  """
│ │ │ │  Utility functions for handling images.
│ │ │ │  
│ │ │ │  Requires Pillow as you might imagine.
│ │ │ │  """
│ │ │ │  import struct
│ │ │ │  import zlib
│ │ │ │  
│ │ │ │  from django.core.files import File
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ImageFile(File): │ │ │ │ """ │ │ │ │ A mixin for use alongside django.core.files.base.File, which provides │ │ │ │ additional features for dealing with images. │ │ │ │ """ │ │ │ │ │ │ │ │ @property │ │ │ │ @@ -170,35 +171,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..iimmaaggeess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..iimmaaggeess ************ │ │ │ │ │ """ │ │ │ │ │ Utility functions for handling images. │ │ │ │ │ │ │ │ │ │ Requires Pillow as you might imagine. │ │ │ │ │ """ │ │ │ │ │ import struct │ │ │ │ │ import zlib │ │ │ │ │ │ │ │ │ │ from django.core.files import File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ImageFile(File): │ │ │ │ │ """ │ │ │ │ │ A mixin for use alongside django.core.files.base.File, which provides │ │ │ │ │ additional features for dealing with images. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ @@ -90,12 +90,12 @@ │ │ │ │ │ chunk_size *= 2 │ │ │ │ │ return (None, None) │ │ │ │ │ finally: │ │ │ │ │ if close: │ │ │ │ │ file.close() │ │ │ │ │ else: │ │ │ │ │ file.seek(file_pos) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/base.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.storage.base — Django 4.2.13 documentation │ │ │ │ + django.core.files.storage.base — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.storage.base

│ │ │ │ +  

Broncode voor django.core.files.storage.base

│ │ │ │  import os
│ │ │ │  import pathlib
│ │ │ │  
│ │ │ │  from django.core.exceptions import SuspiciousFileOperation
│ │ │ │  from django.core.files import File
│ │ │ │  from django.core.files.utils import validate_file_name
│ │ │ │  from django.utils.crypto import get_random_string
│ │ │ │  from django.utils.text import get_valid_filename
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Storage: │ │ │ │ """ │ │ │ │ A base storage class, providing some default behaviors that all other │ │ │ │ storage systems can inherit or override, as necessary. │ │ │ │ """ │ │ │ │ │ │ │ │ # The following methods represent a public interface to private methods. │ │ │ │ # These shouldn't be overridden by subclasses unless absolutely necessary. │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def open(self, name, mode="rb"): │ │ │ │ """Retrieve the specified file from storage.""" │ │ │ │ return self._open(name, mode)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save(self, name, content, max_length=None): │ │ │ │ """ │ │ │ │ Save new content to the file specified by name. The content should be │ │ │ │ a proper File object or any Python file-like object, ready to be read │ │ │ │ from the beginning. │ │ │ │ """ │ │ │ │ # Get the proper name for the file, as it will actually be saved. │ │ │ │ @@ -120,36 +121,36 @@ │ │ │ │ validate_file_name(name, allow_relative_path=True) │ │ │ │ return name
│ │ │ │ │ │ │ │ │ │ │ │ # These methods are part of the public API, with default implementations. │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_valid_name(self, name): │ │ │ │ """ │ │ │ │ Return a filename, based on the provided filename, that's suitable for │ │ │ │ use in the target storage system. │ │ │ │ """ │ │ │ │ return get_valid_filename(name)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_alternative_name(self, file_root, file_ext): │ │ │ │ """ │ │ │ │ Return an alternative filename, by adding an underscore and a random 7 │ │ │ │ character alphanumeric string (before the file extension, if one │ │ │ │ exists) to the filename. │ │ │ │ """ │ │ │ │ return "%s_%s%s" % (file_root, get_random_string(7), file_ext)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_available_name(self, name, max_length=None): │ │ │ │ """ │ │ │ │ Return a filename that's free on the target storage system and │ │ │ │ available for new content to be written to. │ │ │ │ """ │ │ │ │ name = str(name).replace("\\", "/") │ │ │ │ dir_name, file_name = os.path.split(name) │ │ │ │ @@ -185,15 +186,15 @@ │ │ │ │ name = os.path.join( │ │ │ │ dir_name, self.get_alternative_name(file_root, file_ext) │ │ │ │ ) │ │ │ │ return name
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def generate_filename(self, filename): │ │ │ │ """ │ │ │ │ Validate the filename by calling get_valid_name() and return a filename │ │ │ │ to be passed to the save() method. │ │ │ │ """ │ │ │ │ filename = str(filename).replace("\\", "/") │ │ │ │ # `filename` may include a path as returned by FileField.upload_to. │ │ │ │ @@ -202,107 +203,107 @@ │ │ │ │ raise SuspiciousFileOperation( │ │ │ │ "Detected path traversal attempt in '%s'" % dirname │ │ │ │ ) │ │ │ │ return os.path.normpath(os.path.join(dirname, self.get_valid_name(filename)))
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def path(self, name): │ │ │ │ """ │ │ │ │ Return a local filesystem path where the file can be retrieved using │ │ │ │ Python's built-in open() function. Storage systems that can't be │ │ │ │ accessed using open() should *not* implement this method. │ │ │ │ """ │ │ │ │ raise NotImplementedError("This backend doesn't support absolute paths.")
│ │ │ │ │ │ │ │ │ │ │ │ # The following methods form the public API for storage systems, but with │ │ │ │ # no default implementations. Subclasses must implement *all* of these. │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete(self, name): │ │ │ │ """ │ │ │ │ Delete the specified file from the storage system. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide a delete() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def exists(self, name): │ │ │ │ """ │ │ │ │ Return True if a file referenced by the given name already exists in the │ │ │ │ storage system, or False if the name is available for a new file. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide an exists() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def listdir(self, path): │ │ │ │ """ │ │ │ │ List the contents of the specified path. Return a 2-tuple of lists: │ │ │ │ the first item being directories, the second item being files. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide a listdir() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def size(self, name): │ │ │ │ """ │ │ │ │ Return the total size, in bytes, of the file specified by name. │ │ │ │ """ │ │ │ │ raise NotImplementedError("subclasses of Storage must provide a size() method")
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def url(self, name): │ │ │ │ """ │ │ │ │ Return an absolute URL where the file's contents can be accessed │ │ │ │ directly by a web browser. │ │ │ │ """ │ │ │ │ raise NotImplementedError("subclasses of Storage must provide a url() method")
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_accessed_time(self, name): │ │ │ │ """ │ │ │ │ Return the last accessed time (as a datetime) of the file specified by │ │ │ │ name. The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide a get_accessed_time() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_created_time(self, name): │ │ │ │ """ │ │ │ │ Return the creation time (as a datetime) of the file specified by name. │ │ │ │ The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide a get_created_time() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_modified_time(self, name): │ │ │ │ """ │ │ │ │ Return the last modified time (as a datetime) of the file specified by │ │ │ │ name. The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of Storage must provide a get_modified_time() method" │ │ │ │ @@ -317,35 +318,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,42 +1,42 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..bbaassee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..bbaassee ************ │ │ │ │ │ import os │ │ │ │ │ import pathlib │ │ │ │ │ │ │ │ │ │ from django.core.exceptions import SuspiciousFileOperation │ │ │ │ │ from django.core.files import File │ │ │ │ │ from django.core.files.utils import validate_file_name │ │ │ │ │ from django.utils.crypto import get_random_string │ │ │ │ │ from django.utils.text import get_valid_filename │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Storage: │ │ │ │ │ """ │ │ │ │ │ A base storage class, providing some default behaviors that all other │ │ │ │ │ storage systems can inherit or override, as necessary. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ # The following methods represent a public interface to private methods. │ │ │ │ │ # These shouldn't be overridden by subclasses unless absolutely necessary. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def open(self, name, mode="rb"): │ │ │ │ │ """Retrieve the specified file from storage.""" │ │ │ │ │ return self._open(name, mode) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save(self, name, content, max_length=None): │ │ │ │ │ """ │ │ │ │ │ Save new content to the file specified by name. The content should be │ │ │ │ │ a proper File object or any Python file-like object, ready to be read │ │ │ │ │ from the beginning. │ │ │ │ │ """ │ │ │ │ │ # Get the proper name for the file, as it will actually be saved. │ │ │ │ │ @@ -53,38 +53,38 @@ │ │ │ │ │ return name │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # These methods are part of the public API, with default implementations. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_valid_name(self, name): │ │ │ │ │ """ │ │ │ │ │ Return a filename, based on the provided filename, that's suitable for │ │ │ │ │ use in the target storage system. │ │ │ │ │ """ │ │ │ │ │ return get_valid_filename(name) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_alternative_name(self, file_root, file_ext): │ │ │ │ │ """ │ │ │ │ │ Return an alternative filename, by adding an underscore and a random 7 │ │ │ │ │ character alphanumeric string (before the file extension, if one │ │ │ │ │ exists) to the filename. │ │ │ │ │ """ │ │ │ │ │ return "%s_%s%s" % (file_root, get_random_string(7), file_ext) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_available_name(self, name, max_length=None): │ │ │ │ │ """ │ │ │ │ │ Return a filename that's free on the target storage system and │ │ │ │ │ available for new content to be written to. │ │ │ │ │ """ │ │ │ │ │ name = str(name).replace("\\", "/") │ │ │ │ │ dir_name, file_name = os.path.split(name) │ │ │ │ │ @@ -121,15 +121,15 @@ │ │ │ │ │ dir_name, self.get_alternative_name(file_root, file_ext) │ │ │ │ │ ) │ │ │ │ │ return name │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def generate_filename(self, filename): │ │ │ │ │ """ │ │ │ │ │ Validate the filename by calling get_valid_name() and return a filename │ │ │ │ │ to be passed to the save() method. │ │ │ │ │ """ │ │ │ │ │ filename = str(filename).replace("\\", "/") │ │ │ │ │ # `filename` may include a path as returned by FileField.upload_to. │ │ │ │ │ @@ -140,15 +140,15 @@ │ │ │ │ │ ) │ │ │ │ │ return os.path.normpath(os.path.join(dirname, self.get_valid_name │ │ │ │ │ (filename))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def path(self, name): │ │ │ │ │ """ │ │ │ │ │ Return a local filesystem path where the file can be retrieved using │ │ │ │ │ Python's built-in open() function. Storage systems that can't be │ │ │ │ │ accessed using open() should *not* implement this method. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError("This backend doesn't support absolute │ │ │ │ │ @@ -156,111 +156,111 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ # The following methods form the public API for storage systems, but with │ │ │ │ │ # no default implementations. Subclasses must implement *all* of these. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete(self, name): │ │ │ │ │ """ │ │ │ │ │ Delete the specified file from the storage system. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide a delete() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def exists(self, name): │ │ │ │ │ """ │ │ │ │ │ Return True if a file referenced by the given name already exists in │ │ │ │ │ the │ │ │ │ │ storage system, or False if the name is available for a new file. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide an exists() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def listdir(self, path): │ │ │ │ │ """ │ │ │ │ │ List the contents of the specified path. Return a 2-tuple of lists: │ │ │ │ │ the first item being directories, the second item being files. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide a listdir() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def size(self, name): │ │ │ │ │ """ │ │ │ │ │ Return the total size, in bytes, of the file specified by name. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError("subclasses of Storage must provide a size() │ │ │ │ │ method") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def url(self, name): │ │ │ │ │ """ │ │ │ │ │ Return an absolute URL where the file's contents can be accessed │ │ │ │ │ directly by a web browser. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError("subclasses of Storage must provide a url() │ │ │ │ │ method") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_accessed_time(self, name): │ │ │ │ │ """ │ │ │ │ │ Return the last accessed time (as a datetime) of the file specified by │ │ │ │ │ name. The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide a get_accessed_time() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_created_time(self, name): │ │ │ │ │ """ │ │ │ │ │ Return the creation time (as a datetime) of the file specified by name. │ │ │ │ │ The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide a get_created_time() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_modified_time(self, name): │ │ │ │ │ """ │ │ │ │ │ Return the last modified time (as a datetime) of the file specified by │ │ │ │ │ name. The datetime will be timezone-aware if USE_TZ=True. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of Storage must provide a get_modified_time() method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/filesystem.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.storage.filesystem — Django 4.2.13 documentation │ │ │ │ + django.core.files.storage.filesystem — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.storage.filesystem

│ │ │ │ +  

Broncode voor django.core.files.storage.filesystem

│ │ │ │  import os
│ │ │ │  from datetime import datetime, timezone
│ │ │ │  from urllib.parse import urljoin
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.core.files import File, locks
│ │ │ │  from django.core.files.move import file_move_safe
│ │ │ │ @@ -85,15 +86,15 @@
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  
│ │ │ │  from .base import Storage
│ │ │ │  from .mixins import StorageSettingsMixin
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible(path="django.core.files.storage.FileSystemStorage") │ │ │ │ class FileSystemStorage(Storage, StorageSettingsMixin): │ │ │ │ """ │ │ │ │ Standard filesystem storage │ │ │ │ """ │ │ │ │ │ │ │ │ # The combination of O_CREAT and O_EXCL makes os.open() raise OSError if │ │ │ │ @@ -272,15 +273,15 @@ │ │ │ │ tz = timezone.utc if settings.USE_TZ else None │ │ │ │ return datetime.fromtimestamp(ts, tz=tz) │ │ │ │ │ │ │ │ def get_accessed_time(self, name): │ │ │ │ return self._datetime_from_timestamp(os.path.getatime(self.path(name))) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_created_time(self, name): │ │ │ │ return self._datetime_from_timestamp(os.path.getctime(self.path(name)))
│ │ │ │ │ │ │ │ │ │ │ │ def get_modified_time(self, name): │ │ │ │ return self._datetime_from_timestamp(os.path.getmtime(self.path(name)))
│ │ │ │ │ │ │ │ @@ -292,35 +293,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..ffiilleessyysstteemm ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..ffiilleessyysstteemm ************ │ │ │ │ │ import os │ │ │ │ │ from datetime import datetime, timezone │ │ │ │ │ from urllib.parse import urljoin │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.core.files import File, locks │ │ │ │ │ from django.core.files.move import file_move_safe │ │ │ │ │ @@ -16,15 +16,15 @@ │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ │ │ │ │ │ from .base import Storage │ │ │ │ │ from .mixins import StorageSettingsMixin │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.core.files.storage.FileSystemStorage") │ │ │ │ │ class FileSystemStorage(Storage, StorageSettingsMixin): │ │ │ │ │ """ │ │ │ │ │ Standard filesystem storage │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ # The combination of O_CREAT and O_EXCL makes os.open() raise OSError if │ │ │ │ │ @@ -208,21 +208,21 @@ │ │ │ │ │ tz = timezone.utc if settings.USE_TZ else None │ │ │ │ │ return datetime.fromtimestamp(ts, tz=tz) │ │ │ │ │ │ │ │ │ │ def get_accessed_time(self, name): │ │ │ │ │ return self._datetime_from_timestamp(os.path.getatime(self.path(name))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_created_time(self, name): │ │ │ │ │ return self._datetime_from_timestamp(os.path.getctime(self.path(name))) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def get_modified_time(self, name): │ │ │ │ │ return self._datetime_from_timestamp(os.path.getmtime(self.path(name))) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage/memory.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.storage.memory — Django 4.2.13 documentation │ │ │ │ + django.core.files.storage.memory — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.storage.memory

│ │ │ │ +  

Broncode voor django.core.files.storage.memory

│ │ │ │  """
│ │ │ │  Based on dj-inmemorystorage (BSD) by Cody Soyland, Seán Hayes, Tore Birkeland,
│ │ │ │  and Nick Presta.
│ │ │ │  """
│ │ │ │  
│ │ │ │  import errno
│ │ │ │  import io
│ │ │ │ @@ -231,15 +232,15 @@
│ │ │ │          if name in self._children:
│ │ │ │              self._update_accessed_time()
│ │ │ │              self._update_modified_time()
│ │ │ │              del self._children[name]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible(path="django.core.files.storage.InMemoryStorage") │ │ │ │ class InMemoryStorage(Storage, StorageSettingsMixin): │ │ │ │ """A storage saving files in memory.""" │ │ │ │ │ │ │ │ def __init__( │ │ │ │ self, │ │ │ │ location=None, │ │ │ │ @@ -372,35 +373,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..mmeemmoorryy ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee..mmeemmoorryy ************ │ │ │ │ │ """ │ │ │ │ │ Based on dj-inmemorystorage (BSD) by Cody Soyland, Seán Hayes, Tore Birkeland, │ │ │ │ │ and Nick Presta. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ import errno │ │ │ │ │ import io │ │ │ │ │ @@ -166,15 +166,15 @@ │ │ │ │ │ if name in self._children: │ │ │ │ │ self._update_accessed_time() │ │ │ │ │ self._update_modified_time() │ │ │ │ │ del self._children[name] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.core.files.storage.InMemoryStorage") │ │ │ │ │ class InMemoryStorage(Storage, StorageSettingsMixin): │ │ │ │ │ """A storage saving files in memory.""" │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ location=None, │ │ │ │ │ @@ -300,12 +300,12 @@ │ │ │ │ │ file_node = self._resolve(name) │ │ │ │ │ return file_node.created_time │ │ │ │ │ │ │ │ │ │ def get_modified_time(self, name): │ │ │ │ │ file_node = self._resolve(name) │ │ │ │ │ return file_node.modified_time │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/storage.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.storage — Django 4.2.13 documentation │ │ │ │ + django.core.files.storage — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.storage

│ │ │ │ +  

Broncode voor django.core.files.storage

│ │ │ │  import warnings
│ │ │ │  
│ │ │ │  from django.conf import DEFAULT_STORAGE_ALIAS, settings
│ │ │ │  from django.utils.deprecation import RemovedInDjango51Warning
│ │ │ │  from django.utils.functional import LazyObject
│ │ │ │  from django.utils.module_loading import import_string
│ │ │ │  
│ │ │ │ @@ -98,27 +99,27 @@
│ │ │ │  GET_STORAGE_CLASS_DEPRECATED_MSG = (
│ │ │ │      "django.core.files.storage.get_storage_class is deprecated in favor of "
│ │ │ │      "using django.core.files.storage.storages."
│ │ │ │  )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_storage_class(import_path=None): │ │ │ │ warnings.warn( │ │ │ │ GET_STORAGE_CLASS_DEPRECATED_MSG, │ │ │ │ RemovedInDjango51Warning, │ │ │ │ stacklevel=2, │ │ │ │ ) │ │ │ │ return import_string(import_path or settings.DEFAULT_FILE_STORAGE)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class DefaultStorage(LazyObject): │ │ │ │ def _setup(self): │ │ │ │ self._wrapped = storages[DEFAULT_STORAGE_ALIAS]
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ storages = StorageHandler() │ │ │ │ @@ -131,35 +132,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..ssttoorraaggee ************ │ │ │ │ │ import warnings │ │ │ │ │ │ │ │ │ │ from django.conf import DEFAULT_STORAGE_ALIAS, settings │ │ │ │ │ from django.utils.deprecation import RemovedInDjango51Warning │ │ │ │ │ from django.utils.functional import LazyObject │ │ │ │ │ from django.utils.module_loading import import_string │ │ │ │ │ │ │ │ │ │ @@ -29,35 +29,35 @@ │ │ │ │ │ GET_STORAGE_CLASS_DEPRECATED_MSG = ( │ │ │ │ │ "django.core.files.storage.get_storage_class is deprecated in favor of " │ │ │ │ │ "using django.core.files.storage.storages." │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_storage_class(import_path=None): │ │ │ │ │ warnings.warn( │ │ │ │ │ GET_STORAGE_CLASS_DEPRECATED_MSG, │ │ │ │ │ RemovedInDjango51Warning, │ │ │ │ │ stacklevel=2, │ │ │ │ │ ) │ │ │ │ │ return import_string(import_path or settings.DEFAULT_FILE_STORAGE) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class DefaultStorage(LazyObject): │ │ │ │ │ def _setup(self): │ │ │ │ │ self._wrapped = storages[DEFAULT_STORAGE_ALIAS] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ storages = StorageHandler() │ │ │ │ │ default_storage = DefaultStorage() │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadedfile.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.uploadedfile — Django 4.2.13 documentation │ │ │ │ + django.core.files.uploadedfile — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.uploadedfile

│ │ │ │ +  

Broncode voor django.core.files.uploadedfile

│ │ │ │  """
│ │ │ │  Classes representing uploaded files.
│ │ │ │  """
│ │ │ │  
│ │ │ │  import os
│ │ │ │  from io import BytesIO
│ │ │ │  
│ │ │ │ @@ -88,15 +89,15 @@
│ │ │ │      "TemporaryUploadedFile",
│ │ │ │      "InMemoryUploadedFile",
│ │ │ │      "SimpleUploadedFile",
│ │ │ │  )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class UploadedFile(File): │ │ │ │ """ │ │ │ │ An abstract uploaded file (``TemporaryUploadedFile`` and │ │ │ │ ``InMemoryUploadedFile`` are the built-in concrete subclasses). │ │ │ │ │ │ │ │ An ``UploadedFile`` object behaves somewhat like a file object and │ │ │ │ represents some file data that the user submitted with a form. │ │ │ │ @@ -140,29 +141,29 @@ │ │ │ │ self._name = name │ │ │ │ │ │ │ │ name = property(_get_name, _set_name)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class TemporaryUploadedFile(UploadedFile): │ │ │ │ """ │ │ │ │ A file uploaded to a temporary location (i.e. stream-to-disk). │ │ │ │ """ │ │ │ │ │ │ │ │ def __init__(self, name, content_type, size, charset, content_type_extra=None): │ │ │ │ _, ext = os.path.splitext(name) │ │ │ │ file = tempfile.NamedTemporaryFile( │ │ │ │ suffix=".upload" + ext, dir=settings.FILE_UPLOAD_TEMP_DIR │ │ │ │ ) │ │ │ │ super().__init__(file, name, content_type, size, charset, content_type_extra) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def temporary_file_path(self): │ │ │ │ """Return the full path of this file.""" │ │ │ │ return self.file.name
│ │ │ │ │ │ │ │ │ │ │ │ def close(self): │ │ │ │ try: │ │ │ │ @@ -172,15 +173,15 @@ │ │ │ │ # it. Still sets self.file.close_called and calls │ │ │ │ # self.file.file.close() before the exception. │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class InMemoryUploadedFile(UploadedFile): │ │ │ │ """ │ │ │ │ A file uploaded into memory (i.e. stream-to-memory). │ │ │ │ """ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ self, │ │ │ │ @@ -241,35 +242,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..uuppllooaaddeeddffiillee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..uuppllooaaddeeddffiillee ************ │ │ │ │ │ """ │ │ │ │ │ Classes representing uploaded files. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ import os │ │ │ │ │ from io import BytesIO │ │ │ │ │ │ │ │ │ │ @@ -19,15 +19,15 @@ │ │ │ │ │ "TemporaryUploadedFile", │ │ │ │ │ "InMemoryUploadedFile", │ │ │ │ │ "SimpleUploadedFile", │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class UploadedFile(File): │ │ │ │ │ """ │ │ │ │ │ An abstract uploaded file (``TemporaryUploadedFile`` and │ │ │ │ │ ``InMemoryUploadedFile`` are the built-in concrete subclasses). │ │ │ │ │ │ │ │ │ │ An ``UploadedFile`` object behaves somewhat like a file object and │ │ │ │ │ represents some file data that the user submitted with a form. │ │ │ │ │ @@ -74,15 +74,15 @@ │ │ │ │ │ │ │ │ │ │ name = property(_get_name, _set_name) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TemporaryUploadedFile(UploadedFile): │ │ │ │ │ """ │ │ │ │ │ A file uploaded to a temporary location (i.e. stream-to-disk). │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def __init__(self, name, content_type, size, charset, │ │ │ │ │ content_type_extra=None): │ │ │ │ │ @@ -90,15 +90,15 @@ │ │ │ │ │ file = tempfile.NamedTemporaryFile( │ │ │ │ │ suffix=".upload" + ext, dir=settings.FILE_UPLOAD_TEMP_DIR │ │ │ │ │ ) │ │ │ │ │ super().__init__(file, name, content_type, size, charset, │ │ │ │ │ content_type_extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def temporary_file_path(self): │ │ │ │ │ """Return the full path of this file.""" │ │ │ │ │ return self.file.name │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def close(self): │ │ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ # self.file.file.close() before the exception. │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class InMemoryUploadedFile(UploadedFile): │ │ │ │ │ """ │ │ │ │ │ A file uploaded into memory (i.e. stream-to-memory). │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ @@ -171,12 +171,12 @@ │ │ │ │ │ - content │ │ │ │ │ """ │ │ │ │ │ return cls( │ │ │ │ │ file_dict["filename"], │ │ │ │ │ file_dict["content"], │ │ │ │ │ file_dict.get("content-type", "text/plain"), │ │ │ │ │ ) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/files/uploadhandler.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.files.uploadhandler — Django 4.2.13 documentation │ │ │ │ + django.core.files.uploadhandler — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.files.uploadhandler

│ │ │ │ +  

Broncode voor django.core.files.uploadhandler

│ │ │ │  """
│ │ │ │  Base file upload handler classes, and the built-in concrete subclasses
│ │ │ │  """
│ │ │ │  import os
│ │ │ │  from io import BytesIO
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │ @@ -135,15 +136,15 @@
│ │ │ │      run should raise this exception instead of returning None.
│ │ │ │      """
│ │ │ │  
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FileUploadHandler: │ │ │ │ """ │ │ │ │ Base class for streaming upload handlers. │ │ │ │ """ │ │ │ │ │ │ │ │ chunk_size = 64 * 2**10 # : The default chunk size is 64 KB. │ │ │ │ │ │ │ │ @@ -152,15 +153,15 @@ │ │ │ │ self.content_type = None │ │ │ │ self.content_length = None │ │ │ │ self.charset = None │ │ │ │ self.content_type_extra = None │ │ │ │ self.request = request │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def handle_raw_input( │ │ │ │ self, input_data, META, content_length, boundary, encoding=None │ │ │ │ ): │ │ │ │ """ │ │ │ │ Handle the raw input from the client. │ │ │ │ │ │ │ │ Parameters: │ │ │ │ @@ -175,15 +176,15 @@ │ │ │ │ :boundary: The boundary from the Content-Type header. Be sure to │ │ │ │ prepend two '--'. │ │ │ │ """ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def new_file( │ │ │ │ self, │ │ │ │ field_name, │ │ │ │ file_name, │ │ │ │ content_type, │ │ │ │ content_length, │ │ │ │ charset=None, │ │ │ │ @@ -200,63 +201,63 @@ │ │ │ │ self.content_type = content_type │ │ │ │ self.content_length = content_length │ │ │ │ self.charset = charset │ │ │ │ self.content_type_extra = content_type_extra
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def receive_data_chunk(self, raw_data, start): │ │ │ │ """ │ │ │ │ Receive data from the streamed upload parser. ``start`` is the position │ │ │ │ in the file of the chunk. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of FileUploadHandler must provide a receive_data_chunk() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def file_complete(self, file_size): │ │ │ │ """ │ │ │ │ Signal that a file has completed. File size corresponds to the actual │ │ │ │ size accumulated by all the chunks. │ │ │ │ │ │ │ │ Subclasses should return a valid ``UploadedFile`` object. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of FileUploadHandler must provide a file_complete() method" │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def upload_complete(self): │ │ │ │ """ │ │ │ │ Signal that the upload is complete. Subclasses should perform cleanup │ │ │ │ that is necessary for this handler. │ │ │ │ """ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def upload_interrupted(self): │ │ │ │ """ │ │ │ │ Signal that the upload was interrupted. Subclasses should perform │ │ │ │ cleanup that is necessary for this handler. │ │ │ │ """ │ │ │ │ pass
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class TemporaryFileUploadHandler(FileUploadHandler): │ │ │ │ """ │ │ │ │ Upload handler that streams data into a temporary file. │ │ │ │ """ │ │ │ │ │ │ │ │ def new_file(self, *args, **kwargs): │ │ │ │ """ │ │ │ │ @@ -283,15 +284,15 @@ │ │ │ │ os.remove(temp_location) │ │ │ │ except FileNotFoundError: │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class MemoryFileUploadHandler(FileUploadHandler): │ │ │ │ """ │ │ │ │ File upload handler to stream uploads into memory (used for small files). │ │ │ │ """ │ │ │ │ │ │ │ │ def handle_raw_input( │ │ │ │ self, input_data, META, content_length, boundary, encoding=None │ │ │ │ @@ -357,35 +358,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ffiilleess..uuppllooaaddhhaannddlleerr ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ffiilleess..uuppllooaaddhhaannddlleerr ************ │ │ │ │ │ """ │ │ │ │ │ Base file upload handler classes, and the built-in concrete subclasses │ │ │ │ │ """ │ │ │ │ │ import os │ │ │ │ │ from io import BytesIO │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ @@ -69,15 +69,15 @@ │ │ │ │ │ run should raise this exception instead of returning None. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FileUploadHandler: │ │ │ │ │ """ │ │ │ │ │ Base class for streaming upload handlers. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ chunk_size = 64 * 2**10 # : The default chunk size is 64 KB. │ │ │ │ │ │ │ │ │ │ @@ -86,15 +86,15 @@ │ │ │ │ │ self.content_type = None │ │ │ │ │ self.content_length = None │ │ │ │ │ self.charset = None │ │ │ │ │ self.content_type_extra = None │ │ │ │ │ self.request = request │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def handle_raw_input( │ │ │ │ │ self, input_data, META, content_length, boundary, encoding=None │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Handle the raw input from the client. │ │ │ │ │ │ │ │ │ │ Parameters: │ │ │ │ │ @@ -110,15 +110,15 @@ │ │ │ │ │ prepend two '--'. │ │ │ │ │ """ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def new_file( │ │ │ │ │ self, │ │ │ │ │ field_name, │ │ │ │ │ file_name, │ │ │ │ │ content_type, │ │ │ │ │ content_length, │ │ │ │ │ charset=None, │ │ │ │ │ @@ -136,29 +136,29 @@ │ │ │ │ │ self.content_length = content_length │ │ │ │ │ self.charset = charset │ │ │ │ │ self.content_type_extra = content_type_extra │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def receive_data_chunk(self, raw_data, start): │ │ │ │ │ """ │ │ │ │ │ Receive data from the streamed upload parser. ``start`` is the position │ │ │ │ │ in the file of the chunk. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of FileUploadHandler must provide a receive_data_chunk │ │ │ │ │ () method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def file_complete(self, file_size): │ │ │ │ │ """ │ │ │ │ │ Signal that a file has completed. File size corresponds to the actual │ │ │ │ │ size accumulated by all the chunks. │ │ │ │ │ │ │ │ │ │ Subclasses should return a valid ``UploadedFile`` object. │ │ │ │ │ """ │ │ │ │ │ @@ -166,39 +166,39 @@ │ │ │ │ │ "subclasses of FileUploadHandler must provide a file_complete() │ │ │ │ │ method" │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def upload_complete(self): │ │ │ │ │ """ │ │ │ │ │ Signal that the upload is complete. Subclasses should perform cleanup │ │ │ │ │ that is necessary for this handler. │ │ │ │ │ """ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def upload_interrupted(self): │ │ │ │ │ """ │ │ │ │ │ Signal that the upload was interrupted. Subclasses should perform │ │ │ │ │ cleanup that is necessary for this handler. │ │ │ │ │ """ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TemporaryFileUploadHandler(FileUploadHandler): │ │ │ │ │ """ │ │ │ │ │ Upload handler that streams data into a temporary file. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def new_file(self, *args, **kwargs): │ │ │ │ │ """ │ │ │ │ │ @@ -227,15 +227,15 @@ │ │ │ │ │ except FileNotFoundError: │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class MemoryFileUploadHandler(FileUploadHandler): │ │ │ │ │ """ │ │ │ │ │ File upload handler to stream uploads into memory (used for small files). │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def handle_raw_input( │ │ │ │ │ self, input_data, META, content_length, boundary, encoding=None │ │ │ │ │ @@ -290,12 +290,12 @@ │ │ │ │ │ >>> load_handler( │ │ │ │ │ ... 'django.core.files.uploadhandler.TemporaryFileUploadHandler', │ │ │ │ │ ... request, │ │ │ │ │ ... ) │ │ │ │ │ │ │ │ │ │ """ │ │ │ │ │ return import_string(path)(*args, **kwargs) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/mail/message.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.mail.message — Django 4.2.13 documentation │ │ │ │ + django.core.mail.message — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.mail.message

│ │ │ │ +  

Broncode voor django.core.mail.message

│ │ │ │  import mimetypes
│ │ │ │  from email import charset as Charset
│ │ │ │  from email import encoders as Encoders
│ │ │ │  from email import generator, message_from_string
│ │ │ │  from email.errors import HeaderParseError
│ │ │ │  from email.header import Header
│ │ │ │  from email.headerregistry import Address, parser
│ │ │ │ @@ -258,15 +259,15 @@
│ │ │ │  
│ │ │ │      def __setitem__(self, name, val):
│ │ │ │          name, val = forbid_multi_line_headers(name, val, self.encoding)
│ │ │ │          MIMEMultipart.__setitem__(self, name, val)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class EmailMessage: │ │ │ │ """A container for email information.""" │ │ │ │ │ │ │ │ content_subtype = "plain" │ │ │ │ mixed_subtype = "mixed" │ │ │ │ encoding = None # None => use settings default │ │ │ │ │ │ │ │ @@ -576,35 +577,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..mmaaiill..mmeessssaaggee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..mmaaiill..mmeessssaaggee ************ │ │ │ │ │ import mimetypes │ │ │ │ │ from email import charset as Charset │ │ │ │ │ from email import encoders as Encoders │ │ │ │ │ from email import generator, message_from_string │ │ │ │ │ from email.errors import HeaderParseError │ │ │ │ │ from email.header import Header │ │ │ │ │ from email.headerregistry import Address, parser │ │ │ │ │ @@ -194,15 +194,15 @@ │ │ │ │ │ │ │ │ │ │ def __setitem__(self, name, val): │ │ │ │ │ name, val = forbid_multi_line_headers(name, val, self.encoding) │ │ │ │ │ MIMEMultipart.__setitem__(self, name, val) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class EmailMessage: │ │ │ │ │ """A container for email information.""" │ │ │ │ │ │ │ │ │ │ content_subtype = "plain" │ │ │ │ │ mixed_subtype = "mixed" │ │ │ │ │ encoding = None # None => use settings default │ │ │ │ │ │ │ │ │ │ @@ -502,12 +502,12 @@ │ │ │ │ │ _subtype=self.alternative_subtype, encoding=encoding │ │ │ │ │ ) │ │ │ │ │ if self.body: │ │ │ │ │ msg.attach(body_msg) │ │ │ │ │ for alternative in self.alternatives: │ │ │ │ │ msg.attach(self._create_mime_attachment(*alternative)) │ │ │ │ │ return msg │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/mail.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.mail — Django 4.2.13 documentation │ │ │ │ + django.core.mail — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.mail

│ │ │ │ +  

Broncode voor django.core.mail

│ │ │ │  """
│ │ │ │  Tools for sending email.
│ │ │ │  """
│ │ │ │  from django.conf import settings
│ │ │ │  
│ │ │ │  # Imported for backwards compatibility and for the sake
│ │ │ │  # of a cleaner namespace. These symbols used to be in
│ │ │ │ @@ -109,30 +110,30 @@
│ │ │ │      "send_mass_mail",
│ │ │ │      "mail_admins",
│ │ │ │      "mail_managers",
│ │ │ │  ]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_connection(backend=None, fail_silently=False, **kwds): │ │ │ │ """Load an email backend and return an instance of it. │ │ │ │ │ │ │ │ If backend is None (default), use settings.EMAIL_BACKEND. │ │ │ │ │ │ │ │ Both fail_silently and other keyword arguments are used in the │ │ │ │ constructor of the backend. │ │ │ │ """ │ │ │ │ klass = import_string(backend or settings.EMAIL_BACKEND) │ │ │ │ return klass(fail_silently=fail_silently, **kwds)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def send_mail( │ │ │ │ subject, │ │ │ │ message, │ │ │ │ from_email, │ │ │ │ recipient_list, │ │ │ │ fail_silently=False, │ │ │ │ auth_user=None, │ │ │ │ @@ -163,15 +164,15 @@ │ │ │ │ mail.attach_alternative(html_message, "text/html") │ │ │ │ │ │ │ │ return mail.send()
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def send_mass_mail( │ │ │ │ datatuple, fail_silently=False, auth_user=None, auth_password=None, connection=None │ │ │ │ ): │ │ │ │ """ │ │ │ │ Given a datatuple of (subject, message, from_email, recipient_list), send │ │ │ │ each message to each recipient list. Return the number of emails sent. │ │ │ │ │ │ │ │ @@ -193,15 +194,15 @@ │ │ │ │ for subject, message, sender, recipient in datatuple │ │ │ │ ] │ │ │ │ return connection.send_messages(messages)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def mail_admins( │ │ │ │ subject, message, fail_silently=False, connection=None, html_message=None │ │ │ │ ): │ │ │ │ """Send a message to the admins, as defined by the ADMINS setting.""" │ │ │ │ if not settings.ADMINS: │ │ │ │ return │ │ │ │ if not all(isinstance(a, (list, tuple)) and len(a) == 2 for a in settings.ADMINS): │ │ │ │ @@ -216,15 +217,15 @@ │ │ │ │ if html_message: │ │ │ │ mail.attach_alternative(html_message, "text/html") │ │ │ │ mail.send(fail_silently=fail_silently)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def mail_managers( │ │ │ │ subject, message, fail_silently=False, connection=None, html_message=None │ │ │ │ ): │ │ │ │ """Send a message to the managers, as defined by the MANAGERS setting.""" │ │ │ │ if not settings.MANAGERS: │ │ │ │ return │ │ │ │ if not all(isinstance(a, (list, tuple)) and len(a) == 2 for a in settings.MANAGERS): │ │ │ │ @@ -248,35 +249,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..mmaaiill ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..mmaaiill ************ │ │ │ │ │ """ │ │ │ │ │ Tools for sending email. │ │ │ │ │ """ │ │ │ │ │ from django.conf import settings │ │ │ │ │ │ │ │ │ │ # Imported for backwards compatibility and for the sake │ │ │ │ │ # of a cleaner namespace. These symbols used to be in │ │ │ │ │ @@ -40,15 +40,15 @@ │ │ │ │ │ "send_mass_mail", │ │ │ │ │ "mail_admins", │ │ │ │ │ "mail_managers", │ │ │ │ │ ] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_connection(backend=None, fail_silently=False, **kwds): │ │ │ │ │ """Load an email backend and return an instance of it. │ │ │ │ │ │ │ │ │ │ If backend is None (default), use settings.EMAIL_BACKEND. │ │ │ │ │ │ │ │ │ │ Both fail_silently and other keyword arguments are used in the │ │ │ │ │ constructor of the backend. │ │ │ │ │ @@ -56,15 +56,15 @@ │ │ │ │ │ klass = import_string(backend or settings.EMAIL_BACKEND) │ │ │ │ │ return klass(fail_silently=fail_silently, **kwds) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def send_mail( │ │ │ │ │ subject, │ │ │ │ │ message, │ │ │ │ │ from_email, │ │ │ │ │ recipient_list, │ │ │ │ │ fail_silently=False, │ │ │ │ │ auth_user=None, │ │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ │ │ │ │ │ │ │ return mail.send() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def send_mass_mail( │ │ │ │ │ datatuple, fail_silently=False, auth_user=None, auth_password=None, │ │ │ │ │ connection=None │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Given a datatuple of (subject, message, from_email, recipient_list), send │ │ │ │ │ each message to each recipient list. Return the number of emails sent. │ │ │ │ │ @@ -129,15 +129,15 @@ │ │ │ │ │ ] │ │ │ │ │ return connection.send_messages(messages) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def mail_admins( │ │ │ │ │ subject, message, fail_silently=False, connection=None, html_message=None │ │ │ │ │ ): │ │ │ │ │ """Send a message to the admins, as defined by the ADMINS setting.""" │ │ │ │ │ if not settings.ADMINS: │ │ │ │ │ return │ │ │ │ │ if not all(isinstance(a, (list, tuple)) and len(a) == 2 for a in │ │ │ │ │ @@ -154,15 +154,15 @@ │ │ │ │ │ mail.attach_alternative(html_message, "text/html") │ │ │ │ │ mail.send(fail_silently=fail_silently) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def mail_managers( │ │ │ │ │ subject, message, fail_silently=False, connection=None, html_message=None │ │ │ │ │ ): │ │ │ │ │ """Send a message to the managers, as defined by the MANAGERS setting.""" │ │ │ │ │ if not settings.MANAGERS: │ │ │ │ │ return │ │ │ │ │ if not all(isinstance(a, (list, tuple)) and len(a) == 2 for a in │ │ │ │ │ @@ -175,12 +175,12 @@ │ │ │ │ │ [a[1] for a in settings.MANAGERS], │ │ │ │ │ connection=connection, │ │ │ │ │ ) │ │ │ │ │ if html_message: │ │ │ │ │ mail.attach_alternative(html_message, "text/html") │ │ │ │ │ mail.send(fail_silently=fail_silently) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/management/base.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.management.base — Django 4.2.13 documentation │ │ │ │ + django.core.management.base — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.management.base

│ │ │ │ +  

Broncode voor django.core.management.base

│ │ │ │  """
│ │ │ │  Base classes for writing management commands (named commands which can
│ │ │ │  be executed through ``django-admin`` or ``manage.py``).
│ │ │ │  """
│ │ │ │  import argparse
│ │ │ │  import os
│ │ │ │  import sys
│ │ │ │ @@ -88,15 +89,15 @@
│ │ │ │  from django.core.management.color import color_style, no_style
│ │ │ │  from django.db import DEFAULT_DB_ALIAS, connections
│ │ │ │  
│ │ │ │  ALL_CHECKS = "__all__"
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CommandError(Exception): │ │ │ │ """ │ │ │ │ Exception class indicating a problem while executing a management │ │ │ │ command. │ │ │ │ │ │ │ │ If this exception is raised during the execution of a management │ │ │ │ command, it will be caught and turned into a nicely-printed error │ │ │ │ @@ -253,15 +254,15 @@ │ │ │ │ if ending and not msg.endswith(ending): │ │ │ │ msg += ending │ │ │ │ style_func = style_func or self.style_func │ │ │ │ self._out.write(style_func(msg)) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BaseCommand: │ │ │ │ """ │ │ │ │ The base class from which all management commands ultimately │ │ │ │ derive. │ │ │ │ │ │ │ │ Use this class if you want access to all of the mechanisms which │ │ │ │ parse the command-line arguments and work out what code to call in │ │ │ │ @@ -358,26 +359,26 @@ │ │ │ │ if ( │ │ │ │ not isinstance(self.requires_system_checks, (list, tuple)) │ │ │ │ and self.requires_system_checks != ALL_CHECKS │ │ │ │ ): │ │ │ │ raise TypeError("requires_system_checks must be a list or tuple.") │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_version(self): │ │ │ │ """ │ │ │ │ Return the Django version, which should be correct for all built-in │ │ │ │ Django commands. User-supplied commands can override this method to │ │ │ │ return their own version. │ │ │ │ """ │ │ │ │ return django.get_version()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def create_parser(self, prog_name, subcommand, **kwargs): │ │ │ │ """ │ │ │ │ Create and return the ``ArgumentParser`` which will be used to │ │ │ │ parse the arguments to this command. │ │ │ │ """ │ │ │ │ kwargs.setdefault("formatter_class", DjangoHelpFormatter) │ │ │ │ parser = CommandParser( │ │ │ │ @@ -448,15 +449,15 @@ │ │ │ │ help="Skip system checks.", │ │ │ │ ) │ │ │ │ self.add_arguments(parser) │ │ │ │ return parser
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_arguments(self, parser): │ │ │ │ """ │ │ │ │ Entry point for subclassed commands to add custom arguments. │ │ │ │ """ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ @@ -512,15 +513,15 @@ │ │ │ │ connections.close_all() │ │ │ │ except ImproperlyConfigured: │ │ │ │ # Ignore if connections aren't setup at this point (e.g. no │ │ │ │ # configured settings). │ │ │ │ pass │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def execute(self, *args, **options): │ │ │ │ """ │ │ │ │ Try to execute this command, performing system checks if needed (as │ │ │ │ controlled by the ``requires_system_checks`` attribute, except if │ │ │ │ force-skipped). │ │ │ │ """ │ │ │ │ if options["force_color"] and options["no_color"]: │ │ │ │ @@ -554,15 +555,15 @@ │ │ │ │ self.style.SQL_KEYWORD(connection.ops.end_transaction_sql()), │ │ │ │ ) │ │ │ │ self.stdout.write(output) │ │ │ │ return output
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def check( │ │ │ │ self, │ │ │ │ app_configs=None, │ │ │ │ tags=None, │ │ │ │ display_num_errors=False, │ │ │ │ include_deployment_checks=False, │ │ │ │ fail_level=checks.ERROR, │ │ │ │ @@ -686,15 +687,15 @@ │ │ │ │ ) │ │ │ │ ) │ │ │ │ self.stdout.write( │ │ │ │ self.style.NOTICE("Run 'python manage.py migrate' to apply them.") │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def handle(self, *args, **options): │ │ │ │ """ │ │ │ │ The actual logic of the command. Subclasses must implement │ │ │ │ this method. │ │ │ │ """ │ │ │ │ raise NotImplementedError( │ │ │ │ "subclasses of BaseCommand must provide a handle() method" │ │ │ │ @@ -791,35 +792,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..mmaannaaggeemmeenntt..bbaassee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..mmaannaaggeemmeenntt..bbaassee ************ │ │ │ │ │ """ │ │ │ │ │ Base classes for writing management commands (named commands which can │ │ │ │ │ be executed through ``django-admin`` or ``manage.py``). │ │ │ │ │ """ │ │ │ │ │ import argparse │ │ │ │ │ import os │ │ │ │ │ import sys │ │ │ │ │ @@ -19,15 +19,15 @@ │ │ │ │ │ from django.core.management.color import color_style, no_style │ │ │ │ │ from django.db import DEFAULT_DB_ALIAS, connections │ │ │ │ │ │ │ │ │ │ ALL_CHECKS = "__all__" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CommandError(Exception): │ │ │ │ │ """ │ │ │ │ │ Exception class indicating a problem while executing a management │ │ │ │ │ command. │ │ │ │ │ │ │ │ │ │ If this exception is raised during the execution of a management │ │ │ │ │ command, it will be caught and turned into a nicely-printed error │ │ │ │ │ @@ -188,15 +188,15 @@ │ │ │ │ │ if ending and not msg.endswith(ending): │ │ │ │ │ msg += ending │ │ │ │ │ style_func = style_func or self.style_func │ │ │ │ │ self._out.write(style_func(msg)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BaseCommand: │ │ │ │ │ """ │ │ │ │ │ The base class from which all management commands ultimately │ │ │ │ │ derive. │ │ │ │ │ │ │ │ │ │ Use this class if you want access to all of the mechanisms which │ │ │ │ │ parse the command-line arguments and work out what code to call in │ │ │ │ │ @@ -296,27 +296,27 @@ │ │ │ │ │ if ( │ │ │ │ │ not isinstance(self.requires_system_checks, (list, tuple)) │ │ │ │ │ and self.requires_system_checks != ALL_CHECKS │ │ │ │ │ ): │ │ │ │ │ raise TypeError("requires_system_checks must be a list or tuple.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_version(self): │ │ │ │ │ """ │ │ │ │ │ Return the Django version, which should be correct for all built-in │ │ │ │ │ Django commands. User-supplied commands can override this method to │ │ │ │ │ return their own version. │ │ │ │ │ """ │ │ │ │ │ return django.get_version() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def create_parser(self, prog_name, subcommand, **kwargs): │ │ │ │ │ """ │ │ │ │ │ Create and return the ``ArgumentParser`` which will be used to │ │ │ │ │ parse the arguments to this command. │ │ │ │ │ """ │ │ │ │ │ kwargs.setdefault("formatter_class", DjangoHelpFormatter) │ │ │ │ │ parser = CommandParser( │ │ │ │ │ @@ -390,15 +390,15 @@ │ │ │ │ │ ) │ │ │ │ │ self.add_arguments(parser) │ │ │ │ │ return parser │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_arguments(self, parser): │ │ │ │ │ """ │ │ │ │ │ Entry point for subclassed commands to add custom arguments. │ │ │ │ │ """ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -455,15 +455,15 @@ │ │ │ │ │ connections.close_all() │ │ │ │ │ except ImproperlyConfigured: │ │ │ │ │ # Ignore if connections aren't setup at this point (e.g. no │ │ │ │ │ # configured settings). │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def execute(self, *args, **options): │ │ │ │ │ """ │ │ │ │ │ Try to execute this command, performing system checks if needed (as │ │ │ │ │ controlled by the ``requires_system_checks`` attribute, except if │ │ │ │ │ force-skipped). │ │ │ │ │ """ │ │ │ │ │ if options["force_color"] and options["no_color"]: │ │ │ │ │ @@ -502,15 +502,15 @@ │ │ │ │ │ ) │ │ │ │ │ self.stdout.write(output) │ │ │ │ │ return output │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def check( │ │ │ │ │ self, │ │ │ │ │ app_configs=None, │ │ │ │ │ tags=None, │ │ │ │ │ display_num_errors=False, │ │ │ │ │ include_deployment_checks=False, │ │ │ │ │ fail_level=checks.ERROR, │ │ │ │ │ @@ -644,15 +644,15 @@ │ │ │ │ │ ) │ │ │ │ │ self.stdout.write( │ │ │ │ │ self.style.NOTICE("Run 'python manage.py migrate' to apply │ │ │ │ │ them.") │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def handle(self, *args, **options): │ │ │ │ │ """ │ │ │ │ │ The actual logic of the command. Subclasses must implement │ │ │ │ │ this method. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of BaseCommand must provide a handle() method" │ │ │ │ │ @@ -740,12 +740,12 @@ │ │ │ │ │ """ │ │ │ │ │ Perform the command's actions for ``label``, which will be the │ │ │ │ │ string as given on the command line. │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError( │ │ │ │ │ "subclasses of LabelCommand must provide a handle_label() method" │ │ │ │ │ ) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/paginator.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.paginator — Django 4.2.13 documentation │ │ │ │ + django.core.paginator — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.paginator

│ │ │ │ +  

Broncode voor django.core.paginator

│ │ │ │  import collections.abc
│ │ │ │  import inspect
│ │ │ │  import warnings
│ │ │ │  from math import ceil
│ │ │ │  
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  from django.utils.inspect import method_has_no_args
│ │ │ │ @@ -82,36 +83,36 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  class UnorderedObjectListWarning(RuntimeWarning):
│ │ │ │      pass
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class InvalidPage(Exception): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class PageNotAnInteger(InvalidPage): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class EmptyPage(InvalidPage): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Paginator: │ │ │ │ # Translators: String used to replace omitted page numbers in elided page │ │ │ │ # range generated by paginators, e.g. [1, 2, '…', 5, 6, 7, '…', 9, 10]. │ │ │ │ ELLIPSIS = _("…") │ │ │ │ │ │ │ │ def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): │ │ │ │ self.object_list = object_list │ │ │ │ @@ -135,15 +136,15 @@ │ │ │ │ if number < 1: │ │ │ │ raise EmptyPage(_("That page number is less than 1")) │ │ │ │ if number > self.num_pages: │ │ │ │ raise EmptyPage(_("That page contains no results")) │ │ │ │ return number │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_page(self, number): │ │ │ │ """ │ │ │ │ Return a valid page, even if the page argument isn't a number or isn't │ │ │ │ in range. │ │ │ │ """ │ │ │ │ try: │ │ │ │ number = self.validate_number(number) │ │ │ │ @@ -151,15 +152,15 @@ │ │ │ │ number = 1 │ │ │ │ except EmptyPage: │ │ │ │ number = self.num_pages │ │ │ │ return self.page(number)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def page(self, number): │ │ │ │ """Return a Page object for the given 1-based page number.""" │ │ │ │ number = self.validate_number(number) │ │ │ │ bottom = (number - 1) * self.per_page │ │ │ │ top = bottom + self.per_page │ │ │ │ if top + self.orphans >= self.count: │ │ │ │ top = self.count │ │ │ │ @@ -216,15 +217,15 @@ │ │ │ │ "Pagination may yield inconsistent results with an unordered " │ │ │ │ "object_list: {}.".format(obj_list_repr), │ │ │ │ UnorderedObjectListWarning, │ │ │ │ stacklevel=3, │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_elided_page_range(self, number=1, *, on_each_side=3, on_ends=2): │ │ │ │ """ │ │ │ │ Return a 1-based range of pages with some values elided. │ │ │ │ │ │ │ │ If the page range is larger than a given size, the whole range is not │ │ │ │ provided and a compact form is returned instead, e.g. for a paginator │ │ │ │ with 50 pages, if page 43 were the current page, the output, with the │ │ │ │ @@ -252,15 +253,15 @@ │ │ │ │ else: │ │ │ │ yield from range(number + 1, self.num_pages + 1)
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Page(collections.abc.Sequence): │ │ │ │ def __init__(self, object_list, number, paginator): │ │ │ │ self.object_list = object_list │ │ │ │ self.number = number │ │ │ │ self.paginator = paginator │ │ │ │ │ │ │ │ def __repr__(self): │ │ │ │ @@ -278,58 +279,58 @@ │ │ │ │ # The object_list is converted to a list so that if it was a QuerySet │ │ │ │ # it won't be a database hit per __getitem__. │ │ │ │ if not isinstance(self.object_list, list): │ │ │ │ self.object_list = list(self.object_list) │ │ │ │ return self.object_list[index] │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def has_next(self): │ │ │ │ return self.number < self.paginator.num_pages
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def has_previous(self): │ │ │ │ return self.number > 1
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def has_other_pages(self): │ │ │ │ return self.has_previous() or self.has_next()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def next_page_number(self): │ │ │ │ return self.paginator.validate_number(self.number + 1)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def previous_page_number(self): │ │ │ │ return self.paginator.validate_number(self.number - 1)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def start_index(self): │ │ │ │ """ │ │ │ │ Return the 1-based index of the first object on this page, │ │ │ │ relative to total objects in the paginator. │ │ │ │ """ │ │ │ │ # Special case, return zero if no items. │ │ │ │ if self.paginator.count == 0: │ │ │ │ return 0 │ │ │ │ return (self.paginator.per_page * (self.number - 1)) + 1
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def end_index(self): │ │ │ │ """ │ │ │ │ Return the 1-based index of the last object on this page, │ │ │ │ relative to total objects found (hits). │ │ │ │ """ │ │ │ │ # Special case for the last page because there can be orphans. │ │ │ │ if self.number == self.paginator.num_pages: │ │ │ │ @@ -345,35 +346,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ppaaggiinnaattoorr ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ppaaggiinnaattoorr ************ │ │ │ │ │ import collections.abc │ │ │ │ │ import inspect │ │ │ │ │ import warnings │ │ │ │ │ from math import ceil │ │ │ │ │ │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ from django.utils.inspect import method_has_no_args │ │ │ │ │ @@ -13,39 +13,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ class UnorderedObjectListWarning(RuntimeWarning): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class InvalidPage(Exception): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class PageNotAnInteger(InvalidPage): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class EmptyPage(InvalidPage): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Paginator: │ │ │ │ │ # Translators: String used to replace omitted page numbers in elided page │ │ │ │ │ # range generated by paginators, e.g. [1, 2, '…', 5, 6, 7, '…', 9, 10]. │ │ │ │ │ ELLIPSIS = _("…") │ │ │ │ │ │ │ │ │ │ def __init__(self, object_list, per_page, orphans=0, │ │ │ │ │ allow_empty_first_page=True): │ │ │ │ │ @@ -70,15 +70,15 @@ │ │ │ │ │ if number < 1: │ │ │ │ │ raise EmptyPage(_("That page number is less than 1")) │ │ │ │ │ if number > self.num_pages: │ │ │ │ │ raise EmptyPage(_("That page contains no results")) │ │ │ │ │ return number │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_page(self, number): │ │ │ │ │ """ │ │ │ │ │ Return a valid page, even if the page argument isn't a number or isn't │ │ │ │ │ in range. │ │ │ │ │ """ │ │ │ │ │ try: │ │ │ │ │ number = self.validate_number(number) │ │ │ │ │ @@ -87,15 +87,15 @@ │ │ │ │ │ except EmptyPage: │ │ │ │ │ number = self.num_pages │ │ │ │ │ return self.page(number) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def page(self, number): │ │ │ │ │ """Return a Page object for the given 1-based page number.""" │ │ │ │ │ number = self.validate_number(number) │ │ │ │ │ bottom = (number - 1) * self.per_page │ │ │ │ │ top = bottom + self.per_page │ │ │ │ │ if top + self.orphans >= self.count: │ │ │ │ │ top = self.count │ │ │ │ │ @@ -153,15 +153,15 @@ │ │ │ │ │ "Pagination may yield inconsistent results with an unordered " │ │ │ │ │ "object_list: {}.".format(obj_list_repr), │ │ │ │ │ UnorderedObjectListWarning, │ │ │ │ │ stacklevel=3, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_elided_page_range(self, number=1, *, on_each_side=3, on_ends=2): │ │ │ │ │ """ │ │ │ │ │ Return a 1-based range of pages with some values elided. │ │ │ │ │ │ │ │ │ │ If the page range is larger than a given size, the whole range is not │ │ │ │ │ provided and a compact form is returned instead, e.g. for a paginator │ │ │ │ │ with 50 pages, if page 43 were the current page, the output, with the │ │ │ │ │ @@ -190,15 +190,15 @@ │ │ │ │ │ yield from range(number + 1, self.num_pages + 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Page(collections.abc.Sequence): │ │ │ │ │ def __init__(self, object_list, number, paginator): │ │ │ │ │ self.object_list = object_list │ │ │ │ │ self.number = number │ │ │ │ │ self.paginator = paginator │ │ │ │ │ │ │ │ │ │ def __repr__(self): │ │ │ │ │ @@ -216,73 +216,73 @@ │ │ │ │ │ # The object_list is converted to a list so that if it was a QuerySet │ │ │ │ │ # it won't be a database hit per __getitem__. │ │ │ │ │ if not isinstance(self.object_list, list): │ │ │ │ │ self.object_list = list(self.object_list) │ │ │ │ │ return self.object_list[index] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def has_next(self): │ │ │ │ │ return self.number < self.paginator.num_pages │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def has_previous(self): │ │ │ │ │ return self.number > 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def has_other_pages(self): │ │ │ │ │ return self.has_previous() or self.has_next() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def next_page_number(self): │ │ │ │ │ return self.paginator.validate_number(self.number + 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def previous_page_number(self): │ │ │ │ │ return self.paginator.validate_number(self.number - 1) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def start_index(self): │ │ │ │ │ """ │ │ │ │ │ Return the 1-based index of the first object on this page, │ │ │ │ │ relative to total objects in the paginator. │ │ │ │ │ """ │ │ │ │ │ # Special case, return zero if no items. │ │ │ │ │ if self.paginator.count == 0: │ │ │ │ │ return 0 │ │ │ │ │ return (self.paginator.per_page * (self.number - 1)) + 1 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def end_index(self): │ │ │ │ │ """ │ │ │ │ │ Return the 1-based index of the last object on this page, │ │ │ │ │ relative to total objects found (hits). │ │ │ │ │ """ │ │ │ │ │ # Special case for the last page because there can be orphans. │ │ │ │ │ if self.number == self.paginator.num_pages: │ │ │ │ │ return self.paginator.count │ │ │ │ │ return self.number * self.paginator.per_page │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/signing.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.signing — Django 4.2.13 documentation │ │ │ │ + django.core.signing — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.signing

│ │ │ │ +  

Broncode voor django.core.signing

│ │ │ │  """
│ │ │ │  Functions for creating and restoring url-safe signed JSON objects.
│ │ │ │  
│ │ │ │  The format used looks like this:
│ │ │ │  
│ │ │ │  >>> signing.dumps("hello")
│ │ │ │  'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk'
│ │ │ │ @@ -200,15 +201,15 @@
│ │ │ │          return json.dumps(obj, separators=(",", ":")).encode("latin-1")
│ │ │ │  
│ │ │ │      def loads(self, data):
│ │ │ │          return json.loads(data.decode("latin-1"))
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def dumps( │ │ │ │ obj, key=None, salt="django.core.signing", serializer=JSONSerializer, compress=False │ │ │ │ ): │ │ │ │ """ │ │ │ │ Return URL-safe, hmac signed base64 compressed JSON string. If key is │ │ │ │ None, use settings.SECRET_KEY instead. The hmac algorithm is the default │ │ │ │ Signer algorithm. │ │ │ │ @@ -227,15 +228,15 @@ │ │ │ │ return TimestampSigner(key=key, salt=salt).sign_object( │ │ │ │ obj, serializer=serializer, compress=compress │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def loads( │ │ │ │ s, │ │ │ │ key=None, │ │ │ │ salt="django.core.signing", │ │ │ │ serializer=JSONSerializer, │ │ │ │ max_age=None, │ │ │ │ fallback_keys=None, │ │ │ │ @@ -252,15 +253,15 @@ │ │ │ │ serializer=serializer, │ │ │ │ max_age=max_age, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Signer: │ │ │ │ # RemovedInDjango51Warning: When the deprecation ends, replace with: │ │ │ │ # def __init__( │ │ │ │ # self, *, key=None, sep=":", salt=None, algorithm=None, fallback_keys=None │ │ │ │ # ): │ │ │ │ def __init__( │ │ │ │ self, │ │ │ │ @@ -355,28 +356,28 @@ │ │ │ │ if decompress: │ │ │ │ data = zlib.decompress(data) │ │ │ │ return serializer().loads(data)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class TimestampSigner(Signer): │ │ │ │ def timestamp(self): │ │ │ │ return b62_encode(int(time.time())) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def sign(self, value): │ │ │ │ value = "%s%s%s" % (value, self.sep, self.timestamp()) │ │ │ │ return super().sign(value)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def unsign(self, value, max_age=None): │ │ │ │ """ │ │ │ │ Retrieve original value and check it wasn't signed more │ │ │ │ than max_age seconds ago. │ │ │ │ """ │ │ │ │ result = super().unsign(value) │ │ │ │ value, timestamp = result.rsplit(self.sep, 1) │ │ │ │ @@ -399,35 +400,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..ssiiggnniinngg ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..ssiiggnniinngg ************ │ │ │ │ │ """ │ │ │ │ │ Functions for creating and restoring url-safe signed JSON objects. │ │ │ │ │ │ │ │ │ │ The format used looks like this: │ │ │ │ │ │ │ │ │ │ >>> signing.dumps("hello") │ │ │ │ │ 'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk' │ │ │ │ │ @@ -134,15 +134,15 @@ │ │ │ │ │ return json.dumps(obj, separators=(",", ":")).encode("latin-1") │ │ │ │ │ │ │ │ │ │ def loads(self, data): │ │ │ │ │ return json.loads(data.decode("latin-1")) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def dumps( │ │ │ │ │ obj, key=None, salt="django.core.signing", serializer=JSONSerializer, │ │ │ │ │ compress=False │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Return URL-safe, hmac signed base64 compressed JSON string. If key is │ │ │ │ │ None, use settings.SECRET_KEY instead. The hmac algorithm is the default │ │ │ │ │ @@ -163,15 +163,15 @@ │ │ │ │ │ obj, serializer=serializer, compress=compress │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def loads( │ │ │ │ │ s, │ │ │ │ │ key=None, │ │ │ │ │ salt="django.core.signing", │ │ │ │ │ serializer=JSONSerializer, │ │ │ │ │ max_age=None, │ │ │ │ │ fallback_keys=None, │ │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ │ max_age=max_age, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Signer: │ │ │ │ │ # RemovedInDjango51Warning: When the deprecation ends, replace with: │ │ │ │ │ # def __init__( │ │ │ │ │ # self, *, key=None, sep=":", salt=None, algorithm=None, │ │ │ │ │ fallback_keys=None │ │ │ │ │ # ): │ │ │ │ │ def __init__( │ │ │ │ │ @@ -296,29 +296,29 @@ │ │ │ │ │ data = zlib.decompress(data) │ │ │ │ │ return serializer().loads(data) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class TimestampSigner(Signer): │ │ │ │ │ def timestamp(self): │ │ │ │ │ return b62_encode(int(time.time())) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def sign(self, value): │ │ │ │ │ value = "%s%s%s" % (value, self.sep, self.timestamp()) │ │ │ │ │ return super().sign(value) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def unsign(self, value, max_age=None): │ │ │ │ │ """ │ │ │ │ │ Retrieve original value and check it wasn't signed more │ │ │ │ │ than max_age seconds ago. │ │ │ │ │ """ │ │ │ │ │ result = super().unsign(value) │ │ │ │ │ value, timestamp = result.rsplit(self.sep, 1) │ │ │ │ │ @@ -330,12 +330,12 @@ │ │ │ │ │ age = time.time() - timestamp │ │ │ │ │ if age > max_age: │ │ │ │ │ raise SignatureExpired("Signature age %s > %s seconds" % (age, │ │ │ │ │ max_age)) │ │ │ │ │ return value │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/core/validators.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.core.validators — Django 4.2.13 documentation │ │ │ │ + django.core.validators — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.core.validators

│ │ │ │ +  

Broncode voor django.core.validators

│ │ │ │  import ipaddress
│ │ │ │  import math
│ │ │ │  import re
│ │ │ │  from pathlib import Path
│ │ │ │  from urllib.parse import urlsplit, urlunsplit
│ │ │ │  
│ │ │ │  from django.core.exceptions import ValidationError
│ │ │ │ @@ -86,15 +87,15 @@
│ │ │ │  from django.utils.translation import ngettext_lazy
│ │ │ │  
│ │ │ │  # These values, if given to validate(), will trigger the self.required check.
│ │ │ │  EMPTY_VALUES = (None, "", [], (), {})
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class RegexValidator: │ │ │ │ regex = "" │ │ │ │ message = _("Enter a valid value.") │ │ │ │ code = "invalid" │ │ │ │ inverse_match = False │ │ │ │ flags = 0 │ │ │ │ @@ -138,15 +139,15 @@ │ │ │ │ and (self.code == other.code) │ │ │ │ and (self.inverse_match == other.inverse_match) │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class URLValidator(RegexValidator): │ │ │ │ ul = "\u00a1-\uffff" # Unicode letters range (must not be a raw string). │ │ │ │ │ │ │ │ # IP patterns │ │ │ │ ipv4_re = ( │ │ │ │ r"(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)" │ │ │ │ @@ -247,15 +248,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ def validate_integer(value): │ │ │ │ return integer_validator(value) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class EmailValidator: │ │ │ │ message = _("Enter a valid email address.") │ │ │ │ code = "invalid" │ │ │ │ user_regex = _lazy_re_compile( │ │ │ │ # dot-atom │ │ │ │ r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z" │ │ │ │ @@ -350,15 +351,15 @@ │ │ │ │ "hyphens." │ │ │ │ ), │ │ │ │ "invalid", │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_ipv4_address(value): │ │ │ │ try: │ │ │ │ ipaddress.IPv4Address(value) │ │ │ │ except ValueError: │ │ │ │ raise ValidationError( │ │ │ │ _("Enter a valid IPv4 address."), code="invalid", params={"value": value} │ │ │ │ ) │ │ │ │ @@ -372,25 +373,25 @@ │ │ │ │ code="invalid", │ │ │ │ params={"value": value}, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_ipv6_address(value): │ │ │ │ if not is_valid_ipv6_address(value): │ │ │ │ raise ValidationError( │ │ │ │ _("Enter a valid IPv6 address."), code="invalid", params={"value": value} │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_ipv46_address(value): │ │ │ │ try: │ │ │ │ validate_ipv4_address(value) │ │ │ │ except ValidationError: │ │ │ │ try: │ │ │ │ validate_ipv6_address(value) │ │ │ │ except ValidationError: │ │ │ │ @@ -424,15 +425,15 @@ │ │ │ │ raise ValueError( │ │ │ │ "The protocol '%s' is unknown. Supported: %s" │ │ │ │ % (protocol, list(ip_address_validator_map)) │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def int_list_validator(sep=",", message=None, code="invalid", allow_negative=False): │ │ │ │ regexp = _lazy_re_compile( │ │ │ │ r"^%(neg)s\d+(?:%(sep)s%(neg)s\d+)*\Z" │ │ │ │ % { │ │ │ │ "neg": "(-)?" if allow_negative else "", │ │ │ │ "sep": re.escape(sep), │ │ │ │ } │ │ │ │ @@ -478,51 +479,51 @@ │ │ │ │ return a is not b │ │ │ │ │ │ │ │ def clean(self, x): │ │ │ │ return x │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class MaxValueValidator(BaseValidator): │ │ │ │ message = _("Ensure this value is less than or equal to %(limit_value)s.") │ │ │ │ code = "max_value" │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ return a > b
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class MinValueValidator(BaseValidator): │ │ │ │ message = _("Ensure this value is greater than or equal to %(limit_value)s.") │ │ │ │ code = "min_value" │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ return a < b
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class StepValueValidator(BaseValidator): │ │ │ │ message = _("Ensure this value is a multiple of step size %(limit_value)s.") │ │ │ │ code = "step_size" │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ return not math.isclose(math.remainder(a, b), 0, abs_tol=1e-9)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class MinLengthValidator(BaseValidator): │ │ │ │ message = ngettext_lazy( │ │ │ │ "Ensure this value has at least %(limit_value)d character (it has " │ │ │ │ "%(show_value)d).", │ │ │ │ "Ensure this value has at least %(limit_value)d characters (it has " │ │ │ │ "%(show_value)d).", │ │ │ │ @@ -535,15 +536,15 @@ │ │ │ │ │ │ │ │ def clean(self, x): │ │ │ │ return len(x)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class MaxLengthValidator(BaseValidator): │ │ │ │ message = ngettext_lazy( │ │ │ │ "Ensure this value has at most %(limit_value)d character (it has " │ │ │ │ "%(show_value)d).", │ │ │ │ "Ensure this value has at most %(limit_value)d characters (it has " │ │ │ │ "%(show_value)d).", │ │ │ │ @@ -556,15 +557,15 @@ │ │ │ │ │ │ │ │ def clean(self, x): │ │ │ │ return len(x)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class DecimalValidator: │ │ │ │ """ │ │ │ │ Validate that the input does not exceed the maximum number of digits │ │ │ │ expected, otherwise raise ValidationError. │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -647,15 +648,15 @@ │ │ │ │ and self.max_digits == other.max_digits │ │ │ │ and self.decimal_places == other.decimal_places │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class FileExtensionValidator: │ │ │ │ message = _( │ │ │ │ "File extension “%(extension)s” is not allowed. " │ │ │ │ "Allowed extensions are: %(allowed_extensions)s." │ │ │ │ ) │ │ │ │ code = "invalid_extension" │ │ │ │ @@ -704,24 +705,24 @@ │ │ │ │ return [] │ │ │ │ else: │ │ │ │ Image.init() │ │ │ │ return [ext.lower()[1:] for ext in Image.EXTENSION] │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_image_file_extension(value): │ │ │ │ return FileExtensionValidator(allowed_extensions=get_available_image_extensions())( │ │ │ │ value │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @deconstructible │ │ │ │ class ProhibitNullCharactersValidator: │ │ │ │ """Validate that the string doesn't contain the null character.""" │ │ │ │ │ │ │ │ message = _("Null characters are not allowed.") │ │ │ │ code = "null_characters_not_allowed" │ │ │ │ │ │ │ │ @@ -750,35 +751,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ccoorree..vvaalliiddaattoorrss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ccoorree..vvaalliiddaattoorrss ************ │ │ │ │ │ import ipaddress │ │ │ │ │ import math │ │ │ │ │ import re │ │ │ │ │ from pathlib import Path │ │ │ │ │ from urllib.parse import urlsplit, urlunsplit │ │ │ │ │ │ │ │ │ │ from django.core.exceptions import ValidationError │ │ │ │ │ @@ -17,15 +17,15 @@ │ │ │ │ │ from django.utils.translation import ngettext_lazy │ │ │ │ │ │ │ │ │ │ # These values, if given to validate(), will trigger the self.required check. │ │ │ │ │ EMPTY_VALUES = (None, "", [], (), {}) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class RegexValidator: │ │ │ │ │ regex = "" │ │ │ │ │ message = _("Enter a valid value.") │ │ │ │ │ code = "invalid" │ │ │ │ │ inverse_match = False │ │ │ │ │ flags = 0 │ │ │ │ │ @@ -74,15 +74,15 @@ │ │ │ │ │ and (self.inverse_match == other.inverse_match) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class URLValidator(RegexValidator): │ │ │ │ │ ul = "\u00a1-\uffff" # Unicode letters range (must not be a raw string). │ │ │ │ │ │ │ │ │ │ # IP patterns │ │ │ │ │ ipv4_re = ( │ │ │ │ │ r"(?:0|25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?)" │ │ │ │ │ @@ -191,15 +191,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def validate_integer(value): │ │ │ │ │ return integer_validator(value) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class EmailValidator: │ │ │ │ │ message = _("Enter a valid email address.") │ │ │ │ │ code = "invalid" │ │ │ │ │ user_regex = _lazy_re_compile( │ │ │ │ │ # dot-atom │ │ │ │ │ r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*\Z" │ │ │ │ │ @@ -303,15 +303,15 @@ │ │ │ │ │ "hyphens." │ │ │ │ │ ), │ │ │ │ │ "invalid", │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_ipv4_address(value): │ │ │ │ │ try: │ │ │ │ │ ipaddress.IPv4Address(value) │ │ │ │ │ except ValueError: │ │ │ │ │ raise ValidationError( │ │ │ │ │ _("Enter a valid IPv4 address."), code="invalid", params={"value": │ │ │ │ │ value} │ │ │ │ │ @@ -327,27 +327,27 @@ │ │ │ │ │ params={"value": value}, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_ipv6_address(value): │ │ │ │ │ if not is_valid_ipv6_address(value): │ │ │ │ │ raise ValidationError( │ │ │ │ │ _("Enter a valid IPv6 address."), code="invalid", params={"value": │ │ │ │ │ value} │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_ipv46_address(value): │ │ │ │ │ try: │ │ │ │ │ validate_ipv4_address(value) │ │ │ │ │ except ValidationError: │ │ │ │ │ try: │ │ │ │ │ validate_ipv6_address(value) │ │ │ │ │ except ValidationError: │ │ │ │ │ @@ -383,15 +383,15 @@ │ │ │ │ │ raise ValueError( │ │ │ │ │ "The protocol '%s' is unknown. Supported: %s" │ │ │ │ │ % (protocol, list(ip_address_validator_map)) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def int_list_validator(sep=",", message=None, code="invalid", │ │ │ │ │ allow_negative=False): │ │ │ │ │ regexp = _lazy_re_compile( │ │ │ │ │ r"^%(neg)s\d+(?:%(sep)s%(neg)s\d+)*\Z" │ │ │ │ │ % { │ │ │ │ │ "neg": "(-)?" if allow_negative else "", │ │ │ │ │ "sep": re.escape(sep), │ │ │ │ │ @@ -441,56 +441,56 @@ │ │ │ │ │ return a is not b │ │ │ │ │ │ │ │ │ │ def clean(self, x): │ │ │ │ │ return x │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class MaxValueValidator(BaseValidator): │ │ │ │ │ message = _("Ensure this value is less than or equal to %(limit_value)s.") │ │ │ │ │ code = "max_value" │ │ │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ │ return a > b │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class MinValueValidator(BaseValidator): │ │ │ │ │ message = _("Ensure this value is greater than or equal to % │ │ │ │ │ (limit_value)s.") │ │ │ │ │ code = "min_value" │ │ │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ │ return a < b │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class StepValueValidator(BaseValidator): │ │ │ │ │ message = _("Ensure this value is a multiple of step size % │ │ │ │ │ (limit_value)s.") │ │ │ │ │ code = "step_size" │ │ │ │ │ │ │ │ │ │ def compare(self, a, b): │ │ │ │ │ return not math.isclose(math.remainder(a, b), 0, abs_tol=1e-9) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class MinLengthValidator(BaseValidator): │ │ │ │ │ message = ngettext_lazy( │ │ │ │ │ "Ensure this value has at least %(limit_value)d character (it has " │ │ │ │ │ "%(show_value)d).", │ │ │ │ │ "Ensure this value has at least %(limit_value)d characters (it has " │ │ │ │ │ "%(show_value)d).", │ │ │ │ │ @@ -504,15 +504,15 @@ │ │ │ │ │ def clean(self, x): │ │ │ │ │ return len(x) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class MaxLengthValidator(BaseValidator): │ │ │ │ │ message = ngettext_lazy( │ │ │ │ │ "Ensure this value has at most %(limit_value)d character (it has " │ │ │ │ │ "%(show_value)d).", │ │ │ │ │ "Ensure this value has at most %(limit_value)d characters (it has " │ │ │ │ │ "%(show_value)d).", │ │ │ │ │ @@ -526,15 +526,15 @@ │ │ │ │ │ def clean(self, x): │ │ │ │ │ return len(x) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class DecimalValidator: │ │ │ │ │ """ │ │ │ │ │ Validate that the input does not exceed the maximum number of digits │ │ │ │ │ expected, otherwise raise ValidationError. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -622,15 +622,15 @@ │ │ │ │ │ and self.decimal_places == other.decimal_places │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class FileExtensionValidator: │ │ │ │ │ message = _( │ │ │ │ │ "File extension “%(extension)s” is not allowed. " │ │ │ │ │ "Allowed extensions are: %(allowed_extensions)s." │ │ │ │ │ ) │ │ │ │ │ code = "invalid_extension" │ │ │ │ │ @@ -681,26 +681,26 @@ │ │ │ │ │ return [] │ │ │ │ │ else: │ │ │ │ │ Image.init() │ │ │ │ │ return [ext.lower()[1:] for ext in Image.EXTENSION] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_image_file_extension(value): │ │ │ │ │ return FileExtensionValidator │ │ │ │ │ (allowed_extensions=get_available_image_extensions())( │ │ │ │ │ value │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class ProhibitNullCharactersValidator: │ │ │ │ │ """Validate that the string doesn't contain the null character.""" │ │ │ │ │ │ │ │ │ │ message = _("Null characters are not allowed.") │ │ │ │ │ code = "null_characters_not_allowed" │ │ │ │ │ │ │ │ │ │ @@ -718,12 +718,12 @@ │ │ │ │ │ def __eq__(self, other): │ │ │ │ │ return ( │ │ │ │ │ isinstance(other, self.__class__) │ │ │ │ │ and self.message == other.message │ │ │ │ │ and self.code == other.code │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/backends/base/schema.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.backends.base.schema — Django 4.2.13 documentation │ │ │ │ + django.db.backends.base.schema — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.backends.base.schema

│ │ │ │ +  

Broncode voor django.db.backends.base.schema

│ │ │ │  import logging
│ │ │ │  import operator
│ │ │ │  from datetime import datetime
│ │ │ │  
│ │ │ │  from django.conf import settings
│ │ │ │  from django.db.backends.ddl_references import (
│ │ │ │      Columns,
│ │ │ │ @@ -142,15 +143,15 @@
│ │ │ │          yield from _related_non_m2m_objects(
│ │ │ │              old_rel.remote_field,
│ │ │ │              new_rel.remote_field,
│ │ │ │          )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BaseDatabaseSchemaEditor: │ │ │ │ """ │ │ │ │ This class and its subclasses are responsible for emitting schema-changing │ │ │ │ statements to the databases - model creation/removal/alteration, field │ │ │ │ renaming, index fiddling, and so on. │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -241,15 +242,15 @@ │ │ │ │ self.execute(sql) │ │ │ │ if self.atomic_migration: │ │ │ │ self.atomic.__exit__(exc_type, exc_value, traceback) │ │ │ │ │ │ │ │ # Core utility functions │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def execute(self, sql, params=()): │ │ │ │ """Execute the given SQL statement, with optional parameters.""" │ │ │ │ # Don't perform the transactional DDL check if SQL is being collected │ │ │ │ # as it's not going to be executed anyway. │ │ │ │ if ( │ │ │ │ not self.collect_sql │ │ │ │ and self.connection.in_atomic_block │ │ │ │ @@ -515,15 +516,15 @@ │ │ │ │ so this is safe). │ │ │ │ """ │ │ │ │ raise NotImplementedError() │ │ │ │ │ │ │ │ # Actions │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def create_model(self, model): │ │ │ │ """ │ │ │ │ Create a table and any accompanying indexes or unique constraints for │ │ │ │ the given `model`. │ │ │ │ """ │ │ │ │ sql, params = self.table_sql(model) │ │ │ │ # Prevent using [] as params, in the case a literal '%' is used in the │ │ │ │ @@ -554,15 +555,15 @@ │ │ │ │ # Make M2M tables │ │ │ │ for field in model._meta.local_many_to_many: │ │ │ │ if field.remote_field.through._meta.auto_created: │ │ │ │ self.create_model(field.remote_field.through)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete_model(self, model): │ │ │ │ """Delete a model from the database.""" │ │ │ │ # Handle auto-created intermediary models │ │ │ │ for field in model._meta.local_many_to_many: │ │ │ │ if field.remote_field.through._meta.auto_created: │ │ │ │ self.delete_model(field.remote_field.through) │ │ │ │ │ │ │ │ @@ -578,74 +579,74 @@ │ │ │ │ if isinstance(sql, Statement) and sql.references_table( │ │ │ │ model._meta.db_table │ │ │ │ ): │ │ │ │ self.deferred_sql.remove(sql)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_index(self, model, index): │ │ │ │ """Add an index on a model.""" │ │ │ │ if ( │ │ │ │ index.contains_expressions │ │ │ │ and not self.connection.features.supports_expression_indexes │ │ │ │ ): │ │ │ │ return None │ │ │ │ # Index.create_sql returns interpolated SQL which makes params=None a │ │ │ │ # necessity to avoid escaping attempts on execution. │ │ │ │ self.execute(index.create_sql(model, self), params=None)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def remove_index(self, model, index): │ │ │ │ """Remove an index from a model.""" │ │ │ │ if ( │ │ │ │ index.contains_expressions │ │ │ │ and not self.connection.features.supports_expression_indexes │ │ │ │ ): │ │ │ │ return None │ │ │ │ self.execute(index.remove_sql(model, self))
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def rename_index(self, model, old_index, new_index): │ │ │ │ if self.connection.features.can_rename_index: │ │ │ │ self.execute( │ │ │ │ self._rename_index_sql(model, old_index.name, new_index.name), │ │ │ │ params=None, │ │ │ │ ) │ │ │ │ else: │ │ │ │ self.remove_index(model, old_index) │ │ │ │ self.add_index(model, new_index)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_constraint(self, model, constraint): │ │ │ │ """Add a constraint to a model.""" │ │ │ │ sql = constraint.create_sql(model, self) │ │ │ │ if sql: │ │ │ │ # Constraint.create_sql returns interpolated SQL which makes │ │ │ │ # params=None a necessity to avoid escaping attempts on execution. │ │ │ │ self.execute(sql, params=None)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def remove_constraint(self, model, constraint): │ │ │ │ """Remove a constraint from a model.""" │ │ │ │ sql = constraint.remove_sql(model, self) │ │ │ │ if sql: │ │ │ │ self.execute(sql)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_unique_together(self, model, old_unique_together, new_unique_together): │ │ │ │ """ │ │ │ │ Deal with a model changing its unique_together. The input │ │ │ │ unique_togethers must be doubly-nested, not the single-nested │ │ │ │ ["foo", "bar"] format. │ │ │ │ """ │ │ │ │ olds = {tuple(fields) for fields in old_unique_together} │ │ │ │ @@ -661,15 +662,15 @@ │ │ │ │ # Created uniques │ │ │ │ for field_names in news.difference(olds): │ │ │ │ fields = [model._meta.get_field(field) for field in field_names] │ │ │ │ self.execute(self._create_unique_sql(model, fields))
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_index_together(self, model, old_index_together, new_index_together): │ │ │ │ """ │ │ │ │ Deal with a model changing its index_together. The input │ │ │ │ index_togethers must be doubly-nested, not the single-nested │ │ │ │ ["foo", "bar"] format. │ │ │ │ """ │ │ │ │ olds = {tuple(fields) for fields in old_index_together} │ │ │ │ @@ -719,15 +720,15 @@ │ │ │ │ model._meta.db_table, │ │ │ │ ", ".join(columns), │ │ │ │ ) │ │ │ │ ) │ │ │ │ self.execute(self._delete_constraint_sql(sql, model, constraint_names[0])) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_db_table(self, model, old_db_table, new_db_table): │ │ │ │ """Rename the table a model points to.""" │ │ │ │ if old_db_table == new_db_table or ( │ │ │ │ self.connection.features.ignores_table_name_case │ │ │ │ and old_db_table.lower() == new_db_table.lower() │ │ │ │ ): │ │ │ │ return │ │ │ │ @@ -741,42 +742,42 @@ │ │ │ │ # Rename all references to the old table name. │ │ │ │ for sql in self.deferred_sql: │ │ │ │ if isinstance(sql, Statement): │ │ │ │ sql.rename_table_references(old_db_table, new_db_table)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_db_table_comment(self, model, old_db_table_comment, new_db_table_comment): │ │ │ │ if self.sql_alter_table_comment and self.connection.features.supports_comments: │ │ │ │ self.execute( │ │ │ │ self.sql_alter_table_comment │ │ │ │ % { │ │ │ │ "table": self.quote_name(model._meta.db_table), │ │ │ │ "comment": self.quote_value(new_db_table_comment or ""), │ │ │ │ } │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_db_tablespace(self, model, old_db_tablespace, new_db_tablespace): │ │ │ │ """Move a model's table between tablespaces.""" │ │ │ │ self.execute( │ │ │ │ self.sql_retablespace_table │ │ │ │ % { │ │ │ │ "table": self.quote_name(model._meta.db_table), │ │ │ │ "old_tablespace": self.quote_name(old_db_tablespace), │ │ │ │ "new_tablespace": self.quote_name(new_db_tablespace), │ │ │ │ } │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def add_field(self, model, field): │ │ │ │ """ │ │ │ │ Create a field on a model. Usually involves adding a column, but may │ │ │ │ involve adding a table instead (for M2M fields). │ │ │ │ """ │ │ │ │ # Special-case implicit M2M tables │ │ │ │ if field.many_to_many and field.remote_field.through._meta.auto_created: │ │ │ │ @@ -857,15 +858,15 @@ │ │ │ │ self.deferred_sql.extend(self._field_indexes_sql(model, field)) │ │ │ │ # Reset connection if required │ │ │ │ if self.connection.features.connection_persists_old_columns: │ │ │ │ self.connection.close()
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def remove_field(self, model, field): │ │ │ │ """ │ │ │ │ Remove a field from a model. Usually involves deleting a column, │ │ │ │ but for M2Ms may involve deleting a table. │ │ │ │ """ │ │ │ │ # Special-case implicit M2M tables │ │ │ │ if field.many_to_many and field.remote_field.through._meta.auto_created: │ │ │ │ @@ -892,15 +893,15 @@ │ │ │ │ if isinstance(sql, Statement) and sql.references_column( │ │ │ │ model._meta.db_table, field.column │ │ │ │ ): │ │ │ │ self.deferred_sql.remove(sql)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def alter_field(self, model, old_field, new_field, strict=False): │ │ │ │ """ │ │ │ │ Allow a field's type, uniqueness, nullability, default, column, │ │ │ │ constraints, etc. to be modified. │ │ │ │ `old_field` is required to compute the necessary changes. │ │ │ │ If `strict` is True, raise errors if the old column does not match │ │ │ │ `old_field` precisely. │ │ │ │ @@ -1960,35 +1961,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..bbaacckkeennddss..bbaassee..sscchheemmaa ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..bbaacckkeennddss..bbaassee..sscchheemmaa ************ │ │ │ │ │ import logging │ │ │ │ │ import operator │ │ │ │ │ from datetime import datetime │ │ │ │ │ │ │ │ │ │ from django.conf import settings │ │ │ │ │ from django.db.backends.ddl_references import ( │ │ │ │ │ Columns, │ │ │ │ │ @@ -74,15 +74,15 @@ │ │ │ │ │ yield from _related_non_m2m_objects( │ │ │ │ │ old_rel.remote_field, │ │ │ │ │ new_rel.remote_field, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BaseDatabaseSchemaEditor: │ │ │ │ │ """ │ │ │ │ │ This class and its subclasses are responsible for emitting schema-changing │ │ │ │ │ statements to the databases - model creation/removal/alteration, field │ │ │ │ │ renaming, index fiddling, and so on. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -183,15 +183,15 @@ │ │ │ │ │ self.execute(sql) │ │ │ │ │ if self.atomic_migration: │ │ │ │ │ self.atomic.__exit__(exc_type, exc_value, traceback) │ │ │ │ │ │ │ │ │ │ # Core utility functions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def execute(self, sql, params=()): │ │ │ │ │ """Execute the given SQL statement, with optional parameters.""" │ │ │ │ │ # Don't perform the transactional DDL check if SQL is being collected │ │ │ │ │ # as it's not going to be executed anyway. │ │ │ │ │ if ( │ │ │ │ │ not self.collect_sql │ │ │ │ │ and self.connection.in_atomic_block │ │ │ │ │ @@ -465,15 +465,15 @@ │ │ │ │ │ so this is safe). │ │ │ │ │ """ │ │ │ │ │ raise NotImplementedError() │ │ │ │ │ │ │ │ │ │ # Actions │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def create_model(self, model): │ │ │ │ │ """ │ │ │ │ │ Create a table and any accompanying indexes or unique constraints for │ │ │ │ │ the given `model`. │ │ │ │ │ """ │ │ │ │ │ sql, params = self.table_sql(model) │ │ │ │ │ # Prevent using [] as params, in the case a literal '%' is used in the │ │ │ │ │ @@ -506,15 +506,15 @@ │ │ │ │ │ for field in model._meta.local_many_to_many: │ │ │ │ │ if field.remote_field.through._meta.auto_created: │ │ │ │ │ self.create_model(field.remote_field.through) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete_model(self, model): │ │ │ │ │ """Delete a model from the database.""" │ │ │ │ │ # Handle auto-created intermediary models │ │ │ │ │ for field in model._meta.local_many_to_many: │ │ │ │ │ if field.remote_field.through._meta.auto_created: │ │ │ │ │ self.delete_model(field.remote_field.through) │ │ │ │ │ │ │ │ │ │ @@ -531,79 +531,79 @@ │ │ │ │ │ model._meta.db_table │ │ │ │ │ ): │ │ │ │ │ self.deferred_sql.remove(sql) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_index(self, model, index): │ │ │ │ │ """Add an index on a model.""" │ │ │ │ │ if ( │ │ │ │ │ index.contains_expressions │ │ │ │ │ and not self.connection.features.supports_expression_indexes │ │ │ │ │ ): │ │ │ │ │ return None │ │ │ │ │ # Index.create_sql returns interpolated SQL which makes params=None a │ │ │ │ │ # necessity to avoid escaping attempts on execution. │ │ │ │ │ self.execute(index.create_sql(model, self), params=None) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def remove_index(self, model, index): │ │ │ │ │ """Remove an index from a model.""" │ │ │ │ │ if ( │ │ │ │ │ index.contains_expressions │ │ │ │ │ and not self.connection.features.supports_expression_indexes │ │ │ │ │ ): │ │ │ │ │ return None │ │ │ │ │ self.execute(index.remove_sql(model, self)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def rename_index(self, model, old_index, new_index): │ │ │ │ │ if self.connection.features.can_rename_index: │ │ │ │ │ self.execute( │ │ │ │ │ self._rename_index_sql(model, old_index.name, new_index.name), │ │ │ │ │ params=None, │ │ │ │ │ ) │ │ │ │ │ else: │ │ │ │ │ self.remove_index(model, old_index) │ │ │ │ │ self.add_index(model, new_index) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_constraint(self, model, constraint): │ │ │ │ │ """Add a constraint to a model.""" │ │ │ │ │ sql = constraint.create_sql(model, self) │ │ │ │ │ if sql: │ │ │ │ │ # Constraint.create_sql returns interpolated SQL which makes │ │ │ │ │ # params=None a necessity to avoid escaping attempts on execution. │ │ │ │ │ self.execute(sql, params=None) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def remove_constraint(self, model, constraint): │ │ │ │ │ """Remove a constraint from a model.""" │ │ │ │ │ sql = constraint.remove_sql(model, self) │ │ │ │ │ if sql: │ │ │ │ │ self.execute(sql) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_unique_together(self, model, old_unique_together, │ │ │ │ │ new_unique_together): │ │ │ │ │ """ │ │ │ │ │ Deal with a model changing its unique_together. The input │ │ │ │ │ unique_togethers must be doubly-nested, not the single-nested │ │ │ │ │ ["foo", "bar"] format. │ │ │ │ │ """ │ │ │ │ │ @@ -621,15 +621,15 @@ │ │ │ │ │ for field_names in news.difference(olds): │ │ │ │ │ fields = [model._meta.get_field(field) for field in field_names] │ │ │ │ │ self.execute(self._create_unique_sql(model, fields)) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_index_together(self, model, old_index_together, │ │ │ │ │ new_index_together): │ │ │ │ │ """ │ │ │ │ │ Deal with a model changing its index_together. The input │ │ │ │ │ index_togethers must be doubly-nested, not the single-nested │ │ │ │ │ ["foo", "bar"] format. │ │ │ │ │ """ │ │ │ │ │ @@ -686,15 +686,15 @@ │ │ │ │ │ ", ".join(columns), │ │ │ │ │ ) │ │ │ │ │ ) │ │ │ │ │ self.execute(self._delete_constraint_sql(sql, model, constraint_names │ │ │ │ │ [0])) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_db_table(self, model, old_db_table, new_db_table): │ │ │ │ │ """Rename the table a model points to.""" │ │ │ │ │ if old_db_table == new_db_table or ( │ │ │ │ │ self.connection.features.ignores_table_name_case │ │ │ │ │ and old_db_table.lower() == new_db_table.lower() │ │ │ │ │ ): │ │ │ │ │ return │ │ │ │ │ @@ -709,15 +709,15 @@ │ │ │ │ │ for sql in self.deferred_sql: │ │ │ │ │ if isinstance(sql, Statement): │ │ │ │ │ sql.rename_table_references(old_db_table, new_db_table) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_db_table_comment(self, model, old_db_table_comment, │ │ │ │ │ new_db_table_comment): │ │ │ │ │ if self.sql_alter_table_comment and │ │ │ │ │ self.connection.features.supports_comments: │ │ │ │ │ self.execute( │ │ │ │ │ self.sql_alter_table_comment │ │ │ │ │ % { │ │ │ │ │ @@ -725,30 +725,30 @@ │ │ │ │ │ "comment": self.quote_value(new_db_table_comment or ""), │ │ │ │ │ } │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_db_tablespace(self, model, old_db_tablespace, new_db_tablespace): │ │ │ │ │ """Move a model's table between tablespaces.""" │ │ │ │ │ self.execute( │ │ │ │ │ self.sql_retablespace_table │ │ │ │ │ % { │ │ │ │ │ "table": self.quote_name(model._meta.db_table), │ │ │ │ │ "old_tablespace": self.quote_name(old_db_tablespace), │ │ │ │ │ "new_tablespace": self.quote_name(new_db_tablespace), │ │ │ │ │ } │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def add_field(self, model, field): │ │ │ │ │ """ │ │ │ │ │ Create a field on a model. Usually involves adding a column, but may │ │ │ │ │ involve adding a table instead (for M2M fields). │ │ │ │ │ """ │ │ │ │ │ # Special-case implicit M2M tables │ │ │ │ │ if field.many_to_many and │ │ │ │ │ @@ -833,15 +833,15 @@ │ │ │ │ │ # Reset connection if required │ │ │ │ │ if self.connection.features.connection_persists_old_columns: │ │ │ │ │ self.connection.close() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def remove_field(self, model, field): │ │ │ │ │ """ │ │ │ │ │ Remove a field from a model. Usually involves deleting a column, │ │ │ │ │ but for M2Ms may involve deleting a table. │ │ │ │ │ """ │ │ │ │ │ # Special-case implicit M2M tables │ │ │ │ │ if field.many_to_many and │ │ │ │ │ @@ -871,15 +871,15 @@ │ │ │ │ │ model._meta.db_table, field.column │ │ │ │ │ ): │ │ │ │ │ self.deferred_sql.remove(sql) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def alter_field(self, model, old_field, new_field, strict=False): │ │ │ │ │ """ │ │ │ │ │ Allow a field's type, uniqueness, nullability, default, column, │ │ │ │ │ constraints, etc. to be modified. │ │ │ │ │ `old_field` is required to compute the necessary changes. │ │ │ │ │ If `strict` is True, raise errors if the old column does not match │ │ │ │ │ `old_field` precisely. │ │ │ │ │ @@ -1981,12 +1981,12 @@ │ │ │ │ │ def remove_procedure(self, procedure_name, param_types=()): │ │ │ │ │ sql = self.sql_delete_procedure % { │ │ │ │ │ "procedure": self.quote_name(procedure_name), │ │ │ │ │ "param_types": ",".join(param_types), │ │ │ │ │ } │ │ │ │ │ self.execute(sql) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/fields.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.migrations.operations.fields — Django 4.2.13 documentation │ │ │ │ + django.db.migrations.operations.fields — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.migrations.operations.fields

│ │ │ │ +  

Broncode voor django.db.migrations.operations.fields

│ │ │ │  from django.db.migrations.utils import field_references
│ │ │ │  from django.db.models import NOT_PROVIDED
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  
│ │ │ │  from .base import Operation
│ │ │ │  
│ │ │ │  
│ │ │ │ @@ -142,15 +143,15 @@
│ │ │ │      def reduce(self, operation, app_label):
│ │ │ │          return super().reduce(operation, app_label) or not operation.references_field(
│ │ │ │              self.model_name, self.name, app_label
│ │ │ │          )
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AddField(FieldOperation): │ │ │ │ """Add a field to a model.""" │ │ │ │ │ │ │ │ def __init__(self, model_name, name, field, preserve_default=True): │ │ │ │ self.preserve_default = preserve_default │ │ │ │ super().__init__(model_name, name, field) │ │ │ │ │ │ │ │ @@ -224,15 +225,15 @@ │ │ │ │ ), │ │ │ │ ] │ │ │ │ return super().reduce(operation, app_label)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RemoveField(FieldOperation): │ │ │ │ """Remove a field from a model.""" │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ kwargs = { │ │ │ │ "model_name": self.model_name, │ │ │ │ "name": self.name, │ │ │ │ @@ -271,15 +272,15 @@ │ │ │ │ ): │ │ │ │ return [operation] │ │ │ │ return super().reduce(operation, app_label)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterField(FieldOperation): │ │ │ │ """ │ │ │ │ Alter a field's database column (e.g. null, max_length) to the provided │ │ │ │ new field. │ │ │ │ """ │ │ │ │ │ │ │ │ def __init__(self, model_name, name, field, preserve_default=True): │ │ │ │ @@ -346,15 +347,15 @@ │ │ │ │ ), │ │ │ │ ] │ │ │ │ return super().reduce(operation, app_label)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RenameField(FieldOperation): │ │ │ │ """Rename a field on the model. Might affect db_column too.""" │ │ │ │ │ │ │ │ def __init__(self, model_name, old_name, new_name): │ │ │ │ self.old_name = old_name │ │ │ │ self.new_name = new_name │ │ │ │ super().__init__(model_name, old_name) │ │ │ │ @@ -448,35 +449,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..ffiieellddss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..ffiieellddss ************ │ │ │ │ │ from django.db.migrations.utils import field_references │ │ │ │ │ from django.db.models import NOT_PROVIDED │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ │ │ │ │ │ from .base import Operation │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,15 +74,15 @@ │ │ │ │ │ return super().reduce(operation, app_label) or not │ │ │ │ │ operation.references_field( │ │ │ │ │ self.model_name, self.name, app_label │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AddField(FieldOperation): │ │ │ │ │ """Add a field to a model.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, name, field, preserve_default=True): │ │ │ │ │ self.preserve_default = preserve_default │ │ │ │ │ super().__init__(model_name, name, field) │ │ │ │ │ │ │ │ │ │ @@ -161,15 +161,15 @@ │ │ │ │ │ ] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RemoveField(FieldOperation): │ │ │ │ │ """Remove a field from a model.""" │ │ │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ │ kwargs = { │ │ │ │ │ "model_name": self.model_name, │ │ │ │ │ "name": self.name, │ │ │ │ │ @@ -213,15 +213,15 @@ │ │ │ │ │ return [operation] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterField(FieldOperation): │ │ │ │ │ """ │ │ │ │ │ Alter a field's database column (e.g. null, max_length) to the provided │ │ │ │ │ new field. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, name, field, preserve_default=True): │ │ │ │ │ @@ -291,15 +291,15 @@ │ │ │ │ │ ] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RenameField(FieldOperation): │ │ │ │ │ """Rename a field on the model. Might affect db_column too.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, old_name, new_name): │ │ │ │ │ self.old_name = old_name │ │ │ │ │ self.new_name = new_name │ │ │ │ │ super().__init__(model_name, old_name) │ │ │ │ │ @@ -387,12 +387,12 @@ │ │ │ │ │ ( │ │ │ │ │ operation.references_field(self.model_name, self.old_name, │ │ │ │ │ app_label) │ │ │ │ │ or operation.references_field(self.model_name, self.new_name, │ │ │ │ │ app_label) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/models.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.migrations.operations.models — Django 4.2.13 documentation │ │ │ │ + django.db.migrations.operations.models — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.migrations.operations.models

│ │ │ │ +  

Broncode voor django.db.migrations.operations.models

│ │ │ │  from django.db import models
│ │ │ │  from django.db.migrations.operations.base import Operation
│ │ │ │  from django.db.migrations.state import ModelState
│ │ │ │  from django.db.migrations.utils import field_references, resolve_relation
│ │ │ │  from django.db.models.options import normalize_together
│ │ │ │  from django.utils.functional import cached_property
│ │ │ │  
│ │ │ │ @@ -108,15 +109,15 @@
│ │ │ │          )
│ │ │ │  
│ │ │ │      def can_reduce_through(self, operation, app_label):
│ │ │ │          return not operation.references_model(self.name, app_label)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CreateModel(ModelOperation): │ │ │ │ """Create a model's table.""" │ │ │ │ │ │ │ │ serialization_expand_args = ["fields", "options", "managers"] │ │ │ │ │ │ │ │ def __init__(self, name, fields, options=None, bases=None, managers=None): │ │ │ │ self.fields = fields │ │ │ │ @@ -444,15 +445,15 @@ │ │ │ │ ), │ │ │ │ ] │ │ │ │ return super().reduce(operation, app_label)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class DeleteModel(ModelOperation): │ │ │ │ """Drop a model's table.""" │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ kwargs = { │ │ │ │ "name": self.name, │ │ │ │ } │ │ │ │ @@ -482,15 +483,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "delete_%s" % self.name_lower
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RenameModel(ModelOperation): │ │ │ │ """Rename a model.""" │ │ │ │ │ │ │ │ def __init__(self, old_name, new_name): │ │ │ │ self.old_name = old_name │ │ │ │ self.new_name = new_name │ │ │ │ super().__init__(old_name) │ │ │ │ @@ -614,15 +615,15 @@ │ │ │ │ and self.name_lower == operation.name_lower │ │ │ │ ): │ │ │ │ return [operation] │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterModelTable(ModelOptionOperation): │ │ │ │ """Rename a model's table.""" │ │ │ │ │ │ │ │ def __init__(self, name, table): │ │ │ │ self.table = table │ │ │ │ super().__init__(name) │ │ │ │ │ │ │ │ @@ -668,15 +669,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "alter_%s_table" % self.name_lower
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterModelTableComment(ModelOptionOperation): │ │ │ │ def __init__(self, name, table_comment): │ │ │ │ self.table_comment = table_comment │ │ │ │ super().__init__(name) │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ kwargs = { │ │ │ │ @@ -774,45 +775,45 @@ │ │ │ │ return super().can_reduce_through(operation, app_label) or ( │ │ │ │ isinstance(operation, AlterTogetherOptionOperation) │ │ │ │ and type(operation) is not type(self) │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterUniqueTogether(AlterTogetherOptionOperation): │ │ │ │ """ │ │ │ │ Change the value of unique_together to the target one. │ │ │ │ Input value of unique_together must be a set of tuples. │ │ │ │ """ │ │ │ │ │ │ │ │ option_name = "unique_together" │ │ │ │ │ │ │ │ def __init__(self, name, unique_together): │ │ │ │ super().__init__(name, unique_together)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterIndexTogether(AlterTogetherOptionOperation): │ │ │ │ """ │ │ │ │ Change the value of index_together to the target one. │ │ │ │ Input value of index_together must be a set of tuples. │ │ │ │ """ │ │ │ │ │ │ │ │ option_name = "index_together" │ │ │ │ │ │ │ │ def __init__(self, name, index_together): │ │ │ │ super().__init__(name, index_together)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterOrderWithRespectTo(ModelOptionOperation): │ │ │ │ """Represent a change with the order_with_respect_to option.""" │ │ │ │ │ │ │ │ option_name = "order_with_respect_to" │ │ │ │ │ │ │ │ def __init__(self, name, order_with_respect_to): │ │ │ │ self.order_with_respect_to = order_with_respect_to │ │ │ │ @@ -875,15 +876,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "alter_%s_order_with_respect_to" % self.name_lower
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterModelOptions(ModelOptionOperation): │ │ │ │ """ │ │ │ │ Set new model options that don't directly affect the database schema │ │ │ │ (like verbose_name, permissions, ordering). Python code in migrations │ │ │ │ may still need them. │ │ │ │ """ │ │ │ │ │ │ │ │ @@ -933,15 +934,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "alter_%s_options" % self.name_lower
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AlterModelManagers(ModelOptionOperation): │ │ │ │ """Alter the model's managers.""" │ │ │ │ │ │ │ │ serialization_expand_args = ["managers"] │ │ │ │ │ │ │ │ def __init__(self, name, managers): │ │ │ │ self.managers = managers │ │ │ │ @@ -973,15 +974,15 @@ │ │ │ │ │ │ │ │ @cached_property │ │ │ │ def model_name_lower(self): │ │ │ │ return self.model_name.lower() │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AddIndex(IndexOperation): │ │ │ │ """Add an index on a model.""" │ │ │ │ │ │ │ │ def __init__(self, model_name, index): │ │ │ │ self.model_name = model_name │ │ │ │ if not index.name: │ │ │ │ raise ValueError( │ │ │ │ @@ -1030,15 +1031,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "%s_%s" % (self.model_name_lower, self.index.name.lower())
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RemoveIndex(IndexOperation): │ │ │ │ """Remove an index from a model.""" │ │ │ │ │ │ │ │ def __init__(self, model_name, name): │ │ │ │ self.model_name = model_name │ │ │ │ self.name = name │ │ │ │ │ │ │ │ @@ -1076,15 +1077,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "remove_%s_%s" % (self.model_name_lower, self.name.lower())
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RenameIndex(IndexOperation): │ │ │ │ """Rename an index.""" │ │ │ │ │ │ │ │ def __init__(self, model_name, new_name, old_name=None, old_fields=None): │ │ │ │ if not old_name and not old_fields: │ │ │ │ raise ValueError( │ │ │ │ "RenameIndex requires one of old_name and old_fields arguments to be " │ │ │ │ @@ -1228,15 +1229,15 @@ │ │ │ │ ) │ │ │ │ ] │ │ │ │ return super().reduce(operation, app_label)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class AddConstraint(IndexOperation): │ │ │ │ option_name = "constraints" │ │ │ │ │ │ │ │ def __init__(self, model_name, constraint): │ │ │ │ self.model_name = model_name │ │ │ │ self.constraint = constraint │ │ │ │ │ │ │ │ @@ -1272,15 +1273,15 @@ │ │ │ │ @property │ │ │ │ def migration_name_fragment(self): │ │ │ │ return "%s_%s" % (self.model_name_lower, self.constraint.name.lower())
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RemoveConstraint(IndexOperation): │ │ │ │ option_name = "constraints" │ │ │ │ │ │ │ │ def __init__(self, model_name, name): │ │ │ │ self.model_name = model_name │ │ │ │ self.name = name │ │ │ │ │ │ │ │ @@ -1326,35 +1327,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..mmooddeellss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..mmooddeellss ************ │ │ │ │ │ from django.db import models │ │ │ │ │ from django.db.migrations.operations.base import Operation │ │ │ │ │ from django.db.migrations.state import ModelState │ │ │ │ │ from django.db.migrations.utils import field_references, resolve_relation │ │ │ │ │ from django.db.models.options import normalize_together │ │ │ │ │ from django.utils.functional import cached_property │ │ │ │ │ │ │ │ │ │ @@ -41,15 +41,15 @@ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ def can_reduce_through(self, operation, app_label): │ │ │ │ │ return not operation.references_model(self.name, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CreateModel(ModelOperation): │ │ │ │ │ """Create a model's table.""" │ │ │ │ │ │ │ │ │ │ serialization_expand_args = ["fields", "options", "managers"] │ │ │ │ │ │ │ │ │ │ def __init__(self, name, fields, options=None, bases=None, managers=None): │ │ │ │ │ self.fields = fields │ │ │ │ │ @@ -386,15 +386,15 @@ │ │ │ │ │ ] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class DeleteModel(ModelOperation): │ │ │ │ │ """Drop a model's table.""" │ │ │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ │ kwargs = { │ │ │ │ │ "name": self.name, │ │ │ │ │ } │ │ │ │ │ @@ -427,15 +427,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "delete_%s" % self.name_lower │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RenameModel(ModelOperation): │ │ │ │ │ """Rename a model.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, old_name, new_name): │ │ │ │ │ self.old_name = old_name │ │ │ │ │ self.new_name = new_name │ │ │ │ │ super().__init__(old_name) │ │ │ │ │ @@ -565,15 +565,15 @@ │ │ │ │ │ and self.name_lower == operation.name_lower │ │ │ │ │ ): │ │ │ │ │ return [operation] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterModelTable(ModelOptionOperation): │ │ │ │ │ """Rename a model's table.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, name, table): │ │ │ │ │ self.table = table │ │ │ │ │ super().__init__(name) │ │ │ │ │ │ │ │ │ │ @@ -625,15 +625,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "alter_%s_table" % self.name_lower │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterModelTableComment(ModelOptionOperation): │ │ │ │ │ def __init__(self, name, table_comment): │ │ │ │ │ self.table_comment = table_comment │ │ │ │ │ super().__init__(name) │ │ │ │ │ │ │ │ │ │ def deconstruct(self): │ │ │ │ │ kwargs = { │ │ │ │ │ @@ -740,15 +740,15 @@ │ │ │ │ │ return super().can_reduce_through(operation, app_label) or ( │ │ │ │ │ isinstance(operation, AlterTogetherOptionOperation) │ │ │ │ │ and type(operation) is not type(self) │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterUniqueTogether(AlterTogetherOptionOperation): │ │ │ │ │ """ │ │ │ │ │ Change the value of unique_together to the target one. │ │ │ │ │ Input value of unique_together must be a set of tuples. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ option_name = "unique_together" │ │ │ │ │ @@ -756,15 +756,15 @@ │ │ │ │ │ def __init__(self, name, unique_together): │ │ │ │ │ super().__init__(name, unique_together) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterIndexTogether(AlterTogetherOptionOperation): │ │ │ │ │ """ │ │ │ │ │ Change the value of index_together to the target one. │ │ │ │ │ Input value of index_together must be a set of tuples. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ option_name = "index_together" │ │ │ │ │ @@ -772,15 +772,15 @@ │ │ │ │ │ def __init__(self, name, index_together): │ │ │ │ │ super().__init__(name, index_together) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterOrderWithRespectTo(ModelOptionOperation): │ │ │ │ │ """Represent a change with the order_with_respect_to option.""" │ │ │ │ │ │ │ │ │ │ option_name = "order_with_respect_to" │ │ │ │ │ │ │ │ │ │ def __init__(self, name, order_with_respect_to): │ │ │ │ │ self.order_with_respect_to = order_with_respect_to │ │ │ │ │ @@ -847,15 +847,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "alter_%s_order_with_respect_to" % self.name_lower │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterModelOptions(ModelOptionOperation): │ │ │ │ │ """ │ │ │ │ │ Set new model options that don't directly affect the database schema │ │ │ │ │ (like verbose_name, permissions, ordering). Python code in migrations │ │ │ │ │ may still need them. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -908,15 +908,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "alter_%s_options" % self.name_lower │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AlterModelManagers(ModelOptionOperation): │ │ │ │ │ """Alter the model's managers.""" │ │ │ │ │ │ │ │ │ │ serialization_expand_args = ["managers"] │ │ │ │ │ │ │ │ │ │ def __init__(self, name, managers): │ │ │ │ │ self.managers = managers │ │ │ │ │ @@ -951,15 +951,15 @@ │ │ │ │ │ │ │ │ │ │ @cached_property │ │ │ │ │ def model_name_lower(self): │ │ │ │ │ return self.model_name.lower() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AddIndex(IndexOperation): │ │ │ │ │ """Add an index on a model.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, index): │ │ │ │ │ self.model_name = model_name │ │ │ │ │ if not index.name: │ │ │ │ │ raise ValueError( │ │ │ │ │ @@ -1012,15 +1012,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "%s_%s" % (self.model_name_lower, self.index.name.lower()) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RemoveIndex(IndexOperation): │ │ │ │ │ """Remove an index from a model.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, name): │ │ │ │ │ self.model_name = model_name │ │ │ │ │ self.name = name │ │ │ │ │ │ │ │ │ │ @@ -1062,15 +1062,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "remove_%s_%s" % (self.model_name_lower, self.name.lower()) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RenameIndex(IndexOperation): │ │ │ │ │ """Rename an index.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, new_name, old_name=None, old_fields=None): │ │ │ │ │ if not old_name and not old_fields: │ │ │ │ │ raise ValueError( │ │ │ │ │ "RenameIndex requires one of old_name and old_fields arguments │ │ │ │ │ @@ -1222,15 +1222,15 @@ │ │ │ │ │ ] │ │ │ │ │ return super().reduce(operation, app_label) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class AddConstraint(IndexOperation): │ │ │ │ │ option_name = "constraints" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, constraint): │ │ │ │ │ self.model_name = model_name │ │ │ │ │ self.constraint = constraint │ │ │ │ │ │ │ │ │ │ @@ -1269,15 +1269,15 @@ │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "%s_%s" % (self.model_name_lower, self.constraint.name.lower()) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RemoveConstraint(IndexOperation): │ │ │ │ │ option_name = "constraints" │ │ │ │ │ │ │ │ │ │ def __init__(self, model_name, name): │ │ │ │ │ self.model_name = model_name │ │ │ │ │ self.name = name │ │ │ │ │ │ │ │ │ │ @@ -1315,12 +1315,12 @@ │ │ │ │ │ return "Remove constraint %s from model %s" % (self.name, │ │ │ │ │ self.model_name) │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def migration_name_fragment(self): │ │ │ │ │ return "remove_%s_%s" % (self.model_name_lower, self.name.lower()) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/migrations/operations/special.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.migrations.operations.special — Django 4.2.13 documentation │ │ │ │ + django.db.migrations.operations.special — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.migrations.operations.special

│ │ │ │ +  

Broncode voor django.db.migrations.operations.special

│ │ │ │  from django.db import router
│ │ │ │  
│ │ │ │  from .base import Operation
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class SeparateDatabaseAndState(Operation): │ │ │ │ """ │ │ │ │ Take two lists of operations - ones that will be used for the database, │ │ │ │ and ones that will be used for the state change. This allows operations │ │ │ │ that don't support state change to have it applied, or have operations │ │ │ │ that affect the state or not the database, or so on. │ │ │ │ """ │ │ │ │ @@ -133,15 +134,15 @@ │ │ │ │ │ │ │ │ def describe(self): │ │ │ │ return "Custom state/database change combination"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RunSQL(Operation): │ │ │ │ """ │ │ │ │ Run some raw SQL. A reverse SQL statement may be provided. │ │ │ │ │ │ │ │ Also accept a list of operations that represent the state change effected │ │ │ │ by this SQL change, in case it's custom column/table creation/deletion. │ │ │ │ """ │ │ │ │ @@ -209,15 +210,15 @@ │ │ │ │ statements = schema_editor.connection.ops.prepare_sql_script(sqls) │ │ │ │ for statement in statements: │ │ │ │ schema_editor.execute(statement, params=None)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class RunPython(Operation): │ │ │ │ """ │ │ │ │ Run Python code in a context suitable for doing versioned ORM operations. │ │ │ │ """ │ │ │ │ │ │ │ │ reduces_to_sql = False │ │ │ │ │ │ │ │ @@ -281,15 +282,15 @@ │ │ │ │ ): │ │ │ │ self.reverse_code(from_state.apps, schema_editor) │ │ │ │ │ │ │ │ def describe(self): │ │ │ │ return "Raw Python operation" │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @staticmethod │ │ │ │ def noop(apps, schema_editor): │ │ │ │ return None
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ @@ -299,35 +300,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,18 +1,18 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..ssppeecciiaall ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmiiggrraattiioonnss..ooppeerraattiioonnss..ssppeecciiaall ************ │ │ │ │ │ from django.db import router │ │ │ │ │ │ │ │ │ │ from .base import Operation │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class SeparateDatabaseAndState(Operation): │ │ │ │ │ """ │ │ │ │ │ Take two lists of operations - ones that will be used for the database, │ │ │ │ │ and ones that will be used for the state change. This allows operations │ │ │ │ │ that don't support state change to have it applied, or have operations │ │ │ │ │ that affect the state or not the database, or so on. │ │ │ │ │ """ │ │ │ │ │ @@ -69,15 +69,15 @@ │ │ │ │ │ def describe(self): │ │ │ │ │ return "Custom state/database change combination" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RunSQL(Operation): │ │ │ │ │ """ │ │ │ │ │ Run some raw SQL. A reverse SQL statement may be provided. │ │ │ │ │ │ │ │ │ │ Also accept a list of operations that represent the state change effected │ │ │ │ │ by this SQL change, in case it's custom column/table creation/deletion. │ │ │ │ │ """ │ │ │ │ │ @@ -150,15 +150,15 @@ │ │ │ │ │ for statement in statements: │ │ │ │ │ schema_editor.execute(statement, params=None) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RunPython(Operation): │ │ │ │ │ """ │ │ │ │ │ Run Python code in a context suitable for doing versioned ORM operations. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ reduces_to_sql = False │ │ │ │ │ │ │ │ │ │ @@ -228,18 +228,18 @@ │ │ │ │ │ ): │ │ │ │ │ self.reverse_code(from_state.apps, schema_editor) │ │ │ │ │ │ │ │ │ │ def describe(self): │ │ │ │ │ return "Raw Python operation" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @staticmethod │ │ │ │ │ def noop(apps, schema_editor): │ │ │ │ │ return None │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/aggregates.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.aggregates — Django 4.2.13 documentation │ │ │ │ + django.db.models.aggregates — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.models.aggregates

│ │ │ │ +  

Broncode voor django.db.models.aggregates

│ │ │ │  """
│ │ │ │  Classes to represent the definitions of aggregate functions.
│ │ │ │  """
│ │ │ │  from django.core.exceptions import FieldError, FullResultSet
│ │ │ │  from django.db.models.expressions import Case, Func, Star, Value, When
│ │ │ │  from django.db.models.fields import IntegerField
│ │ │ │  from django.db.models.functions.comparison import Coalesce
│ │ │ │ @@ -92,15 +93,15 @@
│ │ │ │      "StdDev",
│ │ │ │      "Sum",
│ │ │ │      "Variance",
│ │ │ │  ]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Aggregate(Func): │ │ │ │ template = "%(function)s(%(distinct)s%(expressions)s)" │ │ │ │ contains_aggregate = True │ │ │ │ name = None │ │ │ │ filter_template = "%s FILTER (WHERE %%(filter)s)" │ │ │ │ window_compatible = True │ │ │ │ allow_distinct = False │ │ │ │ @@ -224,24 +225,24 @@ │ │ │ │ if self.filter: │ │ │ │ options["filter"] = self.filter │ │ │ │ return options
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Avg(FixDurationInputMixin, NumericOutputFieldMixin, Aggregate): │ │ │ │ function = "AVG" │ │ │ │ name = "Avg" │ │ │ │ allow_distinct = True
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Count(Aggregate): │ │ │ │ function = "COUNT" │ │ │ │ name = "Count" │ │ │ │ output_field = IntegerField() │ │ │ │ allow_distinct = True │ │ │ │ empty_result_set_value = 0 │ │ │ │ │ │ │ │ @@ -251,54 +252,54 @@ │ │ │ │ if isinstance(expression, Star) and filter is not None: │ │ │ │ raise ValueError("Star cannot be used with filter. Please specify a field.") │ │ │ │ super().__init__(expression, filter=filter, **extra)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Max(Aggregate): │ │ │ │ function = "MAX" │ │ │ │ name = "Max"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Min(Aggregate): │ │ │ │ function = "MIN" │ │ │ │ name = "Min"
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class StdDev(NumericOutputFieldMixin, Aggregate): │ │ │ │ name = "StdDev" │ │ │ │ │ │ │ │ def __init__(self, expression, sample=False, **extra): │ │ │ │ self.function = "STDDEV_SAMP" if sample else "STDDEV_POP" │ │ │ │ super().__init__(expression, **extra) │ │ │ │ │ │ │ │ def _get_repr_options(self): │ │ │ │ return {**super()._get_repr_options(), "sample": self.function == "STDDEV_SAMP"}
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Sum(FixDurationInputMixin, Aggregate): │ │ │ │ function = "SUM" │ │ │ │ name = "Sum" │ │ │ │ allow_distinct = True
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Variance(NumericOutputFieldMixin, Aggregate): │ │ │ │ name = "Variance" │ │ │ │ │ │ │ │ def __init__(self, expression, sample=False, **extra): │ │ │ │ self.function = "VAR_SAMP" if sample else "VAR_POP" │ │ │ │ super().__init__(expression, **extra) │ │ │ │ │ │ │ │ @@ -313,35 +314,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..aaggggrreeggaatteess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..aaggggrreeggaatteess ************ │ │ │ │ │ """ │ │ │ │ │ Classes to represent the definitions of aggregate functions. │ │ │ │ │ """ │ │ │ │ │ from django.core.exceptions import FieldError, FullResultSet │ │ │ │ │ from django.db.models.expressions import Case, Func, Star, Value, When │ │ │ │ │ from django.db.models.fields import IntegerField │ │ │ │ │ from django.db.models.functions.comparison import Coalesce │ │ │ │ │ @@ -23,15 +23,15 @@ │ │ │ │ │ "StdDev", │ │ │ │ │ "Sum", │ │ │ │ │ "Variance", │ │ │ │ │ ] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Aggregate(Func): │ │ │ │ │ template = "%(function)s(%(distinct)s%(expressions)s)" │ │ │ │ │ contains_aggregate = True │ │ │ │ │ name = None │ │ │ │ │ filter_template = "%s FILTER (WHERE %%(filter)s)" │ │ │ │ │ window_compatible = True │ │ │ │ │ allow_distinct = False │ │ │ │ │ @@ -164,25 +164,25 @@ │ │ │ │ │ options["filter"] = self.filter │ │ │ │ │ return options │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Avg(FixDurationInputMixin, NumericOutputFieldMixin, Aggregate): │ │ │ │ │ function = "AVG" │ │ │ │ │ name = "Avg" │ │ │ │ │ allow_distinct = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Count(Aggregate): │ │ │ │ │ function = "COUNT" │ │ │ │ │ name = "Count" │ │ │ │ │ output_field = IntegerField() │ │ │ │ │ allow_distinct = True │ │ │ │ │ empty_result_set_value = 0 │ │ │ │ │ │ │ │ │ │ @@ -194,33 +194,33 @@ │ │ │ │ │ field.") │ │ │ │ │ super().__init__(expression, filter=filter, **extra) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Max(Aggregate): │ │ │ │ │ function = "MAX" │ │ │ │ │ name = "Max" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Min(Aggregate): │ │ │ │ │ function = "MIN" │ │ │ │ │ name = "Min" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class StdDev(NumericOutputFieldMixin, Aggregate): │ │ │ │ │ name = "StdDev" │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, sample=False, **extra): │ │ │ │ │ self.function = "STDDEV_SAMP" if sample else "STDDEV_POP" │ │ │ │ │ super().__init__(expression, **extra) │ │ │ │ │ │ │ │ │ │ @@ -228,34 +228,34 @@ │ │ │ │ │ return {**super()._get_repr_options(), "sample": self.function == │ │ │ │ │ "STDDEV_SAMP"} │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Sum(FixDurationInputMixin, Aggregate): │ │ │ │ │ function = "SUM" │ │ │ │ │ name = "Sum" │ │ │ │ │ allow_distinct = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Variance(NumericOutputFieldMixin, Aggregate): │ │ │ │ │ name = "Variance" │ │ │ │ │ │ │ │ │ │ def __init__(self, expression, sample=False, **extra): │ │ │ │ │ self.function = "VAR_SAMP" if sample else "VAR_POP" │ │ │ │ │ super().__init__(expression, **extra) │ │ │ │ │ │ │ │ │ │ def _get_repr_options(self): │ │ │ │ │ return {**super()._get_repr_options(), "sample": self.function == │ │ │ │ │ "VAR_SAMP"} │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/base.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.base — Django 4.2.13 documentation │ │ │ │ + django.db.models.base — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.models.base

│ │ │ │ +  

Broncode voor django.db.models.base

│ │ │ │  import copy
│ │ │ │  import inspect
│ │ │ │  import warnings
│ │ │ │  from functools import partialmethod
│ │ │ │  from itertools import chain
│ │ │ │  
│ │ │ │  from asgiref.sync import sync_to_async
│ │ │ │ @@ -526,15 +527,15 @@
│ │ │ │      # explicit (non-auto) PKs. This impacts validation only; it has no effect
│ │ │ │      # on the actual save.
│ │ │ │      adding = True
│ │ │ │      fields_cache = ModelStateFieldsCacheDescriptor()
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class Model(AltersData, metaclass=ModelBase): │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ # Alias some things as locals to avoid repeat global lookups │ │ │ │ cls = self.__class__ │ │ │ │ opts = self._meta │ │ │ │ _setattr = setattr │ │ │ │ _DEFERRED = DEFERRED │ │ │ │ @@ -643,15 +644,15 @@ │ │ │ │ f"{cls.__name__}() got unexpected keyword arguments: " │ │ │ │ f"{unexpected_names}" │ │ │ │ ) │ │ │ │ super().__init__() │ │ │ │ post_init.send(sender=cls, instance=self) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ @classmethod │ │ │ │ def from_db(cls, db, field_names, values): │ │ │ │ if len(values) != len(cls._meta.concrete_fields): │ │ │ │ values_iter = iter(values) │ │ │ │ values = [ │ │ │ │ next(values_iter) if f.attname in field_names else DEFERRED │ │ │ │ for f in cls._meta.concrete_fields │ │ │ │ @@ -662,34 +663,34 @@ │ │ │ │ return new
│ │ │ │ │ │ │ │ │ │ │ │ def __repr__(self): │ │ │ │ return "<%s: %s>" % (self.__class__.__name__, self) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def __str__(self): │ │ │ │ return "%s object (%s)" % (self.__class__.__name__, self.pk)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def __eq__(self, other): │ │ │ │ if not isinstance(other, Model): │ │ │ │ return NotImplemented │ │ │ │ if self._meta.concrete_model != other._meta.concrete_model: │ │ │ │ return False │ │ │ │ my_pk = self.pk │ │ │ │ if my_pk is None: │ │ │ │ return self is other │ │ │ │ return my_pk == other.pk
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def __hash__(self): │ │ │ │ if self.pk is None: │ │ │ │ raise TypeError("Model instances without primary key value are unhashable") │ │ │ │ return hash(self.pk)
│ │ │ │ │ │ │ │ │ │ │ │ def __reduce__(self): │ │ │ │ @@ -746,28 +747,28 @@ │ │ │ │ if parent_link and parent_link != self._meta.pk: │ │ │ │ setattr(self, parent_link.target_field.attname, value) │ │ │ │ return setattr(self, self._meta.pk.attname, value) │ │ │ │ │ │ │ │ pk = property(_get_pk_val, _set_pk_val) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def get_deferred_fields(self): │ │ │ │ """ │ │ │ │ Return a set containing names of deferred fields for this instance. │ │ │ │ """ │ │ │ │ return { │ │ │ │ f.attname │ │ │ │ for f in self._meta.concrete_fields │ │ │ │ if f.attname not in self.__dict__ │ │ │ │ }
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def refresh_from_db(self, using=None, fields=None): │ │ │ │ """ │ │ │ │ Reload field values from the database. │ │ │ │ │ │ │ │ By default, the reloading happens from the database this instance was │ │ │ │ loaded from, or by the read router if this instance wasn't loaded from │ │ │ │ any database. The using parameter will override the default. │ │ │ │ @@ -834,15 +835,15 @@ │ │ │ │ if field.is_relation and field.is_cached(self): │ │ │ │ field.delete_cached_value(self) │ │ │ │ │ │ │ │ self._state.db = db_instance._state.db
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ async def arefresh_from_db(self, using=None, fields=None): │ │ │ │ return await sync_to_async(self.refresh_from_db)(using=using, fields=fields)
│ │ │ │ │ │ │ │ │ │ │ │ def serializable_value(self, field_name): │ │ │ │ """ │ │ │ │ Return the value of the field name for this instance. If the field is │ │ │ │ @@ -857,15 +858,15 @@ │ │ │ │ try: │ │ │ │ field = self._meta.get_field(field_name) │ │ │ │ except FieldDoesNotExist: │ │ │ │ return getattr(self, field_name) │ │ │ │ return getattr(self, field.attname) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save( │ │ │ │ self, force_insert=False, force_update=False, using=None, update_fields=None │ │ │ │ ): │ │ │ │ """ │ │ │ │ Save the current instance. Override this in a subclass if you want to │ │ │ │ control the saving process. │ │ │ │ │ │ │ │ @@ -916,15 +917,15 @@ │ │ │ │ update_fields=update_fields, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ save.alters_data = True │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ async def asave( │ │ │ │ self, force_insert=False, force_update=False, using=None, update_fields=None │ │ │ │ ): │ │ │ │ return await sync_to_async(self.save)( │ │ │ │ force_insert=force_insert, │ │ │ │ force_update=force_update, │ │ │ │ using=using, │ │ │ │ @@ -1219,15 +1220,15 @@ │ │ │ │ if obj and obj.pk is None: │ │ │ │ raise ValueError( │ │ │ │ f"{operation_name}() prohibited to prevent data loss due to " │ │ │ │ f"unsaved related object '{field.name}'." │ │ │ │ ) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete(self, using=None, keep_parents=False): │ │ │ │ if self.pk is None: │ │ │ │ raise ValueError( │ │ │ │ "%s object can't be deleted because its %s attribute is set " │ │ │ │ "to None." % (self._meta.object_name, self._meta.pk.attname) │ │ │ │ ) │ │ │ │ using = using or router.db_for_write(self.__class__, instance=self) │ │ │ │ @@ -1235,15 +1236,15 @@ │ │ │ │ collector.collect([self], keep_parents=keep_parents) │ │ │ │ return collector.delete()
│ │ │ │ │ │ │ │ │ │ │ │ delete.alters_data = True │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ async def adelete(self, using=None, keep_parents=False): │ │ │ │ return await sync_to_async(self.delete)( │ │ │ │ using=using, │ │ │ │ keep_parents=keep_parents, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ @@ -1315,27 +1316,27 @@ │ │ │ │ if self.pk is None: │ │ │ │ raise ValueError( │ │ │ │ "Unsaved model instance %r cannot be used in an ORM query." % self │ │ │ │ ) │ │ │ │ return getattr(self, field.remote_field.get_related_field().attname) │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def clean(self): │ │ │ │ """ │ │ │ │ Hook for doing any extra model-wide validation after clean() has been │ │ │ │ called on every field by self.clean_fields. Any ValidationError raised │ │ │ │ by this method will not be associated with a particular field; it will │ │ │ │ have a special-case association with the field defined by NON_FIELD_ERRORS. │ │ │ │ """ │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_unique(self, exclude=None): │ │ │ │ """ │ │ │ │ Check unique constraints on the model and raise ValidationError if any │ │ │ │ failed. │ │ │ │ """ │ │ │ │ unique_checks, date_checks = self._get_unique_checks(exclude=exclude) │ │ │ │ │ │ │ │ @@ -1545,15 +1546,15 @@ │ │ │ │ constraints = [(self.__class__, self._meta.constraints)] │ │ │ │ for parent_class in self._meta.get_parent_list(): │ │ │ │ if parent_class._meta.constraints: │ │ │ │ constraints.append((parent_class, parent_class._meta.constraints)) │ │ │ │ return constraints │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate_constraints(self, exclude=None): │ │ │ │ constraints = self.get_constraints() │ │ │ │ using = router.db_for_write(self.__class__, instance=self) │ │ │ │ │ │ │ │ errors = {} │ │ │ │ for model_class, model_constraints in constraints: │ │ │ │ for constraint in model_constraints: │ │ │ │ @@ -1568,15 +1569,15 @@ │ │ │ │ else: │ │ │ │ errors = e.update_error_dict(errors) │ │ │ │ if errors: │ │ │ │ raise ValidationError(errors)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def full_clean(self, exclude=None, validate_unique=True, validate_constraints=True): │ │ │ │ """ │ │ │ │ Call clean_fields(), clean(), validate_unique(), and │ │ │ │ validate_constraints() on the model. Raise a ValidationError for any │ │ │ │ errors that occur. │ │ │ │ """ │ │ │ │ errors = {} │ │ │ │ @@ -1618,15 +1619,15 @@ │ │ │ │ errors = e.update_error_dict(errors) │ │ │ │ │ │ │ │ if errors: │ │ │ │ raise ValidationError(errors)
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def clean_fields(self, exclude=None): │ │ │ │ """ │ │ │ │ Clean all fields and raise a ValidationError containing a dict │ │ │ │ of all validation errors if any occur. │ │ │ │ """ │ │ │ │ if exclude is None: │ │ │ │ exclude = set() │ │ │ │ @@ -2661,35 +2662,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..bbaassee ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..bbaassee ************ │ │ │ │ │ import copy │ │ │ │ │ import inspect │ │ │ │ │ import warnings │ │ │ │ │ from functools import partialmethod │ │ │ │ │ from itertools import chain │ │ │ │ │ │ │ │ │ │ from asgiref.sync import sync_to_async │ │ │ │ │ @@ -467,15 +467,15 @@ │ │ │ │ │ # explicit (non-auto) PKs. This impacts validation only; it has no effect │ │ │ │ │ # on the actual save. │ │ │ │ │ adding = True │ │ │ │ │ fields_cache = ModelStateFieldsCacheDescriptor() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Model(AltersData, metaclass=ModelBase): │ │ │ │ │ def __init__(self, *args, **kwargs): │ │ │ │ │ # Alias some things as locals to avoid repeat global lookups │ │ │ │ │ cls = self.__class__ │ │ │ │ │ opts = self._meta │ │ │ │ │ _setattr = setattr │ │ │ │ │ _DEFERRED = DEFERRED │ │ │ │ │ @@ -588,15 +588,15 @@ │ │ │ │ │ f"{cls.__name__}() got unexpected keyword arguments: " │ │ │ │ │ f"{unexpected_names}" │ │ │ │ │ ) │ │ │ │ │ super().__init__() │ │ │ │ │ post_init.send(sender=cls, instance=self) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @classmethod │ │ │ │ │ def from_db(cls, db, field_names, values): │ │ │ │ │ if len(values) != len(cls._meta.concrete_fields): │ │ │ │ │ values_iter = iter(values) │ │ │ │ │ values = [ │ │ │ │ │ next(values_iter) if f.attname in field_names else DEFERRED │ │ │ │ │ for f in cls._meta.concrete_fields │ │ │ │ │ @@ -608,36 +608,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def __repr__(self): │ │ │ │ │ return "<%s: %s>" % (self.__class__.__name__, self) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def __str__(self): │ │ │ │ │ return "%s object (%s)" % (self.__class__.__name__, self.pk) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def __eq__(self, other): │ │ │ │ │ if not isinstance(other, Model): │ │ │ │ │ return NotImplemented │ │ │ │ │ if self._meta.concrete_model != other._meta.concrete_model: │ │ │ │ │ return False │ │ │ │ │ my_pk = self.pk │ │ │ │ │ if my_pk is None: │ │ │ │ │ return self is other │ │ │ │ │ return my_pk == other.pk │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def __hash__(self): │ │ │ │ │ if self.pk is None: │ │ │ │ │ raise TypeError("Model instances without primary key value are │ │ │ │ │ unhashable") │ │ │ │ │ return hash(self.pk) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -696,29 +696,29 @@ │ │ │ │ │ if parent_link and parent_link != self._meta.pk: │ │ │ │ │ setattr(self, parent_link.target_field.attname, value) │ │ │ │ │ return setattr(self, self._meta.pk.attname, value) │ │ │ │ │ │ │ │ │ │ pk = property(_get_pk_val, _set_pk_val) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def get_deferred_fields(self): │ │ │ │ │ """ │ │ │ │ │ Return a set containing names of deferred fields for this instance. │ │ │ │ │ """ │ │ │ │ │ return { │ │ │ │ │ f.attname │ │ │ │ │ for f in self._meta.concrete_fields │ │ │ │ │ if f.attname not in self.__dict__ │ │ │ │ │ } │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def refresh_from_db(self, using=None, fields=None): │ │ │ │ │ """ │ │ │ │ │ Reload field values from the database. │ │ │ │ │ │ │ │ │ │ By default, the reloading happens from the database this instance was │ │ │ │ │ loaded from, or by the read router if this instance wasn't loaded from │ │ │ │ │ any database. The using parameter will override the default. │ │ │ │ │ @@ -787,15 +787,15 @@ │ │ │ │ │ field.delete_cached_value(self) │ │ │ │ │ │ │ │ │ │ self._state.db = db_instance._state.db │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ async def arefresh_from_db(self, using=None, fields=None): │ │ │ │ │ return await sync_to_async(self.refresh_from_db)(using=using, │ │ │ │ │ fields=fields) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def serializable_value(self, field_name): │ │ │ │ │ @@ -812,15 +812,15 @@ │ │ │ │ │ try: │ │ │ │ │ field = self._meta.get_field(field_name) │ │ │ │ │ except FieldDoesNotExist: │ │ │ │ │ return getattr(self, field_name) │ │ │ │ │ return getattr(self, field.attname) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save( │ │ │ │ │ self, force_insert=False, force_update=False, using=None, │ │ │ │ │ update_fields=None │ │ │ │ │ ): │ │ │ │ │ """ │ │ │ │ │ Save the current instance. Override this in a subclass if you want to │ │ │ │ │ control the saving process. │ │ │ │ │ @@ -874,15 +874,15 @@ │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ save.alters_data = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ async def asave( │ │ │ │ │ self, force_insert=False, force_update=False, using=None, │ │ │ │ │ update_fields=None │ │ │ │ │ ): │ │ │ │ │ return await sync_to_async(self.save)( │ │ │ │ │ force_insert=force_insert, │ │ │ │ │ force_update=force_update, │ │ │ │ │ @@ -1191,15 +1191,15 @@ │ │ │ │ │ raise ValueError( │ │ │ │ │ f"{operation_name}() prohibited to prevent data loss │ │ │ │ │ due to " │ │ │ │ │ f"unsaved related object '{field.name}'." │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete(self, using=None, keep_parents=False): │ │ │ │ │ if self.pk is None: │ │ │ │ │ raise ValueError( │ │ │ │ │ "%s object can't be deleted because its %s attribute is set " │ │ │ │ │ "to None." % (self._meta.object_name, self._meta.pk.attname) │ │ │ │ │ ) │ │ │ │ │ using = using or router.db_for_write(self.__class__, instance=self) │ │ │ │ │ @@ -1208,15 +1208,15 @@ │ │ │ │ │ return collector.delete() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ delete.alters_data = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ async def adelete(self, using=None, keep_parents=False): │ │ │ │ │ return await sync_to_async(self.delete)( │ │ │ │ │ using=using, │ │ │ │ │ keep_parents=keep_parents, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1294,29 +1294,29 @@ │ │ │ │ │ raise ValueError( │ │ │ │ │ "Unsaved model instance %r cannot be used in an ORM query." % │ │ │ │ │ self │ │ │ │ │ ) │ │ │ │ │ return getattr(self, field.remote_field.get_related_field().attname) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def clean(self): │ │ │ │ │ """ │ │ │ │ │ Hook for doing any extra model-wide validation after clean() has been │ │ │ │ │ called on every field by self.clean_fields. Any ValidationError raised │ │ │ │ │ by this method will not be associated with a particular field; it will │ │ │ │ │ have a special-case association with the field defined by │ │ │ │ │ NON_FIELD_ERRORS. │ │ │ │ │ """ │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_unique(self, exclude=None): │ │ │ │ │ """ │ │ │ │ │ Check unique constraints on the model and raise ValidationError if any │ │ │ │ │ failed. │ │ │ │ │ """ │ │ │ │ │ unique_checks, date_checks = self._get_unique_checks(exclude=exclude) │ │ │ │ │ │ │ │ │ │ @@ -1536,15 +1536,15 @@ │ │ │ │ │ for parent_class in self._meta.get_parent_list(): │ │ │ │ │ if parent_class._meta.constraints: │ │ │ │ │ constraints.append((parent_class, │ │ │ │ │ parent_class._meta.constraints)) │ │ │ │ │ return constraints │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate_constraints(self, exclude=None): │ │ │ │ │ constraints = self.get_constraints() │ │ │ │ │ using = router.db_for_write(self.__class__, instance=self) │ │ │ │ │ │ │ │ │ │ errors = {} │ │ │ │ │ for model_class, model_constraints in constraints: │ │ │ │ │ for constraint in model_constraints: │ │ │ │ │ @@ -1561,15 +1561,15 @@ │ │ │ │ │ errors = e.update_error_dict(errors) │ │ │ │ │ if errors: │ │ │ │ │ raise ValidationError(errors) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def full_clean(self, exclude=None, validate_unique=True, │ │ │ │ │ validate_constraints=True): │ │ │ │ │ """ │ │ │ │ │ Call clean_fields(), clean(), validate_unique(), and │ │ │ │ │ validate_constraints() on the model. Raise a ValidationError for any │ │ │ │ │ errors that occur. │ │ │ │ │ """ │ │ │ │ │ @@ -1613,15 +1613,15 @@ │ │ │ │ │ │ │ │ │ │ if errors: │ │ │ │ │ raise ValidationError(errors) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def clean_fields(self, exclude=None): │ │ │ │ │ """ │ │ │ │ │ Clean all fields and raise a ValidationError containing a dict │ │ │ │ │ of all validation errors if any occur. │ │ │ │ │ """ │ │ │ │ │ if exclude is None: │ │ │ │ │ exclude = set() │ │ │ │ │ @@ -2685,12 +2685,12 @@ │ │ │ │ │ else: │ │ │ │ │ # Backwards compat - the model was cached directly in earlier versions. │ │ │ │ │ model = model_id │ │ │ │ │ return model.__new__(model) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ model_unpickle.__safe_for_unpickle__ = True │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/constraints.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.constraints — Django 4.2.13 documentation │ │ │ │ + django.db.models.constraints — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.models.constraints

│ │ │ │ +  

Broncode voor django.db.models.constraints

│ │ │ │  from enum import Enum
│ │ │ │  
│ │ │ │  from django.core.exceptions import FieldError, ValidationError
│ │ │ │  from django.db import connections
│ │ │ │  from django.db.models.expressions import Exists, ExpressionList, F, OrderBy
│ │ │ │  from django.db.models.indexes import IndexExpression
│ │ │ │  from django.db.models.lookups import Exact
│ │ │ │ @@ -83,15 +84,15 @@
│ │ │ │  from django.db.utils import DEFAULT_DB_ALIAS
│ │ │ │  from django.utils.translation import gettext_lazy as _
│ │ │ │  
│ │ │ │  __all__ = ["BaseConstraint", "CheckConstraint", "Deferrable", "UniqueConstraint"]
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class BaseConstraint: │ │ │ │ default_violation_error_message = _("Constraint “%(name)s” is violated.") │ │ │ │ violation_error_message = None │ │ │ │ │ │ │ │ def __init__(self, name, violation_error_message=None): │ │ │ │ self.name = name │ │ │ │ if violation_error_message is not None: │ │ │ │ @@ -109,15 +110,15 @@ │ │ │ │ def create_sql(self, model, schema_editor): │ │ │ │ raise NotImplementedError("This method must be implemented by a subclass.") │ │ │ │ │ │ │ │ def remove_sql(self, model, schema_editor): │ │ │ │ raise NotImplementedError("This method must be implemented by a subclass.") │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def validate(self, model, instance, exclude=None, using=DEFAULT_DB_ALIAS): │ │ │ │ raise NotImplementedError("This method must be implemented by a subclass.")
│ │ │ │ │ │ │ │ │ │ │ │ def get_violation_error_message(self): │ │ │ │ return self.violation_error_message % {"name": self.name} │ │ │ │ │ │ │ │ @@ -135,15 +136,15 @@ │ │ │ │ def clone(self): │ │ │ │ _, args, kwargs = self.deconstruct() │ │ │ │ return self.__class__(*args, **kwargs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class CheckConstraint(BaseConstraint): │ │ │ │ def __init__(self, *, check, name, violation_error_message=None): │ │ │ │ self.check = check │ │ │ │ if not getattr(check, "conditional", False): │ │ │ │ raise TypeError( │ │ │ │ "CheckConstraint.check must be a Q instance or boolean expression." │ │ │ │ ) │ │ │ │ @@ -204,15 +205,15 @@ │ │ │ │ │ │ │ │ # A similar format was proposed for Python 3.10. │ │ │ │ def __repr__(self): │ │ │ │ return f"{self.__class__.__qualname__}.{self._name_}" │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class UniqueConstraint(BaseConstraint): │ │ │ │ def __init__( │ │ │ │ self, │ │ │ │ *expressions, │ │ │ │ fields=(), │ │ │ │ name=None, │ │ │ │ condition=None, │ │ │ │ @@ -462,35 +463,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..ccoonnssttrraaiinnttss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..ccoonnssttrraaiinnttss ************ │ │ │ │ │ from enum import Enum │ │ │ │ │ │ │ │ │ │ from django.core.exceptions import FieldError, ValidationError │ │ │ │ │ from django.db import connections │ │ │ │ │ from django.db.models.expressions import Exists, ExpressionList, F, OrderBy │ │ │ │ │ from django.db.models.indexes import IndexExpression │ │ │ │ │ from django.db.models.lookups import Exact │ │ │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ from django.utils.translation import gettext_lazy as _ │ │ │ │ │ │ │ │ │ │ __all__ = ["BaseConstraint", "CheckConstraint", "Deferrable", │ │ │ │ │ "UniqueConstraint"] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class BaseConstraint: │ │ │ │ │ default_violation_error_message = _("Constraint “%(name)s” is violated.") │ │ │ │ │ violation_error_message = None │ │ │ │ │ │ │ │ │ │ def __init__(self, name, violation_error_message=None): │ │ │ │ │ self.name = name │ │ │ │ │ if violation_error_message is not None: │ │ │ │ │ @@ -44,15 +44,15 @@ │ │ │ │ │ subclass.") │ │ │ │ │ │ │ │ │ │ def remove_sql(self, model, schema_editor): │ │ │ │ │ raise NotImplementedError("This method must be implemented by a │ │ │ │ │ subclass.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def validate(self, model, instance, exclude=None, using=DEFAULT_DB_ALIAS): │ │ │ │ │ raise NotImplementedError("This method must be implemented by a │ │ │ │ │ subclass.") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def get_violation_error_message(self): │ │ │ │ │ @@ -74,15 +74,15 @@ │ │ │ │ │ _, args, kwargs = self.deconstruct() │ │ │ │ │ return self.__class__(*args, **kwargs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class CheckConstraint(BaseConstraint): │ │ │ │ │ def __init__(self, *, check, name, violation_error_message=None): │ │ │ │ │ self.check = check │ │ │ │ │ if not getattr(check, "conditional", False): │ │ │ │ │ raise TypeError( │ │ │ │ │ "CheckConstraint.check must be a Q instance or boolean │ │ │ │ │ expression." │ │ │ │ │ @@ -147,15 +147,15 @@ │ │ │ │ │ │ │ │ │ │ # A similar format was proposed for Python 3.10. │ │ │ │ │ def __repr__(self): │ │ │ │ │ return f"{self.__class__.__qualname__}.{self._name_}" │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class UniqueConstraint(BaseConstraint): │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ *expressions, │ │ │ │ │ fields=(), │ │ │ │ │ name=None, │ │ │ │ │ condition=None, │ │ │ │ │ @@ -416,12 +416,12 @@ │ │ │ │ │ (self.condition))).check( │ │ │ │ │ against, using=using │ │ │ │ │ ): │ │ │ │ │ raise ValidationError(self.get_violation_error_message()) │ │ │ │ │ except FieldError: │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/deletion.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.deletion — Django 4.2.13 documentation │ │ │ │ + django.db.models.deletion — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -

Django 4.2.13 documentation

│ │ │ │ +

Django 4.2.13 documentatie

│ │ │ │ │ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Source code for django.db.models.deletion

│ │ │ │ +  

Broncode voor django.db.models.deletion

│ │ │ │  from collections import Counter, defaultdict
│ │ │ │  from functools import partial, reduce
│ │ │ │  from itertools import chain
│ │ │ │  from operator import attrgetter, or_
│ │ │ │  
│ │ │ │  from django.db import IntegrityError, connections, models, transaction
│ │ │ │  from django.db.models import query_utils, signals, sql
│ │ │ │ @@ -89,30 +90,30 @@
│ │ │ │  class RestrictedError(IntegrityError):
│ │ │ │      def __init__(self, msg, restricted_objects):
│ │ │ │          self.restricted_objects = restricted_objects
│ │ │ │          super().__init__(msg, restricted_objects)
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def CASCADE(collector, field, sub_objs, using): │ │ │ │ collector.collect( │ │ │ │ sub_objs, │ │ │ │ source=field.remote_field.model, │ │ │ │ source_attr=field.name, │ │ │ │ nullable=field.null, │ │ │ │ fail_on_restricted=False, │ │ │ │ ) │ │ │ │ if field.null and not connections[using].features.can_defer_constraint_checks: │ │ │ │ collector.add_field_update(field, None, sub_objs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def PROTECT(collector, field, sub_objs, using): │ │ │ │ raise ProtectedError( │ │ │ │ "Cannot delete some instances of model '%s' because they are " │ │ │ │ "referenced through a protected foreign key: '%s.%s'" │ │ │ │ % ( │ │ │ │ field.remote_field.model.__name__, │ │ │ │ sub_objs[0].__class__.__name__, │ │ │ │ @@ -120,23 +121,23 @@ │ │ │ │ ), │ │ │ │ sub_objs, │ │ │ │ )
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def RESTRICT(collector, field, sub_objs, using): │ │ │ │ collector.add_restricted_objects(field, sub_objs) │ │ │ │ collector.add_dependency(field.remote_field.model, field.model)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def SET(value): │ │ │ │ if callable(value): │ │ │ │ │ │ │ │ def set_on_delete(collector, field, sub_objs, using): │ │ │ │ collector.add_field_update(field, value(), sub_objs) │ │ │ │ │ │ │ │ else: │ │ │ │ @@ -147,35 +148,35 @@ │ │ │ │ set_on_delete.deconstruct = lambda: ("django.db.models.SET", (value,), {}) │ │ │ │ set_on_delete.lazy_sub_objs = True │ │ │ │ return set_on_delete
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def SET_NULL(collector, field, sub_objs, using): │ │ │ │ collector.add_field_update(field, None, sub_objs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ SET_NULL.lazy_sub_objs = True │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def SET_DEFAULT(collector, field, sub_objs, using): │ │ │ │ collector.add_field_update(field, field.get_default(), sub_objs)
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ SET_DEFAULT.lazy_sub_objs = True │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def DO_NOTHING(collector, field, sub_objs, using): │ │ │ │ pass
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def get_candidate_relations_to_delete(opts): │ │ │ │ # The candidate relations are the ones that come from N-1 and 1-1 relations. │ │ │ │ @@ -622,35 +623,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ + up
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..ddeelleettiioonn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..ddeelleettiioonn ************ │ │ │ │ │ from collections import Counter, defaultdict │ │ │ │ │ from functools import partial, reduce │ │ │ │ │ from itertools import chain │ │ │ │ │ from operator import attrgetter, or_ │ │ │ │ │ │ │ │ │ │ from django.db import IntegrityError, connections, models, transaction │ │ │ │ │ from django.db.models import query_utils, signals, sql │ │ │ │ │ @@ -20,15 +20,15 @@ │ │ │ │ │ class RestrictedError(IntegrityError): │ │ │ │ │ def __init__(self, msg, restricted_objects): │ │ │ │ │ self.restricted_objects = restricted_objects │ │ │ │ │ super().__init__(msg, restricted_objects) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def CASCADE(collector, field, sub_objs, using): │ │ │ │ │ collector.collect( │ │ │ │ │ sub_objs, │ │ │ │ │ source=field.remote_field.model, │ │ │ │ │ source_attr=field.name, │ │ │ │ │ nullable=field.null, │ │ │ │ │ fail_on_restricted=False, │ │ │ │ │ @@ -37,15 +37,15 @@ │ │ │ │ │ [using].features.can_defer_constraint_checks: │ │ │ │ │ collector.add_field_update(field, None, sub_objs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def PROTECT(collector, field, sub_objs, using): │ │ │ │ │ raise ProtectedError( │ │ │ │ │ "Cannot delete some instances of model '%s' because they are " │ │ │ │ │ "referenced through a protected foreign key: '%s.%s'" │ │ │ │ │ % ( │ │ │ │ │ field.remote_field.model.__name__, │ │ │ │ │ sub_objs[0].__class__.__name__, │ │ │ │ │ @@ -54,24 +54,24 @@ │ │ │ │ │ sub_objs, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def RESTRICT(collector, field, sub_objs, using): │ │ │ │ │ collector.add_restricted_objects(field, sub_objs) │ │ │ │ │ collector.add_dependency(field.remote_field.model, field.model) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def SET(value): │ │ │ │ │ if callable(value): │ │ │ │ │ │ │ │ │ │ def set_on_delete(collector, field, sub_objs, using): │ │ │ │ │ collector.add_field_update(field, value(), sub_objs) │ │ │ │ │ │ │ │ │ │ else: │ │ │ │ │ @@ -83,37 +83,37 @@ │ │ │ │ │ set_on_delete.lazy_sub_objs = True │ │ │ │ │ return set_on_delete │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def SET_NULL(collector, field, sub_objs, using): │ │ │ │ │ collector.add_field_update(field, None, sub_objs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ SET_NULL.lazy_sub_objs = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def SET_DEFAULT(collector, field, sub_objs, using): │ │ │ │ │ collector.add_field_update(field, field.get_default(), sub_objs) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ SET_DEFAULT.lazy_sub_objs = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def DO_NOTHING(collector, field, sub_objs, using): │ │ │ │ │ pass │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ def get_candidate_relations_to_delete(opts): │ │ │ │ │ @@ -562,12 +562,12 @@ │ │ │ │ │ origin=self.origin, │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ for model, instances in self.data.items(): │ │ │ │ │ for instance in instances: │ │ │ │ │ setattr(instance, model._meta.pk.attname, None) │ │ │ │ │ return sum(deleted_counter.values()), dict(deleted_counter) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/expressions.html │ │ │ │ @@ -1,17862 +1,17874 @@ │ │ │ │ 00000000: 3c21 444f 4354 5950 4520 6874 6d6c 3e0a . │ │ │ │ -00000010: 0a3c 6874 6d6c 206c 616e 673d 2265 6e22 .. . │ │ │ │ 00000050: 3c6d 6574 6120 6368 6172 7365 743d 2275 . . django.db.model │ │ │ │ 000000d0: 732e 6578 7072 6573 7369 6f6e 7320 2623 s.expressions &# │ │ │ │ 000000e0: 3832 3132 3b20 446a 616e 676f 2034 2e32 8212; Django 4.2 │ │ │ │ -000000f0: 2e31 3320 646f 6375 6d65 6e74 6174 696f .13 documentatio │ │ │ │ -00000100: 6e3c 2f74 6974 6c65 3e0a 2020 2020 3c6c n. . < │ │ │ │ -00000170: 6c69 6e6b 2072 656c 3d22 7374 796c 6573 link rel="styles │ │ │ │ -00000180: 6865 6574 2220 7479 7065 3d22 7465 7874 heet" type="text │ │ │ │ -00000190: 2f63 7373 2220 6872 6566 3d22 2e2e 2f2e /css" href="../. │ │ │ │ -000001a0: 2e2f 2e2e 2f2e 2e2f 5f73 7461 7469 632f ./../../_static/ │ │ │ │ -000001b0: 6465 6661 756c 742e 6373 733f 763d 6266 default.css?v=bf │ │ │ │ -000001c0: 3464 3734 6166 2220 2f3e 0a20 2020 203c 4d74af" />. < │ │ │ │ -000001d0: 7363 7269 7074 2073 7263 3d22 2e2e 2f2e script src="../. │ │ │ │ -000001e0: 2e2f 2e2e 2f2e 2e2f 5f73 7461 7469 632f ./../../_static/ │ │ │ │ -000001f0: 646f 6375 6d65 6e74 6174 696f 6e5f 6f70 documentation_op │ │ │ │ -00000200: 7469 6f6e 732e 6a73 3f76 3d39 3466 6332 tions.js?v=94fc2 │ │ │ │ -00000210: 6166 6122 3e3c 2f73 6372 6970 743e 0a20 afa">. │ │ │ │ -00000220: 2020 203c 7363 7269 7074 2073 7263 3d22 . │ │ │ │ -00000880: 0a0a 2020 3c2f 6865 6164 3e3c 626f 6479 .. ..
. │ │ │ │ -000008b0: 3c64 6976 2069 643d 2263 7573 746f 6d2d
.
.

Django 4.2.13 │ │ │ │ -00000920: 646f 6375 6d65 6e74 6174 696f 6e3c 2f61 documentation

. . Ho │ │ │ │ -00000990: 6d65 3c2f 613e 2020 7c0a 2020 2020 2020 me |. │ │ │ │ -000009a0: 2020 3c61 2074 6974 6c65 3d22 5461 626c │ │ │ │ -000009e0: 5461 626c 6520 6f66 2063 6f6e 7465 6e74 Table of content │ │ │ │ -000009f0: 733c 2f61 3e20 207c 0a20 2020 2020 2020 s |. │ │ │ │ -00000a00: 203c 6120 7469 746c 653d 2247 6c6f 6261 Index< │ │ │ │ -00000a40: 2f61 3e20 207c 0a20 2020 2020 2020 203c /a> |. < │ │ │ │ -00000a50: 6120 7469 746c 653d 224d 6f64 756c 6520 a title="Module │ │ │ │ -00000a60: 696e 6465 7822 2068 7265 663d 222e 2e2f index" href="../ │ │ │ │ -00000a70: 2e2e 2f2e 2e2f 2e2e 2f70 792d 6d6f 6469 ../../../py-modi │ │ │ │ -00000a80: 6e64 6578 2e68 746d 6c22 3e4d 6f64 756c ndex.html">Modul │ │ │ │ -00000a90: 6573 3c2f 613e 0a20 2020 2020 203c 2f64 es. .
. │ │ │ │ -00000ac0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f2e │ │ │ │ -00000b00: 7570 3c2f 613e 3c2f 6469 763e 0a20 2020 up
. │ │ │ │ -00000b10: 203c 2f64 6976 3e0a 0a20 2020 203c 6469
.. . │ │ │ │ -00000b30: 203c 6469 7620 6964 3d22 7975 692d 6d61
. │ │ │ │ -00000b60: 0a20 2020 2020 2020 2020 203c 6469 7620 .
. │ │ │ │ -00000bb0: 2020 2020 2020 0a20 203c 6831 3e53 6f75 .

Sou │ │ │ │ -00000bc0: 7263 6520 636f 6465 2066 6f72 2064 6a61 rce code for dja │ │ │ │ -00000bd0: 6e67 6f2e 6462 2e6d 6f64 656c 732e 6578 ngo.db.models.ex │ │ │ │ -00000be0: 7072 6573 7369 6f6e 733c 2f68 313e 3c64 pressions

.import<
│ │ │ │ -00000c30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> copy.import datetime.import functools.import inspect.import warnings.from
│ │ │ │ -00000d70: 203c 7370 616e 2063 6c61 7373 3d22 6e6e   collections import defaultdict<
│ │ │ │ -00000dd0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61  /span>.from decimal import Decimal.from <
│ │ │ │ -00000e70: 7370 616e 2063 6c61 7373 3d22 6e6e 223e  span class="nn">
│ │ │ │ -00000e80: 7575 6964 3c2f 7370 616e 3e20 3c73 7061  uuid imp
│ │ │ │ -00000ea0: 6f72 743c 2f73 7061 6e3e 203c 7370 616e  ort UUID<
│ │ │ │ -00000ec0: 2f73 7061 6e3e 0a0a 3c73 7061 6e20 636c  /span>..from django.cor
│ │ │ │ -00000f00: 652e 6578 6365 7074 696f 6e73 3c2f 7370  e.exceptions import EmptyResultSe
│ │ │ │ -00000f50: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c  t,
│ │ │ │ -00000f70: 203c 7370 616e 2063 6c61 7373 3d22 6e22   FieldError, FullR
│ │ │ │ -00000fc0: 6573 756c 7453 6574 3c2f 7370 616e 3e0a  esultSet.
│ │ │ │ -00000fd0: 3c73 7061 6e20 636c 6173 733d 226b 6e22  from dj
│ │ │ │ -00001000: 616e 676f 2e64 623c 2f73 7061 6e3e 203c  ango.db <
│ │ │ │ -00001010: 7370 616e 2063 6c61 7373 3d22 6b6e 223e  span class="kn">
│ │ │ │ -00001020: 696d 706f 7274 3c2f 7370 616e 3e20 3c73  import Da
│ │ │ │ -00001040: 7461 6261 7365 4572 726f 723c 2f73 7061  tabaseError, NotSu
│ │ │ │ -00001080: 7070 6f72 7465 6445 7272 6f72 3c2f 7370  pportedError, conn
│ │ │ │ -000010c0: 6563 7469 6f6e 3c2f 7370 616e 3e0a 3c73  ection.f
│ │ │ │ -000010e0: 726f 6d3c 2f73 7061 6e3e 203c 7370 616e  rom djan
│ │ │ │ -00001100: 676f 2e64 622e 6d6f 6465 6c73 3c2f 7370  go.db.models import fields
│ │ │ │ -00001150: 0a3c 7370 616e 2063 6c61 7373 3d22 6b6e  .from d
│ │ │ │ -00001180: 6a61 6e67 6f2e 6462 2e6d 6f64 656c 732e  jango.db.models.
│ │ │ │ -00001190: 636f 6e73 7461 6e74 733c 2f73 7061 6e3e  constants
│ │ │ │ -000011a0: 203c 7370 616e 2063 6c61 7373 3d22 6b6e   import 
│ │ │ │ -000011c0: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -000011d0: 4c4f 4f4b 5550 5f53 4550 3c2f 7370 616e  LOOKUP_SEP.from <
│ │ │ │ -00001200: 7370 616e 2063 6c61 7373 3d22 6e6e 223e  span class="nn">
│ │ │ │ -00001210: 646a 616e 676f 2e64 622e 6d6f 6465 6c73  django.db.models
│ │ │ │ -00001220: 2e71 7565 7279 5f75 7469 6c73 3c2f 7370  .query_utils import Q.fro
│ │ │ │ -00001280: 6d3c 2f73 7061 6e3e 203c 7370 616e 2063  m django
│ │ │ │ -000012a0: 2e75 7469 6c73 2e64 6563 6f6e 7374 7275  .utils.deconstru
│ │ │ │ -000012b0: 6374 3c2f 7370 616e 3e20 3c73 7061 6e20  ct impor
│ │ │ │ -000012d0: 743c 2f73 7061 6e3e 203c 7370 616e 2063  t deconst
│ │ │ │ -000012f0: 7275 6374 6962 6c65 3c2f 7370 616e 3e0a  ructible.
│ │ │ │ -00001300: 3c73 7061 6e20 636c 6173 733d 226b 6e22  from dj
│ │ │ │ -00001330: 616e 676f 2e75 7469 6c73 2e64 6570 7265  ango.utils.depre
│ │ │ │ -00001340: 6361 7469 6f6e 3c2f 7370 616e 3e20 3c73  cation i
│ │ │ │ -00001360: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370  mport Rem
│ │ │ │ -00001380: 6f76 6564 496e 446a 616e 676f 3530 5761  ovedInDjango50Wa
│ │ │ │ -00001390: 726e 696e 673c 2f73 7061 6e3e 0a3c 7370  rning.fr
│ │ │ │ -000013b0: 6f6d 3c2f 7370 616e 3e20 3c73 7061 6e20  om djang
│ │ │ │ -000013d0: 6f2e 7574 696c 732e 6675 6e63 7469 6f6e  o.utils.function
│ │ │ │ -000013e0: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20  al impor
│ │ │ │ -00001400: 743c 2f73 7061 6e3e 203c 7370 616e 2063  t cached_
│ │ │ │ -00001420: 7072 6f70 6572 7479 3c2f 7370 616e 3e0a  property.
│ │ │ │ -00001430: 3c73 7061 6e20 636c 6173 733d 226b 6e22  from dj
│ │ │ │ -00001460: 616e 676f 2e75 7469 6c73 2e68 6173 6861  ango.utils.hasha
│ │ │ │ -00001470: 626c 653c 2f73 7061 6e3e 203c 7370 616e  ble impo
│ │ │ │ -00001490: 7274 3c2f 7370 616e 3e20 3c73 7061 6e20  rt make_h
│ │ │ │ -000014b0: 6173 6861 626c 653c 2f73 7061 6e3e 0a0a  ashable..
│ │ │ │ -000014c0: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22  .class S
│ │ │ │ -000014f0: 514c 6974 654e 756d 6572 6963 4d69 7869  QLiteNumericMixi
│ │ │ │ -00001500: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c  n:
│ │ │ │ -00001520: 0a3c 7370 616e 2063 6c61 7373 3d22 7722  .    &qu
│ │ │ │ -00001550: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c  ot;""<
│ │ │ │ -00001560: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61  /span>.    Some
│ │ │ │ -00001580: 2065 7870 7265 7373 696f 6e73 2077 6974   expressions wit
│ │ │ │ -00001590: 6820 6f75 7470 7574 5f66 6965 6c64 3d44  h output_field=D
│ │ │ │ -000015a0: 6563 696d 616c 4669 656c 6428 2920 6d75  ecimalField() mu
│ │ │ │ -000015b0: 7374 2062 6520 6361 7374 2074 6f3c 2f73  st be cast to.    numeri
│ │ │ │ -000015e0: 6320 746f 2062 6520 7072 6f70 6572 6c79  c to be properly
│ │ │ │ -000015f0: 2066 696c 7465 7265 642e 3c2f 7370 616e   filtered..    "&qu
│ │ │ │ -00001620: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e  ot;"
│ │ │ │ -00001630: 0a0a 2020 2020 3c73 7061 6e20 636c 6173  ..    def
│ │ │ │ -00001650: 203c 7370 616e 2063 6c61 7373 3d22 6e66   as_sqlite(self<
│ │ │ │ -000016a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>, <
│ │ │ │ -000016c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63  span class="n">c
│ │ │ │ -000016d0: 6f6d 7069 6c65 723c 2f73 7061 6e3e 3c73  ompiler,<
│ │ │ │ -000016f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> connectio
│ │ │ │ -00001710: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c  n,
│ │ │ │ -00001730: 203c 7370 616e 2063 6c61 7373 3d22 6f22   **extra_
│ │ │ │ -00001760: 636f 6e74 6578 743c 2f73 7061 6e3e 3c73  context):
│ │ │ │ -00001780: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00001790: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -000017a0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20  sql, params
│ │ │ │ -000017e0: 203c 7370 616e 2063 6c61 7373 3d22 6f22   = self<
│ │ │ │ -00001810: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>.as
│ │ │ │ -00001840: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e  _sql(compiler, conne
│ │ │ │ -000018b0: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061  ction, **ex
│ │ │ │ -00001900: 7472 615f 636f 6e74 6578 743c 2f73 7061  tra_context).     
│ │ │ │ -00001930: 2020 203c 7370 616e 2063 6c61 7373 3d22     try:.          
│ │ │ │ -00001970: 2020 3c73 7061 6e20 636c 6173 733d 226b    if sel
│ │ │ │ -000019a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c  f.
│ │ │ │ -000019c0: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -000019d0: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370  output_field.get_i
│ │ │ │ -00001a10: 6e74 6572 6e61 6c5f 7479 7065 3c2f 7370  nternal_type() ==<
│ │ │ │ -00001a50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> "De
│ │ │ │ -00001a70: 6369 6d61 6c46 6965 6c64 2671 756f 743b  cimalField"
│ │ │ │ -00001a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  :.
│ │ │ │ -00001aa0: 2020 2020 2020 2020 2020 2020 2020 2020                  
│ │ │ │ -00001ab0: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -00001ac0: 7371 6c3c 2f73 7061 6e3e 203c 7370 616e  sql = "CAST(
│ │ │ │ -00001b00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  %s AS NUMERIC)&q
│ │ │ │ -00001b40: 756f 743b 3c2f 7370 616e 3e20 3c73 7061  uot; % sql.
│ │ │ │ -00001b80: 2020 2020 2020 2020 3c73 7061 6e20 636c          except FieldError
│ │ │ │ -00001bc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  :.
│ │ │ │ -00001be0: 2020 2020 2020 2020 2020 2020 3c73 7061              pass
│ │ │ │ -00001c00: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00001c10: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -00001c20: 7265 7475 726e 3c2f 7370 616e 3e20 3c73  return sq
│ │ │ │ -00001c40: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c  l,
│ │ │ │ -00001c60: 203c 7370 616e 2063 6c61 7373 3d22 6e22   params..
│ │ │ │ -00001c80: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22  .class C
│ │ │ │ -00001cb0: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e  ombinable
│ │ │ │ -00001cc0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00001cd0: 3a3c 2f73 7061 6e3e 0a3c 7370 616e 2063  :.    ""
│ │ │ │ -00001d10: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 0a3c  ;".<
│ │ │ │ -00001d20: 7370 616e 2063 6c61 7373 3d22 7364 223e  span class="sd">
│ │ │ │ -00001d30: 2020 2020 5072 6f76 6964 6520 7468 6520      Provide the 
│ │ │ │ -00001d40: 6162 696c 6974 7920 746f 2063 6f6d 6269  ability to combi
│ │ │ │ -00001d50: 6e65 206f 6e65 206f 7220 7477 6f20 6f62  ne one or two ob
│ │ │ │ -00001d60: 6a65 6374 7320 7769 7468 3c2f 7370 616e  jects with.    some conn
│ │ │ │ -00001d90: 6563 746f 722e 2046 6f72 2065 7861 6d70  ector. For examp
│ │ │ │ -00001da0: 6c65 2046 2826 2333 393b 666f 6f26 2333  le F('foo
│ │ │ │ -00001db0: 393b 2920 2b20 4628 2623 3339 3b62 6172  9;) + F('bar
│ │ │ │ -00001dc0: 2623 3339 3b29 2e3c 2f73 7061 6e3e 0a3c  ')..<
│ │ │ │ -00001dd0: 7370 616e 2063 6c61 7373 3d22 7364 223e  span class="sd">
│ │ │ │ -00001de0: 2020 2020 2671 756f 743b 2671 756f 743b      ""
│ │ │ │ -00001df0: 2671 756f 743b 3c2f 7370 616e 3e0a 0a20  ".. 
│ │ │ │ -00001e00: 2020 203c 7370 616e 2063 6c61 7373 3d22     # Arithmetic
│ │ │ │ -00001e20: 2063 6f6e 6e65 6374 6f72 733c 2f73 7061   connectors.    ADD = &quo
│ │ │ │ -00001e80: 743b 2b26 7175 6f74 3b3c 2f73 7061 6e3e  t;+"
│ │ │ │ -00001e90: 0a20 2020 203c 7370 616e 2063 6c61 7373  .    SUB 
│ │ │ │ -00001eb0: 3c73 7061 6e20 636c 6173 733d 226f 223e  
│ │ │ │ -00001ec0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063  = "
│ │ │ │ -00001ee0: 2d26 7175 6f74 3b3c 2f73 7061 6e3e 0a20  -". 
│ │ │ │ -00001ef0: 2020 203c 7370 616e 2063 6c61 7373 3d22     MUL =<
│ │ │ │ -00001f20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> "*&
│ │ │ │ -00001f40: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020  quot;.   
│ │ │ │ -00001f50: 203c 7370 616e 2063 6c61 7373 3d22 6e22   DIV = "/&qu
│ │ │ │ -00001fa0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 203c  ot;.    <
│ │ │ │ -00001fb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e50  span class="n">P
│ │ │ │ -00001fc0: 4f57 3c2f 7370 616e 3e20 3c73 7061 6e20  OW = "^"
│ │ │ │ -00002000: 3b3c 2f73 7061 6e3e 0a20 2020 203c 7370  ;.    # 
│ │ │ │ -00002020: 5468 6520 666f 6c6c 6f77 696e 6720 6973  The following is
│ │ │ │ -00002030: 2061 2071 756f 7465 6420 2520 6f70 6572   a quoted % oper
│ │ │ │ -00002040: 6174 6f72 202d 2069 7420 6973 2071 756f  ator - it is quo
│ │ │ │ -00002050: 7465 6420 6265 6361 7573 6520 6974 2063  ted because it c
│ │ │ │ -00002060: 616e 2062 653c 2f73 7061 6e3e 0a20 2020  an be.   
│ │ │ │ -00002070: 203c 7370 616e 2063 6c61 7373 3d22 6331   # used in stri
│ │ │ │ -00002090: 6e67 7320 7468 6174 2061 6c73 6f20 6861  ngs that also ha
│ │ │ │ -000020a0: 7665 2070 6172 616d 6574 6572 2073 7562  ve parameter sub
│ │ │ │ -000020b0: 7374 6974 7574 696f 6e2e 3c2f 7370 616e  stitution..    MOD
│ │ │ │ -000020e0: 203c 7370 616e 2063 6c61 7373 3d22 6f22   = "
│ │ │ │ -00002110: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c  ;%%"
│ │ │ │ -00002150: 0a0a 2020 2020 3c73 7061 6e20 636c 6173  ..    # Bitwise
│ │ │ │ -00002170: 206f 7065 7261 746f 7273 202d 206e 6f74   operators - not
│ │ │ │ -00002180: 6520 7468 6174 2074 6865 7365 2061 7265  e that these are
│ │ │ │ -00002190: 2067 656e 6572 6174 6564 2062 7920 2e62   generated by .b
│ │ │ │ -000021a0: 6974 616e 6428 293c 2f73 7061 6e3e 0a20  itand(). 
│ │ │ │ -000021b0: 2020 203c 7370 616e 2063 6c61 7373 3d22     # and .bitor
│ │ │ │ -000021d0: 2829 2c20 7468 6520 2623 3339 3b26 616d  (), the '&am
│ │ │ │ -000021e0: 703b 2623 3339 3b20 616e 6420 2623 3339  p;' and '
│ │ │ │ -000021f0: 3b7c 2623 3339 3b20 6172 6520 7265 7365  ;|' are rese
│ │ │ │ -00002200: 7276 6564 2066 6f72 2062 6f6f 6c65 616e  rved for boolean
│ │ │ │ -00002210: 206f 7065 7261 746f 723c 2f73 7061 6e3e   operator
│ │ │ │ -00002220: 0a20 2020 203c 7370 616e 2063 6c61 7373  .    # usage..    BITAND
│ │ │ │ -00002260: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   =
│ │ │ │ -00002280: 203c 7370 616e 2063 6c61 7373 3d22 7332   "&&qu
│ │ │ │ -000022a0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 203c  ot;.    <
│ │ │ │ -000022b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e42  span class="n">B
│ │ │ │ -000022c0: 4954 4f52 3c2f 7370 616e 3e20 3c73 7061  ITOR = "|&qu
│ │ │ │ -00002300: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 203c  ot;.    <
│ │ │ │ -00002310: 7370 616e 2063 6c61 7373 3d22 6e22 3e42  span class="n">B
│ │ │ │ -00002320: 4954 4c45 4654 5348 4946 543c 2f73 7061  ITLEFTSHIFT = &qu
│ │ │ │ -00002360: 6f74 3b26 6c74 3b26 6c74 3b26 7175 6f74  ot;<<"
│ │ │ │ -00002370: 3b3c 2f73 7061 6e3e 0a20 2020 203c 7370  ;.    BIT
│ │ │ │ -00002390: 5249 4748 5453 4849 4654 3c2f 7370 616e  RIGHTSHIFT = &quo
│ │ │ │ -000023d0: 743b 2667 743b 2667 743b 2671 756f 743b  t;>>"
│ │ │ │ -000023e0: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061  .    BITX
│ │ │ │ -00002400: 4f52 3c2f 7370 616e 3e20 3c73 7061 6e20  OR = "#"
│ │ │ │ -00002440: 3b3c 2f73 7061 6e3e 0a0a 2020 2020 3c73  ;..    de
│ │ │ │ -00002460: 663c 2f73 7061 6e3e 203c 7370 616e 2063  f _combi
│ │ │ │ -00002480: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063  ne(self, other, conne
│ │ │ │ -00002520: 6374 6f72 3c2f 7370 616e 3e3c 7370 616e  ctor, reversed):.  
│ │ │ │ -00002580: 2020 2020 2020 3c73 7061 6e20 636c 6173        if 
│ │ │ │ -000025a0: 3c73 7061 6e20 636c 6173 733d 226f 7722  not has
│ │ │ │ -000025d0: 6174 7472 3c2f 7370 616e 3e3c 7370 616e  attr(other<
│ │ │ │ -00002610: 7370 616e 2063 6c61 7373 3d22 7022 3e2c  span class="p">,
│ │ │ │ -00002620: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   "r
│ │ │ │ -00002640: 6573 6f6c 7665 5f65 7870 7265 7373 696f  esolve_expressio
│ │ │ │ -00002650: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 3c73  n"):
│ │ │ │ -00002670: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00002680: 2020 2020 3c73 7061 6e20 636c 6173 733d      # everythin
│ │ │ │ -000026a0: 6720 6d75 7374 2062 6520 7265 736f 6c76  g must be resolv
│ │ │ │ -000026b0: 6162 6c65 2074 6f20 616e 2065 7870 7265  able to an expre
│ │ │ │ -000026c0: 7373 696f 6e3c 2f73 7061 6e3e 0a20 2020  ssion.   
│ │ │ │ -000026d0: 2020 2020 2020 2020 203c 7370 616e 2063           other = <
│ │ │ │ -00002710: 7370 616e 2063 6c61 7373 3d22 6e22 3e56  span class="n">V
│ │ │ │ -00002720: 616c 7565 3c2f 7370 616e 3e3c 7370 616e  alue(other<
│ │ │ │ -00002760: 7370 616e 2063 6c61 7373 3d22 7022 3e29  span class="p">)
│ │ │ │ -00002770: 3c2f 7370 616e 3e0a 0a20 2020 2020 2020  ..       
│ │ │ │ -00002780: 203c 7370 616e 2063 6c61 7373 3d22 6b22   if reve
│ │ │ │ -000027b0: 7273 6564 3c2f 7370 616e 3e3c 7370 616e  rsed:.            
│ │ │ │ -000027e0: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -000027f0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73  return Co
│ │ │ │ -00002810: 6d62 696e 6564 4578 7072 6573 7369 6f6e  mbinedExpression
│ │ │ │ -00002820: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  (<
│ │ │ │ -00002840: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f  span class="n">o
│ │ │ │ -00002850: 7468 6572 3c2f 7370 616e 3e3c 7370 616e  ther, connector, se
│ │ │ │ -000028c0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf).        return
│ │ │ │ -00002900: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   Combined
│ │ │ │ -00002920: 4578 7072 6573 7369 6f6e 3c2f 7370 616e  Expression(self, co
│ │ │ │ -00002990: 6e6e 6563 746f 723c 2f73 7061 6e3e 3c73  nnector,<
│ │ │ │ -000029b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> other)..   
│ │ │ │ -000029f0: 203c 7370 616e 2063 6c61 7373 3d22 6331   #############<
│ │ │ │ -00002a10: 2f73 7061 6e3e 0a20 2020 203c 7370 616e  /span>.    # OP
│ │ │ │ -00002a30: 4552 4154 4f52 5320 233c 2f73 7061 6e3e  ERATORS #
│ │ │ │ -00002a40: 0a20 2020 203c 7370 616e 2063 6c61 7373  .    ##########
│ │ │ │ -00002a60: 2323 233c 2f73 7061 6e3e 0a0a 2020 2020  ###..    
│ │ │ │ -00002a70: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -00002a80: 6465 663c 2f73 7061 6e3e 203c 7370 616e  def __ne
│ │ │ │ -00002aa0: 675f 5f3c 2f73 7061 6e3e 3c73 7061 6e20  g__(self):
│ │ │ │ -00002af0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00002b00: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -00002b10: 7265 7475 726e 3c2f 7370 616e 3e20 3c73  return s
│ │ │ │ -00002b30: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20  elf._combine(-1, self<
│ │ │ │ -00002bf0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e  span class="o">.
│ │ │ │ -00002c00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  MUL, False
│ │ │ │ -00002c50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  ).
│ │ │ │ -00002c70: 0a20 2020 203c 7370 616e 2063 6c61 7373  .    def 
│ │ │ │ -00002c90: 3c73 7061 6e20 636c 6173 733d 2266 6d22  __add__<
│ │ │ │ -00002cb0: 7370 616e 2063 6c61 7373 3d22 7022 3e28  span class="p">(
│ │ │ │ -00002cc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  self, othe
│ │ │ │ -00002d10: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c  r):.        return
│ │ │ │ -00002d50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   self._com
│ │ │ │ -00002da0: 6269 6e65 3c2f 7370 616e 3e3c 7370 616e  bine(other<
│ │ │ │ -00002de0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c  span class="p">,
│ │ │ │ -00002df0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   self.ADD<
│ │ │ │ -00002e40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>, <
│ │ │ │ -00002e60: 7370 616e 2063 6c61 7373 3d22 6b63 223e  span class="kc">
│ │ │ │ -00002e70: 4661 6c73 653c 2f73 7061 6e3e 3c73 7061  False)..    def __sub__(sel
│ │ │ │ -00002f00: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c  f,
│ │ │ │ -00002f20: 203c 7370 616e 2063 6c61 7373 3d22 6e22   other):<
│ │ │ │ -00002f50: 2f73 7061 6e3e 0a20 2020 2020 2020 203c  /span>.        <
│ │ │ │ -00002f60: 7370 616e 2063 6c61 7373 3d22 6b22 3e72  span class="k">r
│ │ │ │ -00002f70: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370  eturn se
│ │ │ │ -00002f90: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf._combine
│ │ │ │ -00002fd0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00002fe0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c  (other, se
│ │ │ │ -00003030: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf.SUB, False)..    <
│ │ │ │ -000030c0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64  span class="k">d
│ │ │ │ -000030d0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20  ef __mul
│ │ │ │ -000030f0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063  __(self, other):.    
│ │ │ │ -00003180: 2020 2020 3c73 7061 6e20 636c 6173 733d      return self.<
│ │ │ │ -000031d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>_combine(oth
│ │ │ │ -00003220: 6572 3c2f 7370 616e 3e3c 7370 616e 2063  er, self.<
│ │ │ │ -00003270: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>MUL
│ │ │ │ -00003290: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -000032a0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063  , False<
│ │ │ │ -000032c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>)..
│ │ │ │ -000032e0: 2020 2020 3c73 7061 6e20 636c 6173 733d      def <
│ │ │ │ -00003300: 7370 616e 2063 6c61 7373 3d22 666d 223e  span class="fm">
│ │ │ │ -00003310: 5f5f 7472 7565 6469 765f 5f3c 2f73 7061  __truediv__(self<
│ │ │ │ -00003350: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>, <
│ │ │ │ -00003370: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f  span class="n">o
│ │ │ │ -00003380: 7468 6572 3c2f 7370 616e 3e3c 7370 616e  ther):.        ret
│ │ │ │ -000033c0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e  urn self
│ │ │ │ -000033e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  .<
│ │ │ │ -00003400: 7370 616e 2063 6c61 7373 3d22 6e22 3e5f  span class="n">_
│ │ │ │ -00003410: 636f 6d62 696e 653c 2f73 7061 6e3e 3c73  combine(<
│ │ │ │ -00003430: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>other, self
│ │ │ │ -00003480: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  .<
│ │ │ │ -000034a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e44  span class="n">D
│ │ │ │ -000034b0: 4956 3c2f 7370 616e 3e3c 7370 616e 2063  IV, False<
│ │ │ │ -000034f0: 7370 616e 2063 6c61 7373 3d22 7022 3e29  span class="p">)
│ │ │ │ -00003500: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370  ..    def
│ │ │ │ -00003520: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   __mod__
│ │ │ │ -00003540: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  (<
│ │ │ │ -00003560: 7370 616e 2063 6c61 7373 3d22 6270 223e  span class="bp">
│ │ │ │ -00003570: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e  self, other
│ │ │ │ -000035b0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -000035c0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020  ):.      
│ │ │ │ -000035d0: 2020 3c73 7061 6e20 636c 6173 733d 226b    return 
│ │ │ │ -000035f0: 3c73 7061 6e20 636c 6173 733d 2262 7022  self._combine(other
│ │ │ │ -00003670: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  , 
│ │ │ │ -00003690: 3c73 7061 6e20 636c 6173 733d 2262 7022  self.MOD,<
│ │ │ │ -000036f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> False)..  
│ │ │ │ -00003730: 2020 3c73 7061 6e20 636c 6173 733d 226b    def __
│ │ │ │ -00003760: 706f 775f 5f3c 2f73 7061 6e3e 3c73 7061  pow__(self
│ │ │ │ -000037a0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -000037b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063  , other):. 
│ │ │ │ -000037f0: 2020 2020 2020 203c 7370 616e 2063 6c61         return self._combin
│ │ │ │ -00003860: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c  e(
│ │ │ │ -00003880: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -00003890: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061  other, self.POW, Fal
│ │ │ │ -00003930: 7365 3c2f 7370 616e 3e3c 7370 616e 2063  se)..    def __and__(self, ot
│ │ │ │ -000039f0: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20  her):.        if getattr(se
│ │ │ │ -00003a80: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf, "conditi
│ │ │ │ -00003ac0: 6f6e 616c 2671 756f 743b 3c2f 7370 616e  onal", False
│ │ │ │ -00003b00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  ) 
│ │ │ │ -00003b20: 3c73 7061 6e20 636c 6173 733d 226f 7722  and get
│ │ │ │ -00003b50: 6174 7472 3c2f 7370 616e 3e3c 7370 616e  attr(other<
│ │ │ │ -00003b90: 7370 616e 2063 6c61 7373 3d22 7022 3e2c  span class="p">,
│ │ │ │ -00003ba0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   "c
│ │ │ │ -00003bc0: 6f6e 6469 7469 6f6e 616c 2671 756f 743b  onditional"
│ │ │ │ -00003bd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  , 
│ │ │ │ -00003bf0: 3c73 7061 6e20 636c 6173 733d 226b 6322  False):<
│ │ │ │ -00003c20: 2f73 7061 6e3e 0a20 2020 2020 2020 2020  /span>.         
│ │ │ │ -00003c30: 2020 203c 7370 616e 2063 6c61 7373 3d22     return
│ │ │ │ -00003c50: 203c 7370 616e 2063 6c61 7373 3d22 6e22   Q(self) & Q(other<
│ │ │ │ -00003d20: 7370 616e 2063 6c61 7373 3d22 7022 3e29  span class="p">)
│ │ │ │ -00003d30: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00003d40: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -00003d50: 7261 6973 653c 2f73 7061 6e3e 203c 7370  raise No
│ │ │ │ -00003d70: 7449 6d70 6c65 6d65 6e74 6564 4572 726f  tImplementedErro
│ │ │ │ -00003d80: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c  r(
│ │ │ │ -00003da0: 0a20 2020 2020 2020 2020 2020 203c 7370  .            &q
│ │ │ │ -00003dc0: 756f 743b 5573 6520 2e62 6974 616e 6428  uot;Use .bitand(
│ │ │ │ -00003dd0: 292c 202e 6269 746f 7228 292c 2061 6e64  ), .bitor(), and
│ │ │ │ -00003de0: 202e 6269 7478 6f72 2829 2066 6f72 2062   .bitxor() for b
│ │ │ │ -00003df0: 6974 7769 7365 206c 6f67 6963 616c 206f  itwise logical o
│ │ │ │ -00003e00: 7065 7261 7469 6f6e 732e 2671 756f 743b  perations."
│ │ │ │ -00003e10: 3c2f 7370 616e 3e0a 2020 2020 2020 2020  .        
│ │ │ │ -00003e20: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00003e30: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73  )..    de
│ │ │ │ -00003e50: 663c 2f73 7061 6e3e 203c 7370 616e 2063  f bitand
│ │ │ │ -00003e70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  (<
│ │ │ │ -00003e90: 7370 616e 2063 6c61 7373 3d22 6270 223e  span class="bp">
│ │ │ │ -00003ea0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e  self, other
│ │ │ │ -00003ee0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00003ef0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020  ):.      
│ │ │ │ -00003f00: 2020 3c73 7061 6e20 636c 6173 733d 226b    return 
│ │ │ │ -00003f20: 3c73 7061 6e20 636c 6173 733d 2262 7022  self._combine(other
│ │ │ │ -00003fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  , 
│ │ │ │ -00003fc0: 3c73 7061 6e20 636c 6173 733d 2262 7022  self.BITAND, False
│ │ │ │ -00004040: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  ).
│ │ │ │ -00004060: 0a20 2020 203c 7370 616e 2063 6c61 7373  .    def 
│ │ │ │ -00004080: 3c73 7061 6e20 636c 6173 733d 226e 6622  bitleftshift(sel
│ │ │ │ -000040d0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c  f,
│ │ │ │ -000040f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22   other):<
│ │ │ │ -00004120: 2f73 7061 6e3e 0a20 2020 2020 2020 203c  /span>.        <
│ │ │ │ -00004130: 7370 616e 2063 6c61 7373 3d22 6b22 3e72  span class="k">r
│ │ │ │ -00004140: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370  eturn se
│ │ │ │ -00004160: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf._combine
│ │ │ │ -000041a0: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -000041b0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c  (other, se
│ │ │ │ -00004200: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063  lf.BITLEFTSHIFT, Fa
│ │ │ │ -00004270: 6c73 653c 2f73 7061 6e3e 3c73 7061 6e20  lse)..    def bitrightshif
│ │ │ │ -000042d0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c  t(
│ │ │ │ -000042f0: 3c73 7061 6e20 636c 6173 733d 2262 7022  self, other):.     
│ │ │ │ -00004360: 2020 203c 7370 616e 2063 6c61 7373 3d22     return
│ │ │ │ -00004380: 203c 7370 616e 2063 6c61 7373 3d22 6270   self._combine(othe
│ │ │ │ -00004400: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c  r,
│ │ │ │ -00004420: 203c 7370 616e 2063 6c61 7373 3d22 6270   self.BITRIGHTSHI
│ │ │ │ -00004470: 4654 3c2f 7370 616e 3e3c 7370 616e 2063  FT, False<
│ │ │ │ -000044b0: 7370 616e 2063 6c61 7373 3d22 7022 3e29  span class="p">)
│ │ │ │ -000044c0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370  ..    def
│ │ │ │ -000044e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   __xor__
│ │ │ │ -00004500: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  (<
│ │ │ │ -00004520: 7370 616e 2063 6c61 7373 3d22 6270 223e  span class="bp">
│ │ │ │ -00004530: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e  self, other
│ │ │ │ -00004570: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00004580: 293a 3c2f 7370 616e 3e0a 2020 2020 2020  ):.      
│ │ │ │ -00004590: 2020 3c73 7061 6e20 636c 6173 733d 226b    if get
│ │ │ │ -000045c0: 6174 7472 3c2f 7370 616e 3e3c 7370 616e  attr(self<
│ │ │ │ -00004600: 7370 616e 2063 6c61 7373 3d22 7022 3e2c  span class="p">,
│ │ │ │ -00004610: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c   "c
│ │ │ │ -00004630: 6f6e 6469 7469 6f6e 616c 2671 756f 743b  onditional"
│ │ │ │ -00004640: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  , 
│ │ │ │ -00004660: 3c73 7061 6e20 636c 6173 733d 226b 6322  False) and getattr(other, &
│ │ │ │ -00004730: 7175 6f74 3b63 6f6e 6469 7469 6f6e 616c  quot;conditional
│ │ │ │ -00004740: 2671 756f 743b 3c2f 7370 616e 3e3c 7370  ", False):.   
│ │ │ │ -000047a0: 2020 2020 2020 2020 203c 7370 616e 2063           return<
│ │ │ │ -000047c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> Q<
│ │ │ │ -000047e0: 7370 616e 2063 6c61 7373 3d22 7022 3e28  span class="p">(
│ │ │ │ -000047f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61  self) ^ Q(other).      
│ │ │ │ -000048b0: 2020 3c73 7061 6e20 636c 6173 733d 226b    raise <
│ │ │ │ -000048d0: 7370 616e 2063 6c61 7373 3d22 6e65 223e  span class="ne">
│ │ │ │ -000048e0: 4e6f 7449 6d70 6c65 6d65 6e74 6564 4572  NotImplementedEr
│ │ │ │ -000048f0: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20  ror(.            <
│ │ │ │ -00004920: 7370 616e 2063 6c61 7373 3d22 7332 223e  span class="s2">
│ │ │ │ -00004930: 2671 756f 743b 5573 6520 2e62 6974 616e  "Use .bitan
│ │ │ │ -00004940: 6428 292c 202e 6269 746f 7228 292c 2061  d(), .bitor(), a
│ │ │ │ -00004950: 6e64 202e 6269 7478 6f72 2829 2066 6f72  nd .bitxor() for
│ │ │ │ -00004960: 2062 6974 7769 7365 206c 6f67 6963 616c   bitwise logical
│ │ │ │ -00004970: 206f 7065 7261 7469 6f6e 732e 2671 756f   operations.&quo
│ │ │ │ -00004980: 743b 3c2f 7370 616e 3e0a 2020 2020 2020  t;.      
│ │ │ │ -00004990: 2020 3c73 7061 6e20 636c 6173 733d 2270    )..    
│ │ │ │ -000049b0: 3c73 7061 6e20 636c 6173 733d 226b 223e  
│ │ │ │ -000049c0: 6465 663c 2f73 7061 6e3e 203c 7370 616e  def bitx
│ │ │ │ -000049e0: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063  or(self, other):.    
│ │ │ │ -00004a70: 2020 2020 3c73 7061 6e20 636c 6173 733d      return self.<
│ │ │ │ -00004ac0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>_combine(oth
│ │ │ │ -00004b10: 6572 3c2f 7370 616e 3e3c 7370 616e 2063  er, self.<
│ │ │ │ -00004b60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>BITXOR, Fal
│ │ │ │ -00004bb0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063  se)..    def __or__
│ │ │ │ -00004c10: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00004c20: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c  (self, oth
│ │ │ │ -00004c70: 6572 3c2f 7370 616e 3e3c 7370 616e 2063  er):.        if getattr(sel
│ │ │ │ -00004d00: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c  f,
│ │ │ │ -00004d20: 203c 7370 616e 2063 6c61 7373 3d22 7332   "conditio
│ │ │ │ -00004d40: 6e61 6c26 7175 6f74 3b3c 2f73 7061 6e3e  nal"
│ │ │ │ -00004d50: 3c73 7061 6e20 636c 6173 733d 2270 223e  
│ │ │ │ -00004d60: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063  , False<
│ │ │ │ -00004d80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>) <
│ │ │ │ -00004da0: 7370 616e 2063 6c61 7373 3d22 6f77 223e  span class="ow">
│ │ │ │ -00004db0: 616e 643c 2f73 7061 6e3e 203c 7370 616e  and geta
│ │ │ │ -00004dd0: 7474 723c 2f73 7061 6e3e 3c73 7061 6e20  ttr(other,<
│ │ │ │ -00004e20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61  /span> "co
│ │ │ │ -00004e40: 6e64 6974 696f 6e61 6c26 7175 6f74 3b3c  nditional"<
│ │ │ │ -00004e50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173  /span>, <
│ │ │ │ -00004e70: 7370 616e 2063 6c61 7373 3d22 6b63 223e  span class="kc">
│ │ │ │ -00004e80: 4661 6c73 653c 2f73 7061 6e3e 3c73 7061  False):.          
│ │ │ │ -00004eb0: 2020 3c73 7061 6e20 636c 6173 733d 226b    return 
│ │ │ │ -00004ed0: 3c73 7061 6e20 636c 6173 733d 226e 223e  
│ │ │ │ -00004ee0: 513c 2f73 7061 6e3e 3c73 7061 6e20 636c  Q(
│ │ │ │ -00004f00: 3c73 7061 6e20 636c 6173 733d 2262 7022  self) | Q<
│ │ │ │ +000000f0: 2e31 3320 646f 6375 6d65 6e74 6174 6965  .13 documentatie
│ │ │ │ +00000100: 3c2f 7469 746c 653e 0a20 2020 203c 6c69  .    
  • . . . │ │ │ │ +00000220: 2020 3c73 6372 6970 7420 7372 633d 222e . │ │ │ │ +00000300: 2020 203c 6c69 6e6b 2072 656c 3d22 696e . .. │ │ │ │ +00000390: 0a0a 200a 3c73 6372 6970 7420 7372 633d .. ...(function($ │ │ │ │ +000003e0: 2920 7b0a 2020 2020 6966 2028 2164 6a61 ) {. if (!dja │ │ │ │ +000003f0: 6e67 6f5f 7465 6d70 6c61 7465 5f62 7569 ngo_template_bui │ │ │ │ +00000400: 6c74 696e 7329 207b 0a20 2020 2020 2020 ltins) {. │ │ │ │ +00000410: 2f2f 2074 656d 706c 6174 6562 7569 6c74 // templatebuilt │ │ │ │ +00000420: 696e 732e 6a73 206d 6973 7369 6e67 2c20 ins.js missing, │ │ │ │ +00000430: 646f 206e 6f74 6869 6e67 2e0a 2020 2020 do nothing.. │ │ │ │ +00000440: 2020 2072 6574 7572 6e3b 0a20 2020 207d return;. } │ │ │ │ +00000450: 0a20 2020 2024 2864 6f63 756d 656e 7429 . $(document) │ │ │ │ +00000460: 2e72 6561 6479 2866 756e 6374 696f 6e28 .ready(function( │ │ │ │ +00000470: 2920 7b0a 2020 2020 2020 2020 2f2f 2048 ) {. // H │ │ │ │ +00000480: 7970 6572 6c69 6e6b 2044 6a61 6e67 6f20 yperlink Django │ │ │ │ +00000490: 7465 6d70 6c61 7465 2074 6167 7320 616e template tags an │ │ │ │ +000004a0: 6420 6669 6c74 6572 730a 2020 2020 2020 d filters. │ │ │ │ +000004b0: 2020 7661 7220 6261 7365 203d 2022 2e2e var base = ".. │ │ │ │ +000004c0: 2f2e 2e2f 2e2e 2f2e 2e2f 7265 662f 7465 /../../../ref/te │ │ │ │ +000004d0: 6d70 6c61 7465 732f 6275 696c 7469 6e73 mplates/builtins │ │ │ │ +000004e0: 2e68 746d 6c22 3b0a 2020 2020 2020 2020 .html";. │ │ │ │ +000004f0: 6966 2028 6261 7365 203d 3d20 2223 2229 if (base == "#") │ │ │ │ +00000500: 207b 0a20 2020 2020 2020 2020 2020 202f {. / │ │ │ │ +00000510: 2f20 5370 6563 6961 6c20 6361 7365 2066 / Special case f │ │ │ │ +00000520: 6f72 2062 7569 6c74 696e 732e 6874 6d6c or builtins.html │ │ │ │ +00000530: 2069 7473 656c 660a 2020 2020 2020 2020 itself. │ │ │ │ +00000540: 2020 2020 6261 7365 203d 2022 223b 0a20 base = "";. │ │ │ │ +00000550: 2020 2020 2020 207d 0a20 2020 2020 2020 }. │ │ │ │ +00000560: 202f 2f20 5461 6773 2061 7265 206b 6579 // Tags are key │ │ │ │ +00000570: 776f 7264 732c 2063 6c61 7373 2027 2e6b words, class '.k │ │ │ │ +00000580: 270a 2020 2020 2020 2020 2428 2264 6976 '. $("div │ │ │ │ +00000590: 2e68 6967 686c 6967 6874 5c5c 2d68 746d .highlight\\-htm │ │ │ │ +000005a0: 6c5c 5c2b 646a 616e 676f 2073 7061 6e2e l\\+django span. │ │ │ │ +000005b0: 6b22 292e 6561 6368 2866 756e 6374 696f k").each(functio │ │ │ │ +000005c0: 6e28 692c 2065 6c65 6d29 207b 0a20 2020 n(i, elem) {. │ │ │ │ +000005d0: 2020 2020 2020 2020 2020 7661 7220 7461 var ta │ │ │ │ +000005e0: 676e 616d 6520 3d20 2428 656c 656d 292e gname = $(elem). │ │ │ │ +000005f0: 7465 7874 2829 3b0a 2020 2020 2020 2020 text();. │ │ │ │ +00000600: 2020 2020 2069 6620 2824 2e69 6e41 7272 if ($.inArr │ │ │ │ +00000610: 6179 2874 6167 6e61 6d65 2c20 646a 616e ay(tagname, djan │ │ │ │ +00000620: 676f 5f74 656d 706c 6174 655f 6275 696c go_template_buil │ │ │ │ +00000630: 7469 6e73 2e74 7461 6773 2920 213d 202d tins.ttags) != - │ │ │ │ +00000640: 3129 207b 0a20 2020 2020 2020 2020 2020 1) {. │ │ │ │ +00000650: 2020 2020 2020 7661 7220 6672 6167 6d65 var fragme │ │ │ │ +00000660: 6e74 203d 2074 6167 6e61 6d65 2e72 6570 nt = tagname.rep │ │ │ │ +00000670: 6c61 6365 282f 5f2f 2c20 272d 2729 3b0a lace(/_/, '-');. │ │ │ │ +00000680: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00000690: 2024 2865 6c65 6d29 2e68 746d 6c28 223c $(elem).html("< │ │ │ │ +000006a0: 6120 6872 6566 3d27 2220 2b20 6261 7365 a href='" + base │ │ │ │ +000006b0: 202b 2022 2322 202b 2066 7261 676d 656e + "#" + fragmen │ │ │ │ +000006c0: 7420 2b20 2227 3e22 202b 2074 6167 6e61 t + "'>" + tagna │ │ │ │ +000006d0: 6d65 202b 2022 3c2f 613e 2229 3b0a 2020 me + "");. │ │ │ │ +000006e0: 2020 2020 2020 2020 2020 207d 0a20 2020 }. │ │ │ │ +000006f0: 2020 2020 207d 293b 0a20 2020 2020 2020 });. │ │ │ │ +00000700: 202f 2f20 4669 6c74 6572 7320 6172 6520 // Filters are │ │ │ │ +00000710: 6675 6e63 7469 6f6e 732c 2063 6c61 7373 functions, class │ │ │ │ +00000720: 2027 2e6e 6627 0a20 2020 2020 2020 2024 '.nf'. $ │ │ │ │ +00000730: 2822 6469 762e 6869 6768 6c69 6768 745c ("div.highlight\ │ │ │ │ +00000740: 5c2d 6874 6d6c 5c5c 2b64 6a61 6e67 6f20 \-html\\+django │ │ │ │ +00000750: 7370 616e 2e6e 6622 292e 6561 6368 2866 span.nf").each(f │ │ │ │ +00000760: 756e 6374 696f 6e28 692c 2065 6c65 6d29 unction(i, elem) │ │ │ │ +00000770: 207b 0a20 2020 2020 2020 2020 2020 2020 {. │ │ │ │ +00000780: 7661 7220 6669 6c74 6572 6e61 6d65 203d var filtername = │ │ │ │ +00000790: 2024 2865 6c65 6d29 2e74 6578 7428 293b $(elem).text(); │ │ │ │ +000007a0: 0a20 2020 2020 2020 2020 2020 2020 6966 . if │ │ │ │ +000007b0: 2028 242e 696e 4172 7261 7928 6669 6c74 ($.inArray(filt │ │ │ │ +000007c0: 6572 6e61 6d65 2c20 646a 616e 676f 5f74 ername, django_t │ │ │ │ +000007d0: 656d 706c 6174 655f 6275 696c 7469 6e73 emplate_builtins │ │ │ │ +000007e0: 2e74 6669 6c74 6572 7329 2021 3d20 2d31 .tfilters) != -1 │ │ │ │ +000007f0: 2920 7b0a 2020 2020 2020 2020 2020 2020 ) {. │ │ │ │ +00000800: 2020 2020 2076 6172 2066 7261 676d 656e var fragmen │ │ │ │ +00000810: 7420 3d20 6669 6c74 6572 6e61 6d65 2e72 t = filtername.r │ │ │ │ +00000820: 6570 6c61 6365 282f 5f2f 2c20 272d 2729 eplace(/_/, '-') │ │ │ │ +00000830: 3b0a 2020 2020 2020 2020 2020 2020 2020 ;. │ │ │ │ +00000840: 2020 2024 2865 6c65 6d29 2e68 746d 6c28 $(elem).html( │ │ │ │ +00000850: 223c 6120 6872 6566 3d27 2220 2b20 6261 "" + fil │ │ │ │ +00000880: 7465 726e 616d 6520 2b20 223c 2f61 3e22 tername + "" │ │ │ │ +00000890: 293b 0a20 2020 2020 2020 2020 2020 2020 );. │ │ │ │ +000008a0: 7d0a 2020 2020 2020 2020 7d29 3b0a 2020 }. });. │ │ │ │ +000008b0: 2020 7d29 3b0a 7d29 286a 5175 6572 7929 });.})(jQuery) │ │ │ │ +000008c0: 3b3c 2f73 6372 6970 743e 0a0a 2020 3c2f ;.. .. │ │ │ │ +000008e0: 203c 6469 7620 636c 6173 733d 2264 6f63
    .
    . │ │ │ │ +00000920: 2020 203c 6469 7620 6964 3d22 6864 223e
    │ │ │ │ +00000930: 0a20 2020 2020 203c 6831 3e3c 6120 6872 .

    Djan │ │ │ │ +00000960: 676f 2034 2e32 2e31 3320 646f 6375 6d65 go 4.2.13 docume │ │ │ │ +00000970: 6e74 6174 6965 3c2f 613e 3c2f 6831 3e0a ntatie

    . │ │ │ │ +00000980: 2020 2020 2020 3c64 6976 2069 643d 2267
    . │ │ │ │ +000009a0: 2020 2020 3c61 2074 6974 6c65 3d22 486f Home │ │ │ │ +000009e0: 207c 0a20 2020 2020 2020 203c 6120 7469 |. Table o │ │ │ │ +00000a30: 6620 636f 6e74 656e 7473 3c2f 613e 2020 f contents │ │ │ │ +00000a40: 7c0a 2020 2020 2020 2020 3c61 2074 6974 |. Index |. │ │ │ │ +00000a90: 2020 2020 2020 2020 3c61 2074 6974 6c65 Modules. │ │ │ │ +00000ae0: 2020 2020 2020 3c2f 6469 763e 0a20 2020
    . │ │ │ │ +00000af0: 2020 203c 6469 7620 636c 6173 733d 226e
    . up
    . ..
    . │ │ │ │ +00000b90: 0a20 2020 2020 2020 203c 6469 7620 636c .
    . │ │ │ │ +00000bb0: 2020 2020 2020 203c 6469 7620 636c 6173
    . │ │ │ │ +00000c00: 2020 0a20 203c 6831 3e42 726f 6e63 6f64 .

    Broncod │ │ │ │ +00000c10: 6520 766f 6f72 2064 6a61 6e67 6f2e 6462 e voor django.db │ │ │ │ +00000c20: 2e6d 6f64 656c 732e 6578 7072 6573 7369 .models.expressi │ │ │ │ +00000c30: 6f6e 733c 2f68 313e 3c64 6976 2063 6c61 ons

    < │ │ │ │ +00000c50: 7072 653e 0a3c 7370 616e 3e3c 2f73 7061 pre>.import │ │ │ │ +00000c80: 203c 7370 616e 2063 6c61 7373 3d22 6e6e copy.i │ │ │ │ +00000cb0: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport da │ │ │ │ +00000cd0: 7465 7469 6d65 3c2f 7370 616e 3e0a 3c73 tetime.i │ │ │ │ +00000cf0: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport fu │ │ │ │ +00000d10: 6e63 746f 6f6c 733c 2f73 7061 6e3e 0a3c nctools.< │ │ │ │ +00000d20: 7370 616e 2063 6c61 7373 3d22 6b6e 223e span class="kn"> │ │ │ │ +00000d30: 696d 706f 7274 3c2f 7370 616e 3e20 3c73 import i │ │ │ │ +00000d50: 6e73 7065 6374 3c2f 7370 616e 3e0a 3c73 nspect.i │ │ │ │ +00000d70: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport wa │ │ │ │ +00000d90: 726e 696e 6773 3c2f 7370 616e 3e0a 3c73 rnings.f │ │ │ │ +00000db0: 726f 6d3c 2f73 7061 6e3e 203c 7370 616e rom coll │ │ │ │ +00000dd0: 6563 7469 6f6e 733c 2f73 7061 6e3e 203c ections < │ │ │ │ +00000de0: 7370 616e 2063 6c61 7373 3d22 6b6e 223e span class="kn"> │ │ │ │ +00000df0: 696d 706f 7274 3c2f 7370 616e 3e20 3c73 import de │ │ │ │ +00000e10: 6661 756c 7464 6963 743c 2f73 7061 6e3e faultdict │ │ │ │ +00000e20: 0a3c 7370 616e 2063 6c61 7373 3d22 6b6e .from d │ │ │ │ +00000e50: 6563 696d 616c 3c2f 7370 616e 3e20 3c73 ecimal i │ │ │ │ +00000e70: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport Dec │ │ │ │ +00000e90: 696d 616c 3c2f 7370 616e 3e0a 3c73 7061 imal.fro │ │ │ │ +00000eb0: 6d3c 2f73 7061 6e3e 203c 7370 616e 2063 m uuid import UUID │ │ │ │ +00000f10: 0a0a 3c73 7061 6e20 636c 6173 733d 226b ..from < │ │ │ │ +00000f30: 7370 616e 2063 6c61 7373 3d22 6e6e 223e span class="nn"> │ │ │ │ +00000f40: 646a 616e 676f 2e63 6f72 652e 6578 6365 django.core.exce │ │ │ │ +00000f50: 7074 696f 6e73 3c2f 7370 616e 3e20 3c73 ptions i │ │ │ │ +00000f70: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport Emp │ │ │ │ +00000f90: 7479 5265 7375 6c74 5365 743c 2f73 7061 tyResultSet, Field │ │ │ │ +00000fd0: 4572 726f 723c 2f73 7061 6e3e 3c73 7061 Error, FullResultS │ │ │ │ +00001010: 6574 3c2f 7370 616e 3e0a 3c73 7061 6e20 et.from< │ │ │ │ +00001030: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> django.d │ │ │ │ +00001050: 623c 2f73 7061 6e3e 203c 7370 616e 2063 b import │ │ │ │ +00001070: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Database │ │ │ │ +00001090: 4572 726f 723c 2f73 7061 6e3e 3c73 7061 Error, NotSupporte │ │ │ │ +000010d0: 6445 7272 6f72 3c2f 7370 616e 3e3c 7370 dError, connection │ │ │ │ +00001110: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c .from django.db. │ │ │ │ +00001150: 6d6f 6465 6c73 3c2f 7370 616e 3e20 3c73 models i │ │ │ │ +00001170: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport fie │ │ │ │ +00001190: 6c64 733c 2f73 7061 6e3e 0a3c 7370 616e lds.from │ │ │ │ +000011b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c django. │ │ │ │ +000011d0: 6462 2e6d 6f64 656c 732e 636f 6e73 7461 db.models.consta │ │ │ │ +000011e0: 6e74 733c 2f73 7061 6e3e 203c 7370 616e nts impo │ │ │ │ +00001200: 7274 3c2f 7370 616e 3e20 3c73 7061 6e20 rt LOOKUP │ │ │ │ +00001220: 5f53 4550 3c2f 7370 616e 3e0a 3c73 7061 _SEP.fro │ │ │ │ +00001240: 6d3c 2f73 7061 6e3e 203c 7370 616e 2063 m django │ │ │ │ +00001260: 2e64 622e 6d6f 6465 6c73 2e71 7565 7279 .db.models.query │ │ │ │ +00001270: 5f75 7469 6c73 3c2f 7370 616e 3e20 3c73 _utils i │ │ │ │ +00001290: 6d70 6f72 743c 2f73 7061 6e3e 203c 7370 mport Q.from django.utils │ │ │ │ +000012f0: 2e64 6563 6f6e 7374 7275 6374 3c2f 7370 .deconstruct import deconstructib │ │ │ │ +00001340: 6c65 3c2f 7370 616e 3e0a 3c73 7061 6e20 le.from< │ │ │ │ +00001360: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> django.u │ │ │ │ +00001380: 7469 6c73 2e64 6570 7265 6361 7469 6f6e tils.deprecation │ │ │ │ +00001390: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c import< │ │ │ │ +000013b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> RemovedIn │ │ │ │ +000013d0: 446a 616e 676f 3530 5761 726e 696e 673c Django50Warning< │ │ │ │ +000013e0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>.from django.util │ │ │ │ +00001420: 732e 6675 6e63 7469 6f6e 616c 3c2f 7370 s.functional import cached_proper │ │ │ │ +00001470: 7479 3c2f 7370 616e 3e0a 3c73 7061 6e20 ty.from< │ │ │ │ +00001490: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> django.u │ │ │ │ +000014b0: 7469 6c73 2e68 6173 6861 626c 653c 2f73 tils.hashable import make_hashabl │ │ │ │ +00001500: 653c 2f73 7061 6e3e 0a0a 0a3c 7370 616e e...class │ │ │ │ +00001520: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c SQLiteN │ │ │ │ +00001540: 756d 6572 6963 4d69 7869 6e3c 2f73 7061 umericMixin:. < │ │ │ │ +00001580: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ +000015a0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ +000015b0: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . Some expre │ │ │ │ +000015d0: 7373 696f 6e73 2077 6974 6820 6f75 7470 ssions with outp │ │ │ │ +000015e0: 7574 5f66 6965 6c64 3d44 6563 696d 616c ut_field=Decimal │ │ │ │ +000015f0: 4669 656c 6428 2920 6d75 7374 2062 6520 Field() must be │ │ │ │ +00001600: 6361 7374 2074 6f3c 2f73 7061 6e3e 0a3c cast to.< │ │ │ │ +00001610: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00001620: 2020 2020 6e75 6d65 7269 6320 746f 2062 numeric to b │ │ │ │ +00001630: 6520 7072 6f70 6572 6c79 2066 696c 7465 e properly filte │ │ │ │ +00001640: 7265 642e 3c2f 7370 616e 3e0a 3c73 7061 red.. │ │ │ │ +00001660: 2026 7175 6f74 3b26 7175 6f74 3b26 7175 ""&qu │ │ │ │ +00001670: 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 2020 ot;.. │ │ │ │ +00001680: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00001690: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_s │ │ │ │ +000016b0: 716c 6974 653c 2f73 7061 6e3e 3c73 7061 qlite(self │ │ │ │ +000016f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00001700: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ +00001720: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00001740: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection, **extra_contex │ │ │ │ +000017b0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t):. sql, par │ │ │ │ +00001820: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = self │ │ │ │ +00001860: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00001870: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .as_sql(com │ │ │ │ +000018c0: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler, connection< │ │ │ │ +00001900: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00001920: 7370 616e 2063 6c61 7373 3d22 6f22 3e2a span class="o">* │ │ │ │ +00001930: 2a3c 2f73 7061 6e3e 3c73 7061 6e20 636c *extra_co │ │ │ │ +00001950: 6e74 6578 743c 2f73 7061 6e3e 3c73 7061 ntext). try │ │ │ │ +00001990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +000019b0: 2020 2020 2020 2020 2020 2020 3c73 7061 if self.output │ │ │ │ +00001a20: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field.get_interna │ │ │ │ +00001a60: 6c5f 7479 7065 3c2f 7370 616e 3e3c 7370 l_type()< │ │ │ │ +00001a80: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> == │ │ │ │ +00001aa0: 203c 7370 616e 2063 6c61 7373 3d22 7332 "DecimalF │ │ │ │ +00001ac0: 6965 6c64 2671 756f 743b 3c2f 7370 616e ield":. │ │ │ │ +00001af0: 2020 2020 2020 2020 2020 3c73 7061 6e20 sql = & │ │ │ │ +00001b40: 7175 6f74 3b43 4153 5428 3c2f 7370 616e quot;CAST(%s AS │ │ │ │ +00001b80: 4e55 4d45 5249 4329 2671 756f 743b 3c2f NUMERIC)" % < │ │ │ │ +00001bb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00001bc0: 716c 3c2f 7370 616e 3e0a 2020 2020 2020 ql. │ │ │ │ +00001bd0: 2020 3c73 7061 6e20 636c 6173 733d 226b except │ │ │ │ +00001bf0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00001c00: 4669 656c 6445 7272 6f72 3c2f 7370 616e FieldError:. │ │ │ │ +00001c30: 2020 2020 2020 3c73 7061 6e20 636c 6173 pass. return │ │ │ │ +00001c70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c sql, param │ │ │ │ +00001cc0: 733c 2f73 7061 6e3e 0a0a 0a3c 7370 616e s...class │ │ │ │ +00001ce0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Combina │ │ │ │ +00001d00: 626c 653c 2f73 7061 6e3e 3c73 7061 6e20 ble:. & │ │ │ │ +00001d50: 7175 6f74 3b26 7175 6f74 3b26 7175 6f74 quot;"" │ │ │ │ +00001d60: 3b3c 2f73 7061 6e3e 0a3c 7370 616e 2063 ;. Pr │ │ │ │ +00001d80: 6f76 6964 6520 7468 6520 6162 696c 6974 ovide the abilit │ │ │ │ +00001d90: 7920 746f 2063 6f6d 6269 6e65 206f 6e65 y to combine one │ │ │ │ +00001da0: 206f 7220 7477 6f20 6f62 6a65 6374 7320 or two objects │ │ │ │ +00001db0: 7769 7468 3c2f 7370 616e 3e0a 3c73 7061 with. │ │ │ │ +00001dd0: 2073 6f6d 6520 636f 6e6e 6563 746f 722e some connector. │ │ │ │ +00001de0: 2046 6f72 2065 7861 6d70 6c65 2046 2826 For example F(& │ │ │ │ +00001df0: 2333 393b 666f 6f26 2333 393b 2920 2b20 #39;foo') + │ │ │ │ +00001e00: 4628 2623 3339 3b62 6172 2623 3339 3b29 F('bar') │ │ │ │ +00001e10: 2e3c 2f73 7061 6e3e 0a3c 7370 616e 2063 .. &q │ │ │ │ +00001e30: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ +00001e40: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. # │ │ │ │ +00001e60: 4172 6974 686d 6574 6963 2063 6f6e 6e65 Arithmetic conne │ │ │ │ +00001e70: 6374 6f72 733c 2f73 7061 6e3e 0a20 2020 ctors. │ │ │ │ +00001e80: 203c 7370 616e 2063 6c61 7373 3d22 6e22 ADD = "+&qu │ │ │ │ +00001ed0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 203c ot;. < │ │ │ │ +00001ee0: 7370 616e 2063 6c61 7373 3d22 6e22 3e53 span class="n">S │ │ │ │ +00001ef0: 5542 3c2f 7370 616e 3e20 3c73 7061 6e20 UB = "-" │ │ │ │ +00001f30: 3b3c 2f73 7061 6e3e 0a20 2020 203c 7370 ;. MUL │ │ │ │ +00001f50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +00001f70: 203c 7370 616e 2063 6c61 7373 3d22 7332 "*"< │ │ │ │ +00001f90: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. DIV = < │ │ │ │ +00001fd0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00001fe0: 2671 756f 743b 2f26 7175 6f74 3b3c 2f73 "/". POW = &q │ │ │ │ +00002040: 756f 743b 5e26 7175 6f74 3b3c 2f73 7061 uot;^". # The fo │ │ │ │ +00002070: 6c6c 6f77 696e 6720 6973 2061 2071 756f llowing is a quo │ │ │ │ +00002080: 7465 6420 2520 6f70 6572 6174 6f72 202d ted % operator - │ │ │ │ +00002090: 2069 7420 6973 2071 756f 7465 6420 6265 it is quoted be │ │ │ │ +000020a0: 6361 7573 6520 6974 2063 616e 2062 653c cause it can be< │ │ │ │ +000020b0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. # us │ │ │ │ +000020d0: 6564 2069 6e20 7374 7269 6e67 7320 7468 ed in strings th │ │ │ │ +000020e0: 6174 2061 6c73 6f20 6861 7665 2070 6172 at also have par │ │ │ │ +000020f0: 616d 6574 6572 2073 7562 7374 6974 7574 ameter substitut │ │ │ │ +00002100: 696f 6e2e 3c2f 7370 616e 3e0a 2020 2020 ion.. │ │ │ │ +00002110: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00002120: 4d4f 443c 2f73 7061 6e3e 203c 7370 616e MOD = "%%&qu │ │ │ │ +00002190: 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 2020 ot;.. │ │ │ │ +000021a0: 3c73 7061 6e20 636c 6173 733d 2263 3122 # Bitwise opera │ │ │ │ +000021c0: 746f 7273 202d 206e 6f74 6520 7468 6174 tors - note that │ │ │ │ +000021d0: 2074 6865 7365 2061 7265 2067 656e 6572 these are gener │ │ │ │ +000021e0: 6174 6564 2062 7920 2e62 6974 616e 6428 ated by .bitand( │ │ │ │ +000021f0: 293c 2f73 7061 6e3e 0a20 2020 203c 7370 ). # │ │ │ │ +00002210: 616e 6420 2e62 6974 6f72 2829 2c20 7468 and .bitor(), th │ │ │ │ +00002220: 6520 2623 3339 3b26 616d 703b 2623 3339 e '&' │ │ │ │ +00002230: 3b20 616e 6420 2623 3339 3b7c 2623 3339 ; and '|' │ │ │ │ +00002240: 3b20 6172 6520 7265 7365 7276 6564 2066 ; are reserved f │ │ │ │ +00002250: 6f72 2062 6f6f 6c65 616e 206f 7065 7261 or boolean opera │ │ │ │ +00002260: 746f 723c 2f73 7061 6e3e 0a20 2020 203c tor. < │ │ │ │ +00002270: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ +00002280: 2320 7573 6167 652e 3c2f 7370 616e 3e0a # usage.. │ │ │ │ +00002290: 2020 2020 3c73 7061 6e20 636c 6173 733d BITAND = &quo │ │ │ │ +000022e0: 743b 2661 6d70 3b26 7175 6f74 3b3c 2f73 t;&". BITOR = < │ │ │ │ +00002330: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00002340: 2671 756f 743b 7c26 7175 6f74 3b3c 2f73 "|". BITLEFT │ │ │ │ +00002370: 5348 4946 543c 2f73 7061 6e3e 203c 7370 SHIFT = "< │ │ │ │ +000023b0: 3b26 6c74 3b26 7175 6f74 3b3c 2f73 7061 ;<". BITRIGHTS │ │ │ │ +000023e0: 4849 4654 3c2f 7370 616e 3e20 3c73 7061 HIFT = "> │ │ │ │ +00002420: 2667 743b 2671 756f 743b 3c2f 7370 616e >". BITXOR = &q │ │ │ │ +00002480: 756f 743b 2326 7175 6f74 3b3c 2f73 7061 uot;#".. def _combine(self │ │ │ │ +00002500: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00002520: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00002530: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other, connector, r │ │ │ │ +000025a0: 6576 6572 7365 643c 2f73 7061 6e3e 3c73 eversed): │ │ │ │ +000025c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000025d0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000025e0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if not hasattr(oth │ │ │ │ +00002650: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, "resolve │ │ │ │ +00002690: 5f65 7870 7265 7373 696f 6e26 7175 6f74 _expression" │ │ │ │ +000026a0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;):. # │ │ │ │ +000026e0: 2065 7665 7279 7468 696e 6720 6d75 7374 everything must │ │ │ │ +000026f0: 2062 6520 7265 736f 6c76 6162 6c65 2074 be resolvable t │ │ │ │ +00002700: 6f20 616e 2065 7870 7265 7373 696f 6e3c o an expression< │ │ │ │ +00002710: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00002720: 2020 203c 7370 616e 2063 6c61 7373 3d22 other │ │ │ │ +00002740: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00002750: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = Value(oth │ │ │ │ +000027a0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er).. if reversed:. │ │ │ │ +00002820: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ +00002840: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Combined │ │ │ │ +00002860: 4578 7072 6573 7369 6f6e 3c2f 7370 616e Expression(other, co │ │ │ │ +000028d0: 6e6e 6563 746f 723c 2f73 7061 6e3e 3c73 nnector,< │ │ │ │ +000028f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self). │ │ │ │ +00002930: 2020 2020 3c73 7061 6e20 636c 6173 733d return CombinedExpres │ │ │ │ +00002970: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(self< │ │ │ │ +000029b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000029c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecto │ │ │ │ +000029e0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00002a00: 203c 7370 616e 2063 6c61 7373 3d22 6e22 other).. #### │ │ │ │ +00002a50: 2323 2323 2323 2323 233c 2f73 7061 6e3e ######### │ │ │ │ +00002a60: 0a20 2020 203c 7370 616e 2063 6c61 7373 . # OPERATOR │ │ │ │ +00002a80: 5320 233c 2f73 7061 6e3e 0a20 2020 203c S #. < │ │ │ │ +00002a90: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ +00002aa0: 2323 2323 2323 2323 2323 2323 233c 2f73 #############.. def __neg__(sel │ │ │ │ +00002b20: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ +00002b60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self._com │ │ │ │ +00002bb0: 6269 6e65 3c2f 7370 616e 3e3c 7370 616e bine(-1, se │ │ │ │ +00002c30: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.MUL, False).. < │ │ │ │ +00002cc0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +00002cd0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __add │ │ │ │ +00002cf0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self, other):. │ │ │ │ +00002d80: 2020 2020 3c73 7061 6e20 636c 6173 733d return self.< │ │ │ │ +00002dd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_combine(oth │ │ │ │ +00002e20: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, self.< │ │ │ │ +00002e70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ADD │ │ │ │ +00002e90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00002ea0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , False< │ │ │ │ +00002ec0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ +00002ee0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00002f00: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ +00002f10: 5f5f 7375 625f 5f3c 2f73 7061 6e3e 3c73 __sub__(< │ │ │ │ +00002f30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, other │ │ │ │ +00002f80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00002fa0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +00002fc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self._comb │ │ │ │ +00003010: 696e 653c 2f73 7061 6e3e 3c73 7061 6e20 ine(other,< │ │ │ │ +00003060: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.SUB, F │ │ │ │ +000030e0: 616c 7365 3c2f 7370 616e 3e3c 7370 616e alse).. def __mul__(self │ │ │ │ +00003170: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00003190: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000031a0: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other):. re │ │ │ │ +000031e0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ +00003200: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00003220: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00003230: 5f63 6f6d 6269 6e65 3c2f 7370 616e 3e3c _combine< │ │ │ │ +00003240: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00003250: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 other, sel │ │ │ │ +000032a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000032c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000032d0: 4d55 4c3c 2f73 7061 6e3e 3c73 7061 6e20 MUL, False │ │ │ │ +00003310: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00003320: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ +00003340: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __true │ │ │ │ +00003360: 6469 765f 5f3c 2f73 7061 6e3e 3c73 7061 div__(self │ │ │ │ +000033a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000033b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , other):. │ │ │ │ +000033f0: 2020 2020 2020 203c 7370 616e 2063 6c61 return self._combin │ │ │ │ +00003460: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +00003480: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00003490: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other, self.DIV, Fal │ │ │ │ +00003530: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se).. def __mod__(self, ot │ │ │ │ +000035f0: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her):. retu │ │ │ │ +00003630: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ +00003650: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._c │ │ │ │ +00003680: 6f6d 6269 6e65 3c2f 7370 616e 3e3c 7370 ombine(other, self< │ │ │ │ +000036f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.MO │ │ │ │ +00003720: 443c 2f73 7061 6e3e 3c73 7061 6e20 636c D, │ │ │ │ +00003740: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False)< │ │ │ │ +00003770: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +00003790: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __pow__< │ │ │ │ +000037b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +000037e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, other< │ │ │ │ +00003820: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00003830: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00003840: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00003860: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00003870: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self._combine(other< │ │ │ │ +000038e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00003900: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00003910: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.POW, False).. │ │ │ │ +000039a0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __a │ │ │ │ +000039d0: 6e64 5f5f 3c2f 7370 616e 3e3c 7370 616e nd__(self< │ │ │ │ +00003a10: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00003a20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c other):. │ │ │ │ +00003a60: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ +00003a80: 3c73 7061 6e20 636c 6173 733d 226e 6222 getattr< │ │ │ │ +00003aa0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00003ab0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, &qu │ │ │ │ +00003b00: 6f74 3b63 6f6e 6469 7469 6f6e 616c 2671 ot;conditional&q │ │ │ │ +00003b10: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;, False) and getattr(oth │ │ │ │ +00003bd0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, "conditi │ │ │ │ +00003c10: 6f6e 616c 2671 756f 743b 3c2f 7370 616e onal", False │ │ │ │ +00003c50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00003c70: 0a20 2020 2020 2020 2020 2020 203c 7370 . ret │ │ │ │ +00003c90: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn Q(self │ │ │ │ +00003ce0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ) │ │ │ │ +00003d00: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00003d10: 2661 6d70 3b3c 2f73 7061 6e3e 203c 7370 & Q(oth │ │ │ │ +00003d60: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er). raise< │ │ │ │ +00003da0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> NotImple │ │ │ │ +00003dc0: 6d65 6e74 6564 4572 726f 723c 2f73 7061 mentedError(. │ │ │ │ +00003df0: 2020 2020 2020 203c 7370 616e 2063 6c61 "Us │ │ │ │ +00003e10: 6520 2e62 6974 616e 6428 292c 202e 6269 e .bitand(), .bi │ │ │ │ +00003e20: 746f 7228 292c 2061 6e64 202e 6269 7478 tor(), and .bitx │ │ │ │ +00003e30: 6f72 2829 2066 6f72 2062 6974 7769 7365 or() for bitwise │ │ │ │ +00003e40: 206c 6f67 6963 616c 206f 7065 7261 7469 logical operati │ │ │ │ +00003e50: 6f6e 732e 2671 756f 743b 3c2f 7370 616e ons.". ).. def bitand(self, ot │ │ │ │ +00003f20: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her):. retu │ │ │ │ +00003f60: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ +00003f80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._c │ │ │ │ +00003fb0: 6f6d 6269 6e65 3c2f 7370 616e 3e3c 7370 ombine(other, self< │ │ │ │ +00004020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.BI │ │ │ │ +00004050: 5441 4e44 3c2f 7370 616e 3e3c 7370 616e TAND, False).. < │ │ │ │ +000040b0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +000040c0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef bitle │ │ │ │ +000040e0: 6674 7368 6966 743c 2f73 7061 6e3e 3c73 ftshift(< │ │ │ │ +00004100: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, other │ │ │ │ +00004150: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00004170: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +00004190: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self._comb │ │ │ │ +000041e0: 696e 653c 2f73 7061 6e3e 3c73 7061 6e20 ine(other,< │ │ │ │ +00004230: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.BITLE │ │ │ │ +00004280: 4654 5348 4946 543c 2f73 7061 6e3e 3c73 FTSHIFT,< │ │ │ │ +000042a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> False).. │ │ │ │ +000042e0: 2020 3c73 7061 6e20 636c 6173 733d 226b def bi │ │ │ │ +00004310: 7472 6967 6874 7368 6966 743c 2f73 7061 trightshift(self< │ │ │ │ +00004350: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00004370: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00004380: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther):. ret │ │ │ │ +000043c0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn self │ │ │ │ +000043e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00004400: 7370 616e 2063 6c61 7373 3d22 6e22 3e5f span class="n">_ │ │ │ │ +00004410: 636f 6d62 696e 653c 2f73 7061 6e3e 3c73 combine(< │ │ │ │ +00004430: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>other, self │ │ │ │ +00004480: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000044a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e42 span class="n">B │ │ │ │ +000044b0: 4954 5249 4748 5453 4849 4654 3c2f 7370 ITRIGHTSHIFT, Fal │ │ │ │ +000044f0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se).. def __xor__(self, ot │ │ │ │ +000045b0: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her):. if getattr(se │ │ │ │ +00004640: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, "conditi │ │ │ │ +00004680: 6f6e 616c 2671 756f 743b 3c2f 7370 616e onal", False │ │ │ │ +000046c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ) │ │ │ │ +000046e0: 3c73 7061 6e20 636c 6173 733d 226f 7722 and get │ │ │ │ +00004710: 6174 7472 3c2f 7370 616e 3e3c 7370 616e attr(other< │ │ │ │ +00004750: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00004760: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "c │ │ │ │ +00004780: 6f6e 6469 7469 6f6e 616c 2671 756f 743b onditional" │ │ │ │ +00004790: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +000047b0: 3c73 7061 6e20 636c 6173 733d 226b 6322 False):< │ │ │ │ +000047e0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +000047f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00004810: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Q(self) ^ < │ │ │ │ +00004890: 7370 616e 2063 6c61 7373 3d22 6e22 3e51 span class="n">Q │ │ │ │ +000048a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000048c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +000048d0: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther). rais │ │ │ │ +00004910: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e NotImp │ │ │ │ +00004930: 6c65 6d65 6e74 6564 4572 726f 723c 2f73 lementedError(. │ │ │ │ +00004960: 2020 2020 2020 2020 203c 7370 616e 2063 " │ │ │ │ +00004980: 5573 6520 2e62 6974 616e 6428 292c 202e Use .bitand(), . │ │ │ │ +00004990: 6269 746f 7228 292c 2061 6e64 202e 6269 bitor(), and .bi │ │ │ │ +000049a0: 7478 6f72 2829 2066 6f72 2062 6974 7769 txor() for bitwi │ │ │ │ +000049b0: 7365 206c 6f67 6963 616c 206f 7065 7261 se logical opera │ │ │ │ +000049c0: 7469 6f6e 732e 2671 756f 743b 3c2f 7370 tions.". ).. def bitxor(self │ │ │ │ +00004a60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00004a80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00004a90: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other):. re │ │ │ │ +00004ad0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ +00004af0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00004b10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00004b20: 5f63 6f6d 6269 6e65 3c2f 7370 616e 3e3c _combine< │ │ │ │ +00004b30: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00004b40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 other, sel │ │ │ │ +00004b90: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00004bb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00004bc0: 4249 5458 4f52 3c2f 7370 616e 3e3c 7370 BITXOR, False).. │ │ │ │ +00004c20: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __o │ │ │ │ +00004c50: 725f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 r__(self,< │ │ │ │ +00004ca0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> other):. │ │ │ │ +00004ce0: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +00004d00: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00004d10: 6765 7461 7474 723c 2f73 7061 6e3e 3c73 getattr(< │ │ │ │ +00004d30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, &quo │ │ │ │ +00004d80: 743b 636f 6e64 6974 696f 6e61 6c26 7175 t;conditional&qu │ │ │ │ +00004d90: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;, False │ │ │ │ +00004dd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00004de0: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) and getattr(othe │ │ │ │ +00004e50: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00004e70: 203c 7370 616e 2063 6c61 7373 3d22 7332 "conditio │ │ │ │ +00004e90: 6e61 6c26 7175 6f74 3b3c 2f73 7061 6e3e nal" │ │ │ │ +00004ea0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00004eb0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , False< │ │ │ │ +00004ed0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00004ef0: 2020 2020 2020 2020 2020 2020 3c73 7061 retu │ │ │ │ +00004f10: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn Q(self< │ │ │ │ 00004f60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ot │ │ │ │ -00004f90: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her). raise │ │ │ │ -00004fd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c NotImpl │ │ │ │ -00004ff0: 656d 656e 7465 6445 7272 6f72 3c2f 7370 ementedError(. │ │ │ │ -00005020: 2020 2020 2020 2020 3c73 7061 6e20 636c "U │ │ │ │ -00005040: 7365 202e 6269 7461 6e64 2829 2c20 2e62 se .bitand(), .b │ │ │ │ -00005050: 6974 6f72 2829 2c20 616e 6420 2e62 6974 itor(), and .bit │ │ │ │ -00005060: 786f 7228 2920 666f 7220 6269 7477 6973 xor() for bitwis │ │ │ │ -00005070: 6520 6c6f 6769 6361 6c20 6f70 6572 6174 e logical operat │ │ │ │ -00005080: 696f 6e73 2e26 7175 6f74 3b3c 2f73 7061 ions.". ).. def bitor(self, ot │ │ │ │ -00005150: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her):. retu │ │ │ │ -00005190: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ -000051b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._c │ │ │ │ -000051e0: 6f6d 6269 6e65 3c2f 7370 616e 3e3c 7370 ombine(other, self< │ │ │ │ -00005250: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.BI │ │ │ │ -00005280: 544f 523c 2f73 7061 6e3e 3c73 7061 6e20 TOR, False │ │ │ │ -000052c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000052d0: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ -000052f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __radd │ │ │ │ -00005310: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self, other):. │ │ │ │ -000053a0: 2020 2020 3c73 7061 6e20 636c 6173 733d return self.< │ │ │ │ -000053f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_combine(oth │ │ │ │ -00005440: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, self.< │ │ │ │ -00005490: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ADD │ │ │ │ -000054b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000054c0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , True).. │ │ │ │ -00005500: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ -00005530: 5f72 7375 625f 5f3c 2f73 7061 6e3e 3c73 _rsub__(< │ │ │ │ -00005550: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, other │ │ │ │ -000055a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -000055c0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -000055e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self._comb │ │ │ │ -00005630: 696e 653c 2f73 7061 6e3e 3c73 7061 6e20 ine(other,< │ │ │ │ -00005680: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.SUB, T │ │ │ │ -00005700: 7275 653c 2f73 7061 6e3e 3c73 7061 6e20 rue).. def __rmul__(self │ │ │ │ -00005790: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000057b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000057c0: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other):. re │ │ │ │ -00005800: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ -00005820: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00005840: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00005850: 5f63 6f6d 6269 6e65 3c2f 7370 616e 3e3c _combine< │ │ │ │ -00005860: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00005870: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 other, sel │ │ │ │ -000058c0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -000058e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000058f0: 4d55 4c3c 2f73 7061 6e3e 3c73 7061 6e20 MUL, True< │ │ │ │ -00005930: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00005940: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -00005960: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __rtrue │ │ │ │ -00005980: 6469 765f 5f3c 2f73 7061 6e3e 3c73 7061 div__(self │ │ │ │ -000059c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000059d0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , other):. │ │ │ │ -00005a10: 2020 2020 2020 203c 7370 616e 2063 6c61 return self._combin │ │ │ │ -00005a80: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -00005aa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00005ab0: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other, self.DIV, Tru │ │ │ │ -00005b50: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e) │ │ │ │ -00005b70: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00005b90: 203c 7370 616e 2063 6c61 7373 3d22 666d __rmod__(self, ot │ │ │ │ -00005c10: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her):. retu │ │ │ │ -00005c50: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ -00005c70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._c │ │ │ │ -00005ca0: 6f6d 6269 6e65 3c2f 7370 616e 3e3c 7370 ombine(other, self< │ │ │ │ -00005d10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.MO │ │ │ │ -00005d40: 443c 2f73 7061 6e3e 3c73 7061 6e20 636c D, │ │ │ │ -00005d60: 203c 7370 616e 2063 6c61 7373 3d22 6b63 True).. def __rpow__< │ │ │ │ -00005dd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00005e00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, other< │ │ │ │ -00005e40: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00005e50: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00005e60: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00005e80: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00005e90: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self._combine(other< │ │ │ │ -00005f00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00005f20: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00005f30: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.POW, True).. │ │ │ │ -00005fc0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00005fd0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __ra │ │ │ │ -00005ff0: 6e64 5f5f 3c2f 7370 616e 3e3c 7370 616e nd__(self< │ │ │ │ -00006030: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00006040: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c other):. │ │ │ │ -00006080: 2020 2020 2020 3c73 7061 6e20 636c 6173 raise NotImplement │ │ │ │ -000060c0: 6564 4572 726f 723c 2f73 7061 6e3e 3c73 edError(< │ │ │ │ -000060e0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -000060f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 "Use .b │ │ │ │ -00006110: 6974 616e 6428 292c 202e 6269 746f 7228 itand(), .bitor( │ │ │ │ -00006120: 292c 2061 6e64 202e 6269 7478 6f72 2829 ), and .bitxor() │ │ │ │ -00006130: 2066 6f72 2062 6974 7769 7365 206c 6f67 for bitwise log │ │ │ │ -00006140: 6963 616c 206f 7065 7261 7469 6f6e 732e ical operations. │ │ │ │ -00006150: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ -00006160: 2020 2020 2020 3c73 7061 6e20 636c 6173 ).. │ │ │ │ -00006180: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -000061a0: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -000061b0: 5f5f 726f 725f 5f3c 2f73 7061 6e3e 3c73 __ror__(< │ │ │ │ -000061d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, other │ │ │ │ -00006220: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -00006240: 0a20 2020 2020 2020 203c 7370 616e 2063 . raise NotImplem │ │ │ │ -00006280: 656e 7465 6445 7272 6f72 3c2f 7370 616e entedError(. │ │ │ │ -000062b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 "Use │ │ │ │ -000062d0: 202e 6269 7461 6e64 2829 2c20 2e62 6974 .bitand(), .bit │ │ │ │ -000062e0: 6f72 2829 2c20 616e 6420 2e62 6974 786f or(), and .bitxo │ │ │ │ -000062f0: 7228 2920 666f 7220 6269 7477 6973 6520 r() for bitwise │ │ │ │ -00006300: 6c6f 6769 6361 6c20 6f70 6572 6174 696f logical operatio │ │ │ │ -00006310: 6e73 2e26 7175 6f74 3b3c 2f73 7061 6e3e ns." │ │ │ │ -00006320: 0a20 2020 2020 2020 203c 7370 616e 2063 . ).. def __rxor__(self< │ │ │ │ -000063b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000063d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -000063e0: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther):. rai │ │ │ │ -00006420: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se NotIm │ │ │ │ -00006440: 706c 656d 656e 7465 6445 7272 6f72 3c2f plementedError(. │ │ │ │ -00006470: 2020 2020 2020 2020 2020 3c73 7061 6e20 " │ │ │ │ -00006490: 3b55 7365 202e 6269 7461 6e64 2829 2c20 ;Use .bitand(), │ │ │ │ -000064a0: 2e62 6974 6f72 2829 2c20 616e 6420 2e62 .bitor(), and .b │ │ │ │ -000064b0: 6974 786f 7228 2920 666f 7220 6269 7477 itxor() for bitw │ │ │ │ -000064c0: 6973 6520 6c6f 6769 6361 6c20 6f70 6572 ise logical oper │ │ │ │ -000064d0: 6174 696f 6e73 2e26 7175 6f74 3b3c 2f73 ations.". ).. def __invert_ │ │ │ │ -00006540: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ -00006560: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. re │ │ │ │ -000065b0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn Nega │ │ │ │ -000065d0: 7465 6445 7870 7265 7373 696f 6e3c 2f73 tedExpression(sel │ │ │ │ -00006610: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f) │ │ │ │ -00006630: 0a0a 0a3c 7370 616e 2063 6c61 7373 3d22 ...class │ │ │ │ -00006650: 3c73 7061 6e20 636c 6173 733d 226e 6322 BaseExpression< │ │ │ │ -00006670: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:.< │ │ │ │ -00006690: 7370 616e 2063 6c61 7373 3d22 7722 3e20 span class="w"> │ │ │ │ -000066a0: 2020 203c 2f73 7061 6e3e 3c73 7061 6e20 " │ │ │ │ -000066c0: 3b26 7175 6f74 3b26 7175 6f74 3b42 6173 ;""Bas │ │ │ │ -000066d0: 6520 636c 6173 7320 666f 7220 616c 6c20 e class for all │ │ │ │ -000066e0: 7175 6572 7920 6578 7072 6573 7369 6f6e query expression │ │ │ │ -000066f0: 732e 2671 756f 743b 2671 756f 743b 2671 s.""&q │ │ │ │ -00006700: 756f 743b 3c2f 7370 616e 3e0a 0a20 2020 uot;.. │ │ │ │ -00006710: 203c 7370 616e 2063 6c61 7373 3d22 6e22 empty_result_se │ │ │ │ -00006730: 745f 7661 6c75 653c 2f73 7061 6e3e 203c t_value < │ │ │ │ -00006740: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00006750: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c NotImpl │ │ │ │ -00006770: 656d 656e 7465 643c 2f73 7061 6e3e 0a20 emented. │ │ │ │ -00006780: 2020 203c 7370 616e 2063 6c61 7373 3d22 # aggregate │ │ │ │ -000067a0: 7370 6563 6966 6963 2066 6965 6c64 733c specific fields< │ │ │ │ -000067b0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. is_su │ │ │ │ -000067d0: 6d6d 6172 793c 2f73 7061 6e3e 203c 7370 mmary = False. _output_ │ │ │ │ -00006830: 6669 656c 645f 7265 736f 6c76 6564 5f74 field_resolved_t │ │ │ │ -00006840: 6f5f 6e6f 6e65 3c2f 7370 616e 3e20 3c73 o_none =< │ │ │ │ -00006860: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> False. # Can │ │ │ │ -000068a0: 7468 6520 6578 7072 6573 7369 6f6e 2062 the expression b │ │ │ │ -000068b0: 6520 7573 6564 2069 6e20 6120 5748 4552 e used in a WHER │ │ │ │ -000068c0: 4520 636c 6175 7365 3f3c 2f73 7061 6e3e E clause? │ │ │ │ -000068d0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . filterable< │ │ │ │ -000068f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00006910: 3c73 7061 6e20 636c 6173 733d 226b 6322 True. │ │ │ │ -00006930: 203c 7370 616e 2063 6c61 7373 3d22 6331 # Can the expr │ │ │ │ -00006950: 6573 7369 6f6e 2063 616e 2062 6520 7573 ession can be us │ │ │ │ -00006960: 6564 2061 7320 6120 736f 7572 6365 2065 ed as a source e │ │ │ │ -00006970: 7870 7265 7373 696f 6e20 696e 2057 696e xpression in Win │ │ │ │ -00006980: 646f 773f 3c2f 7370 616e 3e0a 2020 2020 dow?. │ │ │ │ -00006990: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000069a0: 7769 6e64 6f77 5f63 6f6d 7061 7469 626c window_compatibl │ │ │ │ -000069b0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = False. │ │ │ │ -000069f0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -00006a10: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __init__ │ │ │ │ -00006a30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00006a40: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, out │ │ │ │ -00006a90: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -00006aa0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00006ab0: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =None):. │ │ │ │ -00006af0: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ -00006b10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00006b20: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field is < │ │ │ │ -00006b50: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -00006b60: 6e6f 743c 2f73 7061 6e3e 203c 7370 616e not None │ │ │ │ -00006b80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -00006ba0: 2020 2020 2020 2020 2020 2020 3c73 7061 sel │ │ │ │ -00006bc0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00006be0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00006bf0: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field = out │ │ │ │ -00006c30: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -00006c40: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00006c60: 203c 7370 616e 2063 6c61 7373 3d22 6e66 __getstate__(se │ │ │ │ -00006cb0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. state │ │ │ │ -00006cf0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00006d10: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.__dict__.cop │ │ │ │ -00006d90: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y(). state< │ │ │ │ -00006dd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.po │ │ │ │ -00006e00: 703c 2f73 7061 6e3e 3c73 7061 6e20 636c p( │ │ │ │ -00006e20: 3c73 7061 6e20 636c 6173 733d 2273 3222 "convert_v │ │ │ │ -00006e40: 616c 7565 2671 756f 743b 3c2f 7370 616e alue", None< │ │ │ │ -00006e80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -00006ea0: 2020 2020 2020 203c 7370 616e 2063 6c61 return state.. def get_db_conver │ │ │ │ -00006f20: 7465 7273 3c2f 7370 616e 3e3c 7370 616e ters(self< │ │ │ │ -00006f60: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00006f70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -00006f90: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on):. retur │ │ │ │ -00006fd0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n (. [] │ │ │ │ -00007010: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00007020: 2020 2020 3c73 7061 6e20 636c 6173 733d if s │ │ │ │ -00007050: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.convert_value< │ │ │ │ -00007090: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> is self.< │ │ │ │ -000070e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_convert_v │ │ │ │ -00007100: 616c 7565 5f6e 6f6f 703c 2f73 7061 6e3e alue_noop │ │ │ │ -00007110: 0a20 2020 2020 2020 2020 2020 203c 7370 . els │ │ │ │ -00007130: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e [self.convert_val │ │ │ │ -000071a0: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue]. ) + sel │ │ │ │ -00007210: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00007230: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00007240: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field.get_d │ │ │ │ -00007280: 625f 636f 6e76 6572 7465 7273 3c2f 7370 b_converters(conne │ │ │ │ -000072c0: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction).. def get_source │ │ │ │ -00007320: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(self │ │ │ │ -00007360: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -00007380: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -000073a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [] │ │ │ │ -000073c0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -000073e0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 set_source_exp │ │ │ │ -00007400: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ -00007410: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00007420: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, expr │ │ │ │ -00007470: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s):. assert │ │ │ │ -000074b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c not exprs │ │ │ │ -000074f0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00007510: 203c 7370 616e 2063 6c61 7373 3d22 6e66 _parse_express │ │ │ │ -00007530: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ -00007570: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00007580: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c * │ │ │ │ -000075a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000075b0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions):. │ │ │ │ -000075e0: 2020 2020 3c73 7061 6e20 636c 6173 733d return [. │ │ │ │ -00007620: 2020 2020 2020 203c 7370 616e 2063 6c61 arg. if │ │ │ │ -00007660: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c hasattr │ │ │ │ -00007680: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -000076a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -000076b0: 7267 3c2f 7370 616e 3e3c 7370 616e 2063 rg, "resolve │ │ │ │ -000076f0: 5f65 7870 7265 7373 696f 6e26 7175 6f74 _expression" │ │ │ │ -00007700: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;) │ │ │ │ -00007720: 0a20 2020 2020 2020 2020 2020 203c 7370 . els │ │ │ │ -00007740: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e (F(arg) if i │ │ │ │ -000077f0: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ -00007800: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00007810: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (arg, str< │ │ │ │ -00007860: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ -00007880: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ -00007890: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse Value │ │ │ │ -000078b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -000078d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -000078e0: 7267 3c2f 7370 616e 3e3c 7370 616e 2063 rg)). < │ │ │ │ -00007910: 7370 616e 2063 6c61 7373 3d22 6b22 3e66 span class="k">f │ │ │ │ -00007920: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or arg in │ │ │ │ -00007960: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00007970: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions. ].. def as_sql(self< │ │ │ │ -00007a10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00007a30: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00007a40: 6f6d 7069 6c65 723c 2f73 7061 6e3e 3c73 ompiler,< │ │ │ │ -00007a60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ -00007a80: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n):. ""&q │ │ │ │ -00007ae0: 756f 743b 3c2f 7370 616e 3e0a 3c73 7061 uot;. │ │ │ │ -00007b00: 2020 2020 2052 6573 706f 6e73 6962 6c65 Responsible │ │ │ │ -00007b10: 2066 6f72 2072 6574 7572 6e69 6e67 2061 for returning a │ │ │ │ -00007b20: 2028 7371 6c2c 205b 7061 7261 6d73 5d29 (sql, [params]) │ │ │ │ -00007b30: 2074 7570 6c65 2074 6f20 6265 2069 6e63 tuple to be inc │ │ │ │ -00007b40: 6c75 6465 643c 2f73 7061 6e3e 0a3c 7370 luded. │ │ │ │ -00007b60: 2020 2020 2020 696e 2074 6865 2063 7572 in the cur │ │ │ │ -00007b70: 7265 6e74 2071 7565 7279 2e3c 2f73 7061 rent query... Dif │ │ │ │ -00007ba0: 6665 7265 6e74 2062 6163 6b65 6e64 7320 ferent backends │ │ │ │ -00007bb0: 6361 6e20 7072 6f76 6964 6520 7468 6569 can provide thei │ │ │ │ -00007bc0: 7220 6f77 6e20 696d 706c 656d 656e 7461 r own implementa │ │ │ │ -00007bd0: 7469 6f6e 2c20 6279 3c2f 7370 616e 3e0a tion, by. │ │ │ │ -00007be0: 3c73 7061 6e20 636c 6173 733d 2273 6422 providi │ │ │ │ -00007c00: 6e67 2061 6e20 6061 735f 7b76 656e 646f ng an `as_{vendo │ │ │ │ -00007c10: 727d 6020 6d65 7468 6f64 2061 6e64 2070 r}` method and p │ │ │ │ -00007c20: 6174 6368 696e 6720 7468 6520 4578 7072 atching the Expr │ │ │ │ -00007c30: 6573 7369 6f6e 3a3c 2f73 7061 6e3e 0a0a ession:.. │ │ │ │ -00007c40: 3c73 7061 6e20 636c 6173 733d 2273 6422 ```. def │ │ │ │ -00007c80: 206f 7665 7272 6964 655f 6173 5f73 716c override_as_sql │ │ │ │ -00007c90: 2873 656c 662c 2063 6f6d 7069 6c65 722c (self, compiler, │ │ │ │ -00007ca0: 2063 6f6e 6e65 6374 696f 6e29 3a3c 2f73 connection):. │ │ │ │ -00007cd0: 2020 2320 6375 7374 6f6d 206c 6f67 6963 # custom logic │ │ │ │ -00007ce0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -00007d00: 2020 2020 2072 6574 7572 6e20 7375 7065 return supe │ │ │ │ -00007d10: 7228 292e 6173 5f73 716c 2863 6f6d 7069 r().as_sql(compi │ │ │ │ -00007d20: 6c65 722c 2063 6f6e 6e65 6374 696f 6e29 ler, connection) │ │ │ │ -00007d30: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -00007d50: 2073 6574 6174 7472 2845 7870 7265 7373 setattr(Express │ │ │ │ -00007d60: 696f 6e2c 2026 2333 393b 6173 5f26 2333 ion, 'as_ │ │ │ │ -00007d70: 393b 202b 2063 6f6e 6e65 6374 696f 6e2e 9; + connection. │ │ │ │ -00007d80: 7665 6e64 6f72 2c20 6f76 6572 7269 6465 vendor, override │ │ │ │ -00007d90: 5f61 735f 7371 6c29 3c2f 7370 616e 3e0a _as_sql). │ │ │ │ -00007da0: 3c73 7061 6e20 636c 6173 733d 2273 6422 ```.. Ar │ │ │ │ -00007de0: 6775 6d65 6e74 733a 3c2f 7370 616e 3e0a guments:. │ │ │ │ -00007df0: 3c73 7061 6e20 636c 6173 733d 2273 6422 * comp │ │ │ │ -00007e10: 696c 6572 3a20 7468 6520 7175 6572 7920 iler: the query │ │ │ │ -00007e20: 636f 6d70 696c 6572 2072 6573 706f 6e73 compiler respons │ │ │ │ -00007e30: 6962 6c65 2066 6f72 2067 656e 6572 6174 ible for generat │ │ │ │ -00007e40: 696e 6720 7468 6520 7175 6572 792e 3c2f ing the query.. │ │ │ │ -00007e70: 2020 4d75 7374 2068 6176 6520 6120 636f Must have a co │ │ │ │ -00007e80: 6d70 696c 6520 6d65 7468 6f64 2c20 7265 mpile method, re │ │ │ │ -00007e90: 7475 726e 696e 6720 6120 2873 716c 2c20 turning a (sql, │ │ │ │ -00007ea0: 5b70 6172 616d 735d 2920 7475 706c 652e [params]) tuple. │ │ │ │ -00007eb0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -00007ed0: 2020 2020 4361 6c6c 696e 6720 636f 6d70 Calling comp │ │ │ │ -00007ee0: 696c 6572 2876 616c 7565 2920 7769 6c6c iler(value) will │ │ │ │ -00007ef0: 2072 6574 7572 6e20 6120 7175 6f74 6564 return a quoted │ │ │ │ -00007f00: 2060 7661 6c75 6560 2e3c 2f73 7061 6e3e `value`. │ │ │ │ -00007f10: 0a0a 3c73 7061 6e20 636c 6173 733d 2273 .. * co │ │ │ │ -00007f30: 6e6e 6563 7469 6f6e 3a20 7468 6520 6461 nnection: the da │ │ │ │ -00007f40: 7461 6261 7365 2063 6f6e 6e65 6374 696f tabase connectio │ │ │ │ -00007f50: 6e20 7573 6564 2066 6f72 2074 6865 2063 n used for the c │ │ │ │ -00007f60: 7572 7265 6e74 2071 7565 7279 2e3c 2f73 urrent query... R │ │ │ │ -00007f90: 6574 7572 6e3a 2028 7371 6c2c 2070 6172 eturn: (sql, par │ │ │ │ -00007fa0: 616d 7329 3c2f 7370 616e 3e0a 3c73 7061 ams). │ │ │ │ -00007fc0: 2020 2020 2020 2057 6865 7265 2060 7371 Where `sq │ │ │ │ -00007fd0: 6c60 2069 7320 6120 7374 7269 6e67 2063 l` is a string c │ │ │ │ -00007fe0: 6f6e 7461 696e 696e 6720 6f72 6465 7265 ontaining ordere │ │ │ │ -00007ff0: 6420 7371 6c20 7061 7261 6d65 7465 7273 d sql parameters │ │ │ │ -00008000: 2074 6f20 6265 3c2f 7370 616e 3e0a 3c73 to be. │ │ │ │ -00008020: 2020 2020 2020 2020 2072 6570 6c61 6365 replace │ │ │ │ -00008030: 6420 7769 7468 2074 6865 2065 6c65 6d65 d with the eleme │ │ │ │ -00008040: 6e74 7320 6f66 2074 6865 206c 6973 7420 nts of the list │ │ │ │ -00008050: 6070 6172 616d 7360 2e3c 2f73 7061 6e3e `params`. │ │ │ │ -00008060: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . " │ │ │ │ -00008080: 2671 756f 743b 2671 756f 743b 3c2f 7370 "". rais │ │ │ │ -000080b0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e NotImp │ │ │ │ -000080d0: 6c65 6d65 6e74 6564 4572 726f 723c 2f73 lementedError(&qu │ │ │ │ -00008110: 6f74 3b53 7562 636c 6173 7365 7320 6d75 ot;Subclasses mu │ │ │ │ -00008120: 7374 2069 6d70 6c65 6d65 6e74 2061 735f st implement as_ │ │ │ │ -00008130: 7371 6c28 2926 7175 6f74 3b3c 2f73 7061 sql()").. │ │ │ │ -00008160: 3c73 7061 6e20 636c 6173 733d 226e 6422 @cached_propert │ │ │ │ -00008180: 793c 2f73 7061 6e3e 0a20 2020 203c 7370 y. def │ │ │ │ -000081a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c contain │ │ │ │ -000081c0: 735f 6167 6772 6567 6174 653c 2f73 7061 s_aggregate(self< │ │ │ │ -00008200: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00008220: 2020 2020 2020 2020 3c73 7061 6e20 636c return any(. │ │ │ │ -00008280: 2020 2020 2020 3c73 7061 6e20 636c 6173 expr and ex │ │ │ │ -000082d0: 7072 3c2f 7370 616e 3e3c 7370 616e 2063 pr.contains_aggreg │ │ │ │ -00008310: 6174 653c 2f73 7061 6e3e 203c 7370 616e ate for expr in se │ │ │ │ -00008380: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.get_source_expr │ │ │ │ -000083c0: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions() │ │ │ │ -000083e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000083f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00008400: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. @ │ │ │ │ -00008420: 6361 6368 6564 5f70 726f 7065 7274 793c cached_property< │ │ │ │ -00008430: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. def contains_ │ │ │ │ -00008470: 6f76 6572 5f63 6c61 7573 653c 2f73 7061 over_clause(self< │ │ │ │ -000084b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -000084d0: 2020 2020 2020 2020 3c73 7061 6e20 636c return any(. │ │ │ │ -00008530: 2020 2020 2020 3c73 7061 6e20 636c 6173 expr and ex │ │ │ │ -00008580: 7072 3c2f 7370 616e 3e3c 7370 616e 2063 pr.contains_over_c │ │ │ │ -000085c0: 6c61 7573 653c 2f73 7061 6e3e 203c 7370 lause for │ │ │ │ -000085e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expr in < │ │ │ │ -00008620: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00008630: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.get_source_ex │ │ │ │ -00008670: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ -00008680: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00008690: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ -000086a0: 2020 3c73 7061 6e20 636c 6173 733d 2270 ).. │ │ │ │ -000086c0: 3c73 7061 6e20 636c 6173 733d 226e 6422 @cached_propert │ │ │ │ -000086e0: 793c 2f73 7061 6e3e 0a20 2020 203c 7370 y. def │ │ │ │ -00008700: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c contain │ │ │ │ -00008720: 735f 636f 6c75 6d6e 5f72 6566 6572 656e s_column_referen │ │ │ │ -00008730: 6365 733c 2f73 7061 6e3e 3c73 7061 6e20 ces(self): │ │ │ │ -00008780: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00008790: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000087a0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return a │ │ │ │ -000087c0: 6e79 3c2f 7370 616e 3e3c 7370 616e 2063 ny(. ex │ │ │ │ -00008800: 7072 3c2f 7370 616e 3e20 3c73 7061 6e20 pr and expr.contain │ │ │ │ -00008870: 735f 636f 6c75 6d6e 5f72 6566 6572 656e s_column_referen │ │ │ │ -00008880: 6365 733c 2f73 7061 6e3e 0a20 2020 2020 ces. │ │ │ │ -00008890: 2020 2020 2020 203c 7370 616e 2063 6c61 for expr i │ │ │ │ -000088e0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self.get │ │ │ │ -00008930: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ -00008940: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(). ).. @cach │ │ │ │ -000089a0: 6564 5f70 726f 7065 7274 793c 2f73 7061 ed_property. def contains_subq │ │ │ │ -000089f0: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery(self< │ │ │ │ -00008a30: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00008a40: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00008a50: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00008a70: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00008a80: 616e 793c 2f73 7061 6e3e 3c73 7061 6e20 any(. < │ │ │ │ -00008ab0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -00008ac0: 7870 723c 2f73 7061 6e3e 203c 7370 616e xpr and< │ │ │ │ -00008ae0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ -00008b00: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00008b10: 6765 7461 7474 723c 2f73 7061 6e3e 3c73 getattr(< │ │ │ │ -00008b30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>expr, " │ │ │ │ -00008b80: 3b73 7562 7175 6572 7926 7175 6f74 3b3c ;subquery"< │ │ │ │ -00008b90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00008bb0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -00008bc0: 4661 6c73 653c 2f73 7061 6e3e 3c73 7061 False) or │ │ │ │ -00008c00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00008c10: 6578 7072 3c2f 7370 616e 3e3c 7370 616e expr.contains_subq │ │ │ │ -00008c50: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery). │ │ │ │ -00008c80: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00008c90: 666f 723c 2f73 7061 6e3e 203c 7370 616e for expr< │ │ │ │ -00008cb0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in self.< │ │ │ │ -00008d00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_source │ │ │ │ -00008d20: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(). │ │ │ │ -00008d50: 2020 2020 203c 7370 616e 2063 6c61 7373 ).. │ │ │ │ -00008d70: 2020 203c 7370 616e 2063 6c61 7373 3d22 def r │ │ │ │ -00008da0: 6573 6f6c 7665 5f65 7870 7265 7373 696f esolve_expressio │ │ │ │ -00008db0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n( │ │ │ │ -00008dd0: 0a20 2020 2020 2020 203c 7370 616e 2063 . self, qu │ │ │ │ -00008e20: 6572 793c 2f73 7061 6e3e 3c73 7061 6e20 ery=None,< │ │ │ │ -00008e70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> allow_joi │ │ │ │ -00008e90: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns=True, reuse=None< │ │ │ │ -00008f30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00008f50: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -00008f60: 756d 6d61 7269 7a65 3c2f 7370 616e 3e3c ummarize< │ │ │ │ -00008f70: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00008f80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 False, for │ │ │ │ -00008fd0: 5f73 6176 653c 2f73 7061 6e3e 3c73 7061 _save=False. ):. │ │ │ │ -00009030: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ -00009040: 2020 2020 2020 2020 3c2f 7370 616e 3e3c < │ │ │ │ -00009050: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ -00009060: 2671 756f 743b 2671 756f 743b 2671 756f ""&quo │ │ │ │ -00009070: 743b 3c2f 7370 616e 3e0a 3c73 7061 6e20 t;. │ │ │ │ -00009090: 2020 2050 726f 7669 6465 2074 6865 2063 Provide the c │ │ │ │ -000090a0: 6861 6e63 6520 746f 2064 6f20 616e 7920 hance to do any │ │ │ │ -000090b0: 7072 6570 726f 6365 7373 696e 6720 6f72 preprocessing or │ │ │ │ -000090c0: 2076 616c 6964 6174 696f 6e20 6265 666f validation befo │ │ │ │ -000090d0: 7265 2062 6569 6e67 3c2f 7370 616e 3e0a re being. │ │ │ │ -000090e0: 3c73 7061 6e20 636c 6173 733d 2273 6422 added t │ │ │ │ -00009100: 6f20 7468 6520 7175 6572 792e 3c2f 7370 o the query... Ar │ │ │ │ -00009130: 6775 6d65 6e74 733a 3c2f 7370 616e 3e0a guments:. │ │ │ │ -00009140: 3c73 7061 6e20 636c 6173 733d 2273 6422 * quer │ │ │ │ -00009160: 793a 2074 6865 2062 6163 6b65 6e64 2071 y: the backend q │ │ │ │ -00009170: 7565 7279 2069 6d70 6c65 6d65 6e74 6174 uery implementat │ │ │ │ -00009180: 696f 6e3c 2f73 7061 6e3e 0a3c 7370 616e ion. │ │ │ │ -000091a0: 2020 2020 202a 2061 6c6c 6f77 5f6a 6f69 * allow_joi │ │ │ │ -000091b0: 6e73 3a20 626f 6f6c 6561 6e20 616c 6c6f ns: boolean allo │ │ │ │ -000091c0: 7769 6e67 206f 7220 6465 6e79 696e 6720 wing or denying │ │ │ │ -000091d0: 7573 6520 6f66 206a 6f69 6e73 3c2f 7370 use of joins. │ │ │ │ -00009200: 696e 2074 6869 7320 7175 6572 793c 2f73 in this query. * │ │ │ │ -00009230: 2072 6575 7365 3a20 6120 7365 7420 6f66 reuse: a set of │ │ │ │ -00009240: 2072 6575 7361 626c 6520 6a6f 696e 7320 reusable joins │ │ │ │ -00009250: 666f 7220 6d75 6c74 696a 6f69 6e73 3c2f for multijoins. │ │ │ │ -00009280: 2a20 7375 6d6d 6172 697a 653a 2061 2074 * summarize: a t │ │ │ │ -00009290: 6572 6d69 6e61 6c20 6167 6772 6567 6174 erminal aggregat │ │ │ │ -000092a0: 6520 636c 6175 7365 3c2f 7370 616e 3e0a e clause. │ │ │ │ +00004f70: 733d 2270 223e 293c 2f73 7061 6e3e 203c s="p">) < │ │ │ │ +00004f80: 7370 616e 2063 6c61 7373 3d22 6f22 3e7c span class="o">| │ │ │ │ +00004f90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Q │ │ │ │ +00004fb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00004fc0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (other). │ │ │ │ +00005000: 2020 2020 203c 7370 616e 2063 6c61 7373 raise NotImplemente │ │ │ │ +00005040: 6445 7272 6f72 3c2f 7370 616e 3e3c 7370 dError(. │ │ │ │ +00005070: 2020 3c73 7061 6e20 636c 6173 733d 2273 "Use .bi │ │ │ │ +00005090: 7461 6e64 2829 2c20 2e62 6974 6f72 2829 tand(), .bitor() │ │ │ │ +000050a0: 2c20 616e 6420 2e62 6974 786f 7228 2920 , and .bitxor() │ │ │ │ +000050b0: 666f 7220 6269 7477 6973 6520 6c6f 6769 for bitwise logi │ │ │ │ +000050c0: 6361 6c20 6f70 6572 6174 696f 6e73 2e26 cal operations.& │ │ │ │ +000050d0: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +000050e0: 2020 2020 203c 7370 616e 2063 6c61 7373 ).. │ │ │ │ +00005100: 2020 203c 7370 616e 2063 6c61 7373 3d22 def b │ │ │ │ +00005130: 6974 6f72 3c2f 7370 616e 3e3c 7370 616e itor(self< │ │ │ │ +00005170: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00005180: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c other):. │ │ │ │ +000051c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ +00005200: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00005210: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c ._combine │ │ │ │ +00005230: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00005250: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00005260: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther, self │ │ │ │ +000052a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000052b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .BITOR, Fa │ │ │ │ +00005300: 6c73 653c 2f73 7061 6e3e 3c73 7061 6e20 lse).. def __radd__(self │ │ │ │ +00005390: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +000053b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000053c0: 6f74 6865 723c 2f73 7061 6e3e 3c73 7061 other):. re │ │ │ │ +00005400: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ +00005420: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00005440: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00005450: 5f63 6f6d 6269 6e65 3c2f 7370 616e 3e3c _combine< │ │ │ │ +00005460: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00005470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 other, sel │ │ │ │ +000054c0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000054e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000054f0: 4144 443c 2f73 7061 6e3e 3c73 7061 6e20 ADD, True< │ │ │ │ +00005530: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00005540: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00005560: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __rsub_ │ │ │ │ +00005580: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +000055a0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, other):. │ │ │ │ +00005610: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00005630: 203c 7370 616e 2063 6c61 7373 3d22 6270 self._combine(othe │ │ │ │ +000056b0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +000056d0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.SUB< │ │ │ │ +00005720: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00005730: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c True).. │ │ │ │ +00005770: 2020 3c73 7061 6e20 636c 6173 733d 226b def __ │ │ │ │ +000057a0: 726d 756c 5f5f 3c2f 7370 616e 3e3c 7370 rmul__(self, other< │ │ │ │ +00005810: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00005830: 2020 2020 2020 2020 3c73 7061 6e20 636c return self._combi │ │ │ │ +000058a0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne(other, self.MUL, Tr │ │ │ │ +00005970: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue).. def __rtruediv__< │ │ │ │ +000059d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00005a00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, other< │ │ │ │ +00005a40: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00005a50: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00005a60: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00005a80: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00005a90: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self._combine(other< │ │ │ │ +00005b00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00005b20: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00005b30: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.DIV, True).. │ │ │ │ +00005bc0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00005bd0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __rm │ │ │ │ +00005bf0: 6f64 5f5f 3c2f 7370 616e 3e3c 7370 616e od__(self< │ │ │ │ +00005c30: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00005c40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c other):. │ │ │ │ +00005c80: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ +00005cc0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00005cd0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c ._combine │ │ │ │ +00005cf0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00005d10: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00005d20: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther, self │ │ │ │ +00005d60: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00005d70: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .MOD, True │ │ │ │ +00005dc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00005de0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +00005e00: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __rpow__ │ │ │ │ +00005e20: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00005e30: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, oth │ │ │ │ +00005e80: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er):. retur │ │ │ │ +00005ec0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self._co │ │ │ │ +00005f10: 6d62 696e 653c 2f73 7061 6e3e 3c73 7061 mbine(other │ │ │ │ +00005f50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00005f60: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.POW │ │ │ │ +00005fb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00005fd0: 3c73 7061 6e20 636c 6173 733d 226b 6322 True).. def __rand__(se │ │ │ │ +00006070: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, other): │ │ │ │ +000060c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000060d0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000060e0: 7261 6973 653c 2f73 7061 6e3e 203c 7370 raise No │ │ │ │ +00006100: 7449 6d70 6c65 6d65 6e74 6564 4572 726f tImplementedErro │ │ │ │ +00006110: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +00006130: 0a20 2020 2020 2020 2020 2020 203c 7370 . &q │ │ │ │ +00006150: 756f 743b 5573 6520 2e62 6974 616e 6428 uot;Use .bitand( │ │ │ │ +00006160: 292c 202e 6269 746f 7228 292c 2061 6e64 ), .bitor(), and │ │ │ │ +00006170: 202e 6269 7478 6f72 2829 2066 6f72 2062 .bitxor() for b │ │ │ │ +00006180: 6974 7769 7365 206c 6f67 6963 616c 206f itwise logical o │ │ │ │ +00006190: 7065 7261 7469 6f6e 732e 2671 756f 743b perations." │ │ │ │ +000061a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000061b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000061c0: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ +000061e0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __ror_ │ │ │ │ +00006200: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +00006220: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, other):. │ │ │ │ +00006290: 2020 203c 7370 616e 2063 6c61 7373 3d22 raise │ │ │ │ +000062b0: 3c73 7061 6e20 636c 6173 733d 226e 6522 NotImplementedE │ │ │ │ +000062d0: 7272 6f72 3c2f 7370 616e 3e3c 7370 616e rror(. │ │ │ │ +00006300: 3c73 7061 6e20 636c 6173 733d 2273 3222 "Use .bita │ │ │ │ +00006320: 6e64 2829 2c20 2e62 6974 6f72 2829 2c20 nd(), .bitor(), │ │ │ │ +00006330: 616e 6420 2e62 6974 786f 7228 2920 666f and .bitxor() fo │ │ │ │ +00006340: 7220 6269 7477 6973 6520 6c6f 6769 6361 r bitwise logica │ │ │ │ +00006350: 6c20 6f70 6572 6174 696f 6e73 2e26 7175 l operations.&qu │ │ │ │ +00006360: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 2020 ot;. │ │ │ │ +00006370: 2020 203c 7370 616e 2063 6c61 7373 3d22 ).. │ │ │ │ +00006390: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __r │ │ │ │ +000063c0: 786f 725f 5f3c 2f73 7061 6e3e 3c73 7061 xor__(self │ │ │ │ +00006400: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00006410: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , other):. │ │ │ │ +00006450: 2020 2020 2020 203c 7370 616e 2063 6c61 raise NotImplemen │ │ │ │ +00006490: 7465 6445 7272 6f72 3c2f 7370 616e 3e3c tedError< │ │ │ │ +000064a0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000064b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000064c0: 2020 2020 3c73 7061 6e20 636c 6173 733d "Use . │ │ │ │ +000064e0: 6269 7461 6e64 2829 2c20 2e62 6974 6f72 bitand(), .bitor │ │ │ │ +000064f0: 2829 2c20 616e 6420 2e62 6974 786f 7228 (), and .bitxor( │ │ │ │ +00006500: 2920 666f 7220 6269 7477 6973 6520 6c6f ) for bitwise lo │ │ │ │ +00006510: 6769 6361 6c20 6f70 6572 6174 696f 6e73 gical operations │ │ │ │ +00006520: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 0a20 .". │ │ │ │ +00006530: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ +00006550: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +00006570: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __invert__(self< │ │ │ │ +000065c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +000065e0: 2020 2020 2020 2020 3c73 7061 6e20 636c return NegatedExp │ │ │ │ +00006620: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ +00006640: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self)...cla │ │ │ │ +00006690: 7373 3c2f 7370 616e 3e20 3c73 7061 6e20 ss BaseE │ │ │ │ +000066b0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +000066c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000066d0: 3a3c 2f73 7061 6e3e 0a3c 7370 616e 2063 :. "" │ │ │ │ +00006710: 3b26 7175 6f74 3b42 6173 6520 636c 6173 ;"Base clas │ │ │ │ +00006720: 7320 666f 7220 616c 6c20 7175 6572 7920 s for all query │ │ │ │ +00006730: 6578 7072 6573 7369 6f6e 732e 2671 756f expressions.&quo │ │ │ │ +00006740: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"".. empty │ │ │ │ +00006770: 5f72 6573 756c 745f 7365 745f 7661 6c75 _result_set_valu │ │ │ │ +00006780: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = NotImplemente │ │ │ │ +000067c0: 643c 2f73 7061 6e3e 0a20 2020 203c 7370 d. # │ │ │ │ +000067e0: 6167 6772 6567 6174 6520 7370 6563 6966 aggregate specif │ │ │ │ +000067f0: 6963 2066 6965 6c64 733c 2f73 7061 6e3e ic fields │ │ │ │ +00006800: 0a20 2020 203c 7370 616e 2063 6c61 7373 . is_summary< │ │ │ │ +00006820: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00006840: 3c73 7061 6e20 636c 6173 733d 226b 6322 False. │ │ │ │ +00006860: 2020 3c73 7061 6e20 636c 6173 733d 226e _output_field_ │ │ │ │ +00006880: 7265 736f 6c76 6564 5f74 6f5f 6e6f 6e65 resolved_to_none │ │ │ │ +00006890: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +000068b0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False. │ │ │ │ +000068d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 # Can the ex │ │ │ │ +000068f0: 7072 6573 7369 6f6e 2062 6520 7573 6564 pression be used │ │ │ │ +00006900: 2069 6e20 6120 5748 4552 4520 636c 6175 in a WHERE clau │ │ │ │ +00006910: 7365 3f3c 2f73 7061 6e3e 0a20 2020 203c se?. < │ │ │ │ +00006920: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00006930: 696c 7465 7261 626c 653c 2f73 7061 6e3e ilterable │ │ │ │ +00006940: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = True< │ │ │ │ +00006970: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. # Ca │ │ │ │ +00006990: 6e20 7468 6520 6578 7072 6573 7369 6f6e n the expression │ │ │ │ +000069a0: 2063 616e 2062 6520 7573 6564 2061 7320 can be used as │ │ │ │ +000069b0: 6120 736f 7572 6365 2065 7870 7265 7373 a source express │ │ │ │ +000069c0: 696f 6e20 696e 2057 696e 646f 773f 3c2f ion in Window?. window │ │ │ │ +000069f0: 5f63 6f6d 7061 7469 626c 653c 2f73 7061 _compatible = Fal │ │ │ │ +00006a30: 7365 3c2f 7370 616e 3e0a 0a20 2020 203c se.. < │ │ │ │ +00006a40: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +00006a50: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __ini │ │ │ │ +00006a70: 745f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 t__(self,< │ │ │ │ +00006ac0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> output_fi │ │ │ │ +00006ae0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld=None): │ │ │ │ +00006b30: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00006b40: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00006b50: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if output │ │ │ │ +00006b70: 5f66 6965 6c64 3c2f 7370 616e 3e20 3c73 _field i │ │ │ │ +00006b90: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s not None:. │ │ │ │ +00006bf0: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.output │ │ │ │ +00006c40: 5f66 6965 6c64 3c2f 7370 616e 3e20 3c73 _field =< │ │ │ │ +00006c60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> output_fi │ │ │ │ +00006c80: 656c 643c 2f73 7061 6e3e 0a0a 2020 2020 eld.. │ │ │ │ +00006c90: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00006ca0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __ge │ │ │ │ +00006cc0: 7473 7461 7465 5f5f 3c2f 7370 616e 3e3c tstate__< │ │ │ │ +00006cd0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00006ce0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ +00006d20: 2020 2020 203c 7370 616e 2063 6c61 7373 state = self │ │ │ │ +00006d70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00006d90: 7370 616e 2063 6c61 7373 3d22 766d 223e span class="vm"> │ │ │ │ +00006da0: 5f5f 6469 6374 5f5f 3c2f 7370 616e 3e3c __dict__< │ │ │ │ +00006db0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00006dc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 copy(). │ │ │ │ +00006e00: 2020 2020 3c73 7061 6e20 636c 6173 733d state │ │ │ │ +00006e20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00006e30: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .pop(" │ │ │ │ +00006e80: 3b63 6f6e 7665 7274 5f76 616c 7565 2671 ;convert_value&q │ │ │ │ +00006e90: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;, None │ │ │ │ +00006ed0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00006ee0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00006ef0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00006f10: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00006f20: 7461 7465 3c2f 7370 616e 3e0a 0a20 2020 tate.. │ │ │ │ +00006f30: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ +00006f60: 5f64 625f 636f 6e76 6572 7465 7273 3c2f _db_converters(se │ │ │ │ +00006fa0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, connection):. │ │ │ │ +00007000: 2020 2020 203c 7370 616e 2063 6c61 7373 return (. │ │ │ │ +00007040: 2020 2020 2020 2020 3c73 7061 6e20 636c []. if │ │ │ │ +00007080: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.conv │ │ │ │ +000070d0: 6572 745f 7661 6c75 653c 2f73 7061 6e3e ert_value │ │ │ │ +000070e0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 is sel │ │ │ │ +00007110: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00007130: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00007140: 5f63 6f6e 7665 7274 5f76 616c 7565 5f6e _convert_value_n │ │ │ │ +00007150: 6f6f 703c 2f73 7061 6e3e 0a20 2020 2020 oop. │ │ │ │ +00007160: 2020 2020 2020 203c 7370 616e 2063 6c61 else [self │ │ │ │ +000071b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000071d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +000071e0: 6f6e 7665 7274 5f76 616c 7565 3c2f 7370 onvert_value]. │ │ │ │ +00007210: 2020 2020 3c73 7061 6e20 636c 6173 733d ) + self.output │ │ │ │ +00007290: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field.get_db_conv │ │ │ │ +000072d0: 6572 7465 7273 3c2f 7370 616e 3e3c 7370 erters(connection< │ │ │ │ +00007310: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ +00007330: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00007350: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00007360: 6765 745f 736f 7572 6365 5f65 7870 7265 get_source_expre │ │ │ │ +00007370: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions(self):. │ │ │ │ +000073d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +000073f0: 203c 7370 616e 2063 6c61 7373 3d22 7022 [].. │ │ │ │ +00007410: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00007420: 6465 663c 2f73 7061 6e3e 203c 7370 616e def set_ │ │ │ │ +00007440: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ +00007450: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns(self, exprs):. │ │ │ │ +000074e0: 2020 2020 3c73 7061 6e20 636c 6173 733d assert not ex │ │ │ │ +00007530: 7072 733c 2f73 7061 6e3e 0a0a 2020 2020 prs.. │ │ │ │ +00007540: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00007550: 6465 663c 2f73 7061 6e3e 203c 7370 616e def _par │ │ │ │ +00007570: 7365 5f65 7870 7265 7373 696f 6e73 3c2f se_expressions(se │ │ │ │ +000075b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, *expres │ │ │ │ +00007600: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions):. re │ │ │ │ +00007640: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn [. │ │ │ │ +00007670: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arg. │ │ │ │ +00007690: 2020 2020 2020 2020 3c73 7061 6e20 636c if hasattr(arg, &qu │ │ │ │ +00007730: 6f74 3b72 6573 6f6c 7665 5f65 7870 7265 ot;resolve_expre │ │ │ │ +00007740: 7373 696f 6e26 7175 6f74 3b3c 2f73 7061 ssion"). │ │ │ │ +00007770: 2020 2020 2020 203c 7370 616e 2063 6c61 else (F(arg) if │ │ │ │ +00007820: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ +00007840: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(arg, str │ │ │ │ +000078b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000078c0: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) else Value(arg)). │ │ │ │ +00007950: 2020 2020 2020 2020 203c 7370 616e 2063 for arg < │ │ │ │ +00007990: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +000079a0: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in expres │ │ │ │ +000079c0: 7369 6f6e 733c 2f73 7061 6e3e 0a20 2020 sions. │ │ │ │ +000079d0: 2020 2020 203c 7370 616e 2063 6c61 7373 ].. │ │ │ │ +000079f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def a │ │ │ │ +00007a20: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(self │ │ │ │ +00007a60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00007a70: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ +00007a90: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00007ab0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection):. │ │ │ │ +00007b00: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +00007b20: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". R │ │ │ │ +00007b50: 6573 706f 6e73 6962 6c65 2066 6f72 2072 esponsible for r │ │ │ │ +00007b60: 6574 7572 6e69 6e67 2061 2028 7371 6c2c eturning a (sql, │ │ │ │ +00007b70: 205b 7061 7261 6d73 5d29 2074 7570 6c65 [params]) tuple │ │ │ │ +00007b80: 2074 6f20 6265 2069 6e63 6c75 6465 643c to be included< │ │ │ │ +00007b90: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ +00007bb0: 696e 2074 6865 2063 7572 7265 6e74 2071 in the current q │ │ │ │ +00007bc0: 7565 7279 2e3c 2f73 7061 6e3e 0a0a 3c73 uery... │ │ │ │ +00007be0: 2020 2020 2020 2044 6966 6665 7265 6e74 Different │ │ │ │ +00007bf0: 2062 6163 6b65 6e64 7320 6361 6e20 7072 backends can pr │ │ │ │ +00007c00: 6f76 6964 6520 7468 6569 7220 6f77 6e20 ovide their own │ │ │ │ +00007c10: 696d 706c 656d 656e 7461 7469 6f6e 2c20 implementation, │ │ │ │ +00007c20: 6279 3c2f 7370 616e 3e0a 3c73 7061 6e20 by. │ │ │ │ +00007c40: 2020 2070 726f 7669 6469 6e67 2061 6e20 providing an │ │ │ │ +00007c50: 6061 735f 7b76 656e 646f 727d 6020 6d65 `as_{vendor}` me │ │ │ │ +00007c60: 7468 6f64 2061 6e64 2070 6174 6368 696e thod and patchin │ │ │ │ +00007c70: 6720 7468 6520 4578 7072 6573 7369 6f6e g the Expression │ │ │ │ +00007c80: 3a3c 2f73 7061 6e3e 0a0a 3c73 7061 6e20 :.. │ │ │ │ +00007ca0: 2020 2060 6060 3c2f 7370 616e 3e0a 3c73 ```. │ │ │ │ +00007cc0: 2020 2020 2020 2064 6566 206f 7665 7272 def overr │ │ │ │ +00007cd0: 6964 655f 6173 5f73 716c 2873 656c 662c ide_as_sql(self, │ │ │ │ +00007ce0: 2063 6f6d 7069 6c65 722c 2063 6f6e 6e65 compiler, conne │ │ │ │ +00007cf0: 6374 696f 6e29 3a3c 2f73 7061 6e3e 0a3c ction):.< │ │ │ │ +00007d00: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00007d10: 2020 2020 2020 2020 2020 2020 2320 6375 # cu │ │ │ │ +00007d20: 7374 6f6d 206c 6f67 6963 3c2f 7370 616e stom logic. r │ │ │ │ +00007d50: 6574 7572 6e20 7375 7065 7228 292e 6173 eturn super().as │ │ │ │ +00007d60: 5f73 716c 2863 6f6d 7069 6c65 722c 2063 _sql(compiler, c │ │ │ │ +00007d70: 6f6e 6e65 6374 696f 6e29 3c2f 7370 616e onnection). setat │ │ │ │ +00007da0: 7472 2845 7870 7265 7373 696f 6e2c 2026 tr(Expression, & │ │ │ │ +00007db0: 2333 393b 6173 5f26 2333 393b 202b 2063 #39;as_' + c │ │ │ │ +00007dc0: 6f6e 6e65 6374 696f 6e2e 7665 6e64 6f72 onnection.vendor │ │ │ │ +00007dd0: 2c20 6f76 6572 7269 6465 5f61 735f 7371 , override_as_sq │ │ │ │ +00007de0: 6c29 3c2f 7370 616e 3e0a 3c73 7061 6e20 l). │ │ │ │ +00007e00: 2020 2060 6060 3c2f 7370 616e 3e0a 0a3c ```..< │ │ │ │ +00007e10: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00007e20: 2020 2020 2020 2020 4172 6775 6d65 6e74 Argument │ │ │ │ +00007e30: 733a 3c2f 7370 616e 3e0a 3c73 7061 6e20 s:. │ │ │ │ +00007e50: 2020 2020 2a20 636f 6d70 696c 6572 3a20 * compiler: │ │ │ │ +00007e60: 7468 6520 7175 6572 7920 636f 6d70 696c the query compil │ │ │ │ +00007e70: 6572 2072 6573 706f 6e73 6962 6c65 2066 er responsible f │ │ │ │ +00007e80: 6f72 2067 656e 6572 6174 696e 6720 7468 or generating th │ │ │ │ +00007e90: 6520 7175 6572 792e 3c2f 7370 616e 3e0a e query.. │ │ │ │ +00007ea0: 3c73 7061 6e20 636c 6173 733d 2273 6422 Must │ │ │ │ +00007ec0: 2068 6176 6520 6120 636f 6d70 696c 6520 have a compile │ │ │ │ +00007ed0: 6d65 7468 6f64 2c20 7265 7475 726e 696e method, returnin │ │ │ │ +00007ee0: 6720 6120 2873 716c 2c20 5b70 6172 616d g a (sql, [param │ │ │ │ +00007ef0: 735d 2920 7475 706c 652e 3c2f 7370 616e s]) tuple.. Ca │ │ │ │ +00007f20: 6c6c 696e 6720 636f 6d70 696c 6572 2876 lling compiler(v │ │ │ │ +00007f30: 616c 7565 2920 7769 6c6c 2072 6574 7572 alue) will retur │ │ │ │ +00007f40: 6e20 6120 7175 6f74 6564 2060 7661 6c75 n a quoted `valu │ │ │ │ +00007f50: 6560 2e3c 2f73 7061 6e3e 0a0a 3c73 7061 e`... │ │ │ │ +00007f70: 2020 2020 2020 2a20 636f 6e6e 6563 7469 * connecti │ │ │ │ +00007f80: 6f6e 3a20 7468 6520 6461 7461 6261 7365 on: the database │ │ │ │ +00007f90: 2063 6f6e 6e65 6374 696f 6e20 7573 6564 connection used │ │ │ │ +00007fa0: 2066 6f72 2074 6865 2063 7572 7265 6e74 for the current │ │ │ │ +00007fb0: 2071 7565 7279 2e3c 2f73 7061 6e3e 0a0a query... │ │ │ │ +00007fc0: 3c73 7061 6e20 636c 6173 733d 2273 6422 Return: │ │ │ │ +00007fe0: 2028 7371 6c2c 2070 6172 616d 7329 3c2f (sql, params). │ │ │ │ +00008010: 2057 6865 7265 2060 7371 6c60 2069 7320 Where `sql` is │ │ │ │ +00008020: 6120 7374 7269 6e67 2063 6f6e 7461 696e a string contain │ │ │ │ +00008030: 696e 6720 6f72 6465 7265 6420 7371 6c20 ing ordered sql │ │ │ │ +00008040: 7061 7261 6d65 7465 7273 2074 6f20 6265 parameters to be │ │ │ │ +00008050: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ +00008070: 2020 2072 6570 6c61 6365 6420 7769 7468 replaced with │ │ │ │ +00008080: 2074 6865 2065 6c65 6d65 6e74 7320 6f66 the elements of │ │ │ │ +00008090: 2074 6865 206c 6973 7420 6070 6172 616d the list `param │ │ │ │ +000080a0: 7360 2e3c 2f73 7061 6e3e 0a3c 7370 616e s`.. │ │ │ │ +000080c0: 2020 2020 2671 756f 743b 2671 756f 743b "" │ │ │ │ +000080d0: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ +000080e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 raise NotImplement │ │ │ │ +00008120: 6564 4572 726f 723c 2f73 7061 6e3e 3c73 edError(< │ │ │ │ +00008140: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"Sub │ │ │ │ +00008160: 636c 6173 7365 7320 6d75 7374 2069 6d70 classes must imp │ │ │ │ +00008170: 6c65 6d65 6e74 2061 735f 7371 6c28 2926 lement as_sql()& │ │ │ │ +00008180: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;).. @cach │ │ │ │ +000081c0: 6564 5f70 726f 7065 7274 793c 2f73 7061 ed_property. def contains_aggr │ │ │ │ +00008210: 6567 6174 653c 2f73 7061 6e3e 3c73 7061 egate(self │ │ │ │ +00008250: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00008260: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00008270: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00008290: 3c73 7061 6e20 636c 6173 733d 226e 6222 any(. │ │ │ │ +000082d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000082e0: 6578 7072 3c2f 7370 616e 3e20 3c73 7061 expr and │ │ │ │ +00008300: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expr.conta │ │ │ │ +00008350: 696e 735f 6167 6772 6567 6174 653c 2f73 ins_aggregate for │ │ │ │ +00008380: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008390: 6578 7072 3c2f 7370 616e 3e20 3c73 7061 expr in< │ │ │ │ +000083b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.get_s │ │ │ │ +00008400: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +00008410: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s(). ).. @cached │ │ │ │ +00008470: 5f70 726f 7065 7274 793c 2f73 7061 6e3e _property │ │ │ │ +00008480: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +000084a0: 3c73 7061 6e20 636c 6173 733d 226e 6622 contains_over_c │ │ │ │ +000084c0: 6c61 7573 653c 2f73 7061 6e3e 3c73 7061 lause(self │ │ │ │ +00008500: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00008510: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00008520: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00008540: 3c73 7061 6e20 636c 6173 733d 226e 6222 any(. │ │ │ │ +00008580: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008590: 6578 7072 3c2f 7370 616e 3e20 3c73 7061 expr and │ │ │ │ +000085b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expr.conta │ │ │ │ +00008600: 696e 735f 6f76 6572 5f63 6c61 7573 653c ins_over_clause< │ │ │ │ +00008610: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> for expr i │ │ │ │ +00008660: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self.get │ │ │ │ +000086b0: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ +000086c0: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(). ).. @cach │ │ │ │ +00008720: 6564 5f70 726f 7065 7274 793c 2f73 7061 ed_property. def contains_colu │ │ │ │ +00008770: 6d6e 5f72 6566 6572 656e 6365 733c 2f73 mn_references(sel │ │ │ │ +000087b0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ +000087f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c any(. │ │ │ │ +00008830: 2020 2020 2020 2020 3c73 7061 6e20 636c expr and │ │ │ │ +00008870: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008880: 6578 7072 3c2f 7370 616e 3e3c 7370 616e expr.contains_colu │ │ │ │ +000088c0: 6d6e 5f72 6566 6572 656e 6365 733c 2f73 mn_references. │ │ │ │ +000088e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 for expr │ │ │ │ +00008910: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c in self< │ │ │ │ +00008950: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00008960: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_sourc │ │ │ │ +00008980: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions(). │ │ │ │ +000089b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ).. │ │ │ │ +000089d0: 2020 2020 3c73 7061 6e20 636c 6173 733d @cached_pro │ │ │ │ +000089f0: 7065 7274 793c 2f73 7061 6e3e 0a20 2020 perty. │ │ │ │ +00008a00: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def con │ │ │ │ +00008a30: 7461 696e 735f 7375 6271 7565 7279 3c2f tains_subquery(se │ │ │ │ +00008a70: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ +00008ab0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n any(. │ │ │ │ +00008af0: 2020 2020 2020 2020 203c 7370 616e 2063 expr and │ │ │ │ +00008b30: 203c 7370 616e 2063 6c61 7373 3d22 7022 (getatt │ │ │ │ +00008b60: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +00008b80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008b90: 6578 7072 3c2f 7370 616e 3e3c 7370 616e expr, "subqu │ │ │ │ +00008bd0: 6572 7926 7175 6f74 3b3c 2f73 7061 6e3e ery" │ │ │ │ +00008be0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00008bf0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , False< │ │ │ │ +00008c10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ +00008c30: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +00008c40: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or expr.con │ │ │ │ +00008c90: 7461 696e 735f 7375 6271 7565 7279 3c2f tains_subquery). │ │ │ │ +00008cc0: 2020 2020 2020 2020 2020 3c73 7061 6e20 for expr │ │ │ │ +00008d00: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in sel │ │ │ │ +00008d30: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00008d50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008d60: 6765 745f 736f 7572 6365 5f65 7870 7265 get_source_expre │ │ │ │ +00008d70: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions()< │ │ │ │ +00008d90: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00008da0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00008db0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00008dd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c resolve │ │ │ │ +00008df0: 5f65 7870 7265 7373 696f 6e3c 2f73 7061 _expression(. │ │ │ │ +00008e20: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +00008e40: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00008e50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c query=Non │ │ │ │ +00008ea0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +00008ec0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 allow_joins=True │ │ │ │ +00008f10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00008f30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00008f40: 7265 7573 653c 2f73 7061 6e3e 3c73 7061 reuse=None │ │ │ │ +00008f80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00008f90: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , summari │ │ │ │ +00008fb0: 7a65 3c2f 7370 616e 3e3c 7370 616e 2063 ze=False,< │ │ │ │ +00009000: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> for_save< │ │ │ │ +00009020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=F │ │ │ │ +00009050: 616c 7365 3c2f 7370 616e 3e0a 2020 2020 alse. │ │ │ │ +00009060: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00009070: 293a 3c2f 7370 616e 3e0a 3c73 7061 6e20 ):. │ │ │ │ +00009090: 2020 3c2f 7370 616e 3e3c 7370 616e 2063 " │ │ │ │ +000090b0: 2671 756f 743b 2671 756f 743b 3c2f 7370 "". Pro │ │ │ │ +000090e0: 7669 6465 2074 6865 2063 6861 6e63 6520 vide the chance │ │ │ │ +000090f0: 746f 2064 6f20 616e 7920 7072 6570 726f to do any prepro │ │ │ │ +00009100: 6365 7373 696e 6720 6f72 2076 616c 6964 cessing or valid │ │ │ │ +00009110: 6174 696f 6e20 6265 666f 7265 2062 6569 ation before bei │ │ │ │ +00009120: 6e67 3c2f 7370 616e 3e0a 3c73 7061 6e20 ng. │ │ │ │ +00009140: 2020 2061 6464 6564 2074 6f20 7468 6520 added to the │ │ │ │ +00009150: 7175 6572 792e 3c2f 7370 616e 3e0a 0a3c query...< │ │ │ │ +00009160: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00009170: 2020 2020 2020 2020 4172 6775 6d65 6e74 Argument │ │ │ │ +00009180: 733a 3c2f 7370 616e 3e0a 3c73 7061 6e20 s:. │ │ │ │ +000091a0: 2020 2020 2a20 7175 6572 793a 2074 6865 * query: the │ │ │ │ +000091b0: 2062 6163 6b65 6e64 2071 7565 7279 2069 backend query i │ │ │ │ +000091c0: 6d70 6c65 6d65 6e74 6174 696f 6e3c 2f73 mplementation. * │ │ │ │ +000091f0: 2061 6c6c 6f77 5f6a 6f69 6e73 3a20 626f allow_joins: bo │ │ │ │ +00009200: 6f6c 6561 6e20 616c 6c6f 7769 6e67 206f olean allowing o │ │ │ │ +00009210: 7220 6465 6e79 696e 6720 7573 6520 6f66 r denying use of │ │ │ │ +00009220: 206a 6f69 6e73 3c2f 7370 616e 3e0a 3c73 joins. │ │ │ │ +00009240: 2020 2020 2020 2020 2020 696e 2074 6869 in thi │ │ │ │ +00009250: 7320 7175 6572 793c 2f73 7061 6e3e 0a3c s query.< │ │ │ │ +00009260: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00009270: 2020 2020 2020 2020 202a 2072 6575 7365 * reuse │ │ │ │ +00009280: 3a20 6120 7365 7420 6f66 2072 6575 7361 : a set of reusa │ │ │ │ +00009290: 626c 6520 6a6f 696e 7320 666f 7220 6d75 ble joins for mu │ │ │ │ +000092a0: 6c74 696a 6f69 6e73 3c2f 7370 616e 3e0a ltijoins. │ │ │ │ 000092b0: 3c73 7061 6e20 636c 6173 733d 2273 6422 * for_ │ │ │ │ -000092d0: 7361 7665 3a20 7768 6574 6865 7220 7468 save: whether th │ │ │ │ -000092e0: 6973 2065 7870 7265 7373 696f 6e20 6162 is expression ab │ │ │ │ -000092f0: 6f75 7420 746f 2062 6520 7573 6564 2069 out to be used i │ │ │ │ -00009300: 6e20 6120 7361 7665 206f 7220 7570 6461 n a save or upda │ │ │ │ -00009310: 7465 3c2f 7370 616e 3e0a 0a3c 7370 616e te.. │ │ │ │ -00009330: 2020 2020 5265 7475 726e 3a20 616e 2045 Return: an E │ │ │ │ -00009340: 7870 7265 7373 696f 6e20 746f 2062 6520 xpression to be │ │ │ │ -00009350: 6164 6465 6420 746f 2074 6865 2071 7565 added to the que │ │ │ │ -00009360: 7279 2e3c 2f73 7061 6e3e 0a3c 7370 616e ry.. │ │ │ │ -00009380: 2020 2020 2671 756f 743b 2671 756f 743b "" │ │ │ │ -00009390: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ -000093a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 c < │ │ │ │ -000093c0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -000093d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.copy │ │ │ │ -00009420: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ -00009440: 0a20 2020 2020 2020 203c 7370 616e 2063 . c.is_summ │ │ │ │ -00009490: 6172 793c 2f73 7061 6e3e 203c 7370 616e ary = summarize. c.set │ │ │ │ -00009520: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ -00009530: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(. < │ │ │ │ -00009560: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ -00009570: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00009580: 2020 2020 2020 2020 3c73 7061 6e20 636c expr.resol │ │ │ │ -000095d0: 7665 5f65 7870 7265 7373 696f 6e3c 2f73 ve_expression(quer │ │ │ │ -00009610: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y, │ │ │ │ -00009630: 203c 7370 616e 2063 6c61 7373 3d22 6e22 allow_joins, reus │ │ │ │ -00009680: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -000096a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 summarize). │ │ │ │ -000096e0: 2020 2020 2020 2020 2020 3c73 7061 6e20 if expr. │ │ │ │ -00009720: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00009730: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00009740: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else Non │ │ │ │ -00009760: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ -00009770: 2020 2020 2020 2020 203c 7370 616e 2063 for expr │ │ │ │ -000097b0: 3c73 7061 6e20 636c 6173 733d 226f 7722 in c.get_s │ │ │ │ -00009810: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ -00009820: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s(). ]< │ │ │ │ -00009860: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00009870: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00009880: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00009890: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000098a0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return c< │ │ │ │ -000098c0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. @pr │ │ │ │ -000098e0: 6f70 6572 7479 3c2f 7370 616e 3e0a 2020 operty. │ │ │ │ -000098f0: 2020 3c73 7061 6e20 636c 6173 733d 226b def co │ │ │ │ -00009920: 6e64 6974 696f 6e61 6c3c 2f73 7061 6e3e nditional │ │ │ │ -00009930: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00009940: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -00009980: 2020 2020 2020 3c73 7061 6e20 636c 6173 return isinstance< │ │ │ │ -000099c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000099f0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.output_field, fi │ │ │ │ -00009a60: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.BooleanField< │ │ │ │ -00009aa0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ -00009ac0: 2020 2020 3c73 7061 6e20 636c 6173 733d @property. def field(self< │ │ │ │ -00009b50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00009b70: 2020 2020 2020 2020 3c73 7061 6e20 636c return self.output │ │ │ │ -00009be0: 5f66 6965 6c64 3c2f 7370 616e 3e0a 0a20 _field.. │ │ │ │ -00009bf0: 2020 203c 7370 616e 2063 6c61 7373 3d22 @cached_prop │ │ │ │ -00009c10: 6572 7479 3c2f 7370 616e 3e0a 2020 2020 erty. │ │ │ │ -00009c20: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00009c30: 6465 663c 2f73 7061 6e3e 203c 7370 616e def outp │ │ │ │ -00009c50: 7574 5f66 6965 6c64 3c2f 7370 616e 3e3c ut_field< │ │ │ │ -00009c60: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00009c70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -00009cc0: 2020 2020 203c 2f73 7061 6e3e 3c73 7061 &qu │ │ │ │ -00009ce0: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b52 ot;""R │ │ │ │ -00009cf0: 6574 7572 6e20 7468 6520 6f75 7470 7574 eturn the output │ │ │ │ -00009d00: 2074 7970 6520 6f66 2074 6869 7320 6578 type of this ex │ │ │ │ -00009d10: 7072 6573 7369 6f6e 732e 2671 756f 743b pressions." │ │ │ │ -00009d20: 2671 756f 743b 2671 756f 743b 3c2f 7370 "". outp │ │ │ │ -00009d50: 7574 5f66 6965 6c64 3c2f 7370 616e 3e20 ut_field │ │ │ │ -00009d60: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00009d70: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self._re │ │ │ │ -00009dc0: 736f 6c76 655f 6f75 7470 7574 5f66 6965 solve_output_fie │ │ │ │ -00009dd0: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld(). if output_fiel │ │ │ │ -00009e30: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d is None │ │ │ │ -00009e70: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00009e80: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00009e90: 2020 2020 203c 7370 616e 2063 6c61 7373 self._output │ │ │ │ -00009ee0: 5f66 6965 6c64 5f72 6573 6f6c 7665 645f _field_resolved_ │ │ │ │ -00009ef0: 746f 5f6e 6f6e 653c 2f73 7061 6e3e 203c to_none < │ │ │ │ -00009f00: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00009f10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c True. │ │ │ │ -00009f40: 203c 7370 616e 2063 6c61 7373 3d22 6b22 raise Fi │ │ │ │ -00009f70: 656c 6445 7272 6f72 3c2f 7370 616e 3e3c eldError< │ │ │ │ -00009f80: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00009f90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "Ca │ │ │ │ -00009fb0: 6e6e 6f74 2072 6573 6f6c 7665 2065 7870 nnot resolve exp │ │ │ │ -00009fc0: 7265 7373 696f 6e20 7479 7065 2c20 756e ression type, un │ │ │ │ -00009fd0: 6b6e 6f77 6e20 6f75 7470 7574 5f66 6965 known output_fie │ │ │ │ -00009fe0: 6c64 2671 756f 743b 3c2f 7370 616e 3e3c ld"< │ │ │ │ -00009ff0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0000a000: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000a010: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0000a020: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return ou │ │ │ │ -0000a040: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field.. @cached_ │ │ │ │ -0000a070: 7072 6f70 6572 7479 3c2f 7370 616e 3e0a property. │ │ │ │ -0000a080: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0000a0a0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -0000a0b0: 5f6f 7574 7075 745f 6669 656c 645f 6f72 _output_field_or │ │ │ │ -0000a0c0: 5f6e 6f6e 653c 2f73 7061 6e3e 3c73 7061 _none(self │ │ │ │ -0000a100: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000a110: 293a 3c2f 7370 616e 3e0a 3c73 7061 6e20 ):. │ │ │ │ -0000a130: 2020 3c2f 7370 616e 3e3c 7370 616e 2063 " │ │ │ │ -0000a150: 2671 756f 743b 2671 756f 743b 3c2f 7370 "" * summ │ │ │ │ +000092d0: 6172 697a 653a 2061 2074 6572 6d69 6e61 arize: a termina │ │ │ │ +000092e0: 6c20 6167 6772 6567 6174 6520 636c 6175 l aggregate clau │ │ │ │ +000092f0: 7365 3c2f 7370 616e 3e0a 3c73 7061 6e20 se. │ │ │ │ +00009310: 2020 2020 2a20 666f 725f 7361 7665 3a20 * for_save: │ │ │ │ +00009320: 7768 6574 6865 7220 7468 6973 2065 7870 whether this exp │ │ │ │ +00009330: 7265 7373 696f 6e20 6162 6f75 7420 746f ression about to │ │ │ │ +00009340: 2062 6520 7573 6564 2069 6e20 6120 7361 be used in a sa │ │ │ │ +00009350: 7665 206f 7220 7570 6461 7465 3c2f 7370 ve or update.. Re │ │ │ │ +00009380: 7475 726e 3a20 616e 2045 7870 7265 7373 turn: an Express │ │ │ │ +00009390: 696f 6e20 746f 2062 6520 6164 6465 6420 ion to be added │ │ │ │ +000093a0: 746f 2074 6865 2071 7565 7279 2e3c 2f73 to the query.. &q │ │ │ │ +000093d0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ +000093e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000093f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00009400: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c = self.< │ │ │ │ +00009450: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>copy(). │ │ │ │ +00009490: 2020 203c 7370 616e 2063 6c61 7373 3d22 c.is_summary = su │ │ │ │ +00009510: 6d6d 6172 697a 653c 2f73 7061 6e3e 0a20 mmarize. │ │ │ │ +00009520: 2020 2020 2020 203c 7370 616e 2063 6c61 c< │ │ │ │ +00009540: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00009550: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 set_sourc │ │ │ │ +00009570: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions(. │ │ │ │ +000095a0: 2020 2020 2020 2020 203c 7370 616e 2063 [. │ │ │ │ +000095d0: 2020 3c73 7061 6e20 636c 6173 733d 226e expr.resolve_exp │ │ │ │ +00009620: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ +00009640: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>query, allow │ │ │ │ +00009690: 5f6a 6f69 6e73 3c2f 7370 616e 3e3c 7370 _joins, reuse, summa │ │ │ │ +00009700: 7269 7a65 3c2f 7370 616e 3e3c 7370 616e rize). │ │ │ │ +00009730: 2020 2020 3c73 7061 6e20 636c 6173 733d if ex │ │ │ │ +00009760: 7072 3c2f 7370 616e 3e0a 2020 2020 2020 pr. │ │ │ │ +00009770: 2020 2020 2020 2020 2020 3c73 7061 6e20 else None. │ │ │ │ +000097c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for ex │ │ │ │ +000097f0: 7072 3c2f 7370 616e 3e20 3c73 7061 6e20 pr in c.get_source_ │ │ │ │ +00009860: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(). │ │ │ │ +00009890: 2020 2020 2020 2020 3c73 7061 6e20 636c ] │ │ │ │ +000098b0: 0a20 2020 2020 2020 203c 7370 616e 2063 . ). return │ │ │ │ +000098f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c c │ │ │ │ +00009910: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. @property │ │ │ │ +00009930: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . def< │ │ │ │ +00009950: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> conditio │ │ │ │ +00009970: 6e61 6c3c 2f73 7061 6e3e 3c73 7061 6e20 nal(self): │ │ │ │ +000099c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000099d0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000099e0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return i │ │ │ │ +00009a00: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ +00009a10: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00009a20: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.outp │ │ │ │ +00009a70: 7574 5f66 6965 6c64 3c2f 7370 616e 3e3c ut_field< │ │ │ │ +00009a80: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00009a90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Boo │ │ │ │ +00009ae0: 6c65 616e 4669 656c 643c 2f73 7061 6e3e leanField │ │ │ │ +00009af0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00009b00: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. @ │ │ │ │ +00009b20: 7072 6f70 6572 7479 3c2f 7370 616e 3e0a property. │ │ │ │ +00009b30: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00009b50: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00009b60: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field(self │ │ │ │ +00009ba0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00009bb0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00009bc0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00009be0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.output_field │ │ │ │ +00009c30: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. @c │ │ │ │ +00009c50: 6163 6865 645f 7072 6f70 6572 7479 3c2f ached_property. def output_fie │ │ │ │ +00009ca0: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld(self):< │ │ │ │ +00009cf0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. < │ │ │ │ +00009d10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ +00009d30: 6f74 3b26 7175 6f74 3b52 6574 7572 6e20 ot;"Return │ │ │ │ +00009d40: 7468 6520 6f75 7470 7574 2074 7970 6520 the output type │ │ │ │ +00009d50: 6f66 2074 6869 7320 6578 7072 6573 7369 of this expressi │ │ │ │ +00009d60: 6f6e 732e 2671 756f 743b 2671 756f 743b ons."" │ │ │ │ +00009d70: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ +00009d80: 2020 2020 2020 3c73 7061 6e20 636c 6173 output_fie │ │ │ │ +00009da0: 6c64 3c2f 7370 616e 3e20 3c73 7061 6e20 ld = self< │ │ │ │ +00009de0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00009df0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 _resolve_ │ │ │ │ +00009e10: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field(). │ │ │ │ +00009e40: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +00009e60: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00009e70: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field is N │ │ │ │ +00009eb0: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one:. < │ │ │ │ +00009ee0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00009ef0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self._output_field │ │ │ │ +00009f30: 5f72 6573 6f6c 7665 645f 746f 5f6e 6f6e _resolved_to_non │ │ │ │ +00009f40: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = True. │ │ │ │ +00009f80: 2020 2020 2020 2020 2020 203c 7370 616e raise │ │ │ │ +00009fa0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c FieldErr │ │ │ │ +00009fc0: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063 or("Cannot r │ │ │ │ +0000a000: 6573 6f6c 7665 2065 7870 7265 7373 696f esolve expressio │ │ │ │ +0000a010: 6e20 7479 7065 2c20 756e 6b6e 6f77 6e20 n type, unknown │ │ │ │ +0000a020: 6f75 7470 7574 5f66 6965 6c64 2671 756f output_field&quo │ │ │ │ +0000a030: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;). return │ │ │ │ +0000a070: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c output_f │ │ │ │ +0000a090: 6965 6c64 3c2f 7370 616e 3e0a 0a20 2020 ield.. │ │ │ │ +0000a0a0: 203c 7370 616e 2063 6c61 7373 3d22 6e64 @cached_proper │ │ │ │ +0000a0c0: 7479 3c2f 7370 616e 3e0a 2020 2020 3c73 ty. de │ │ │ │ +0000a0e0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f _outpu │ │ │ │ +0000a100: 745f 6669 656c 645f 6f72 5f6e 6f6e 653c t_field_or_none< │ │ │ │ +0000a110: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +0000a140: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. Ret │ │ │ │ -0000a180: 7572 6e20 7468 6520 6f75 7470 7574 2066 urn the output f │ │ │ │ -0000a190: 6965 6c64 206f 6620 7468 6973 2065 7870 ield of this exp │ │ │ │ -0000a1a0: 7265 7373 696f 6e2c 206f 7220 4e6f 6e65 ression, or None │ │ │ │ -0000a1b0: 2069 663c 2f73 7061 6e3e 0a3c 7370 616e if. │ │ │ │ -0000a1d0: 2020 2020 5f72 6573 6f6c 7665 5f6f 7574 _resolve_out │ │ │ │ -0000a1e0: 7075 745f 6669 656c 6428 2920 6469 646e put_field() didn │ │ │ │ -0000a1f0: 2623 3339 3b74 2072 6574 7572 6e20 616e 't return an │ │ │ │ -0000a200: 206f 7574 7075 7420 7479 7065 2e3c 2f73 output type.. &q │ │ │ │ -0000a230: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ -0000a240: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000a250: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0000a260: 7472 793c 2f73 7061 6e3e 3c73 7061 6e20 try:. < │ │ │ │ -0000a290: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -0000a2a0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn se │ │ │ │ -0000a2c0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.output_field. exc │ │ │ │ -0000a320: 6570 743c 2f73 7061 6e3e 203c 7370 616e ept Field │ │ │ │ -0000a340: 4572 726f 723c 2f73 7061 6e3e 3c73 7061 Error:. │ │ │ │ -0000a370: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if not< │ │ │ │ -0000a3a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self._outp │ │ │ │ -0000a3f0: 7574 5f66 6965 6c64 5f72 6573 6f6c 7665 ut_field_resolve │ │ │ │ -0000a400: 645f 746f 5f6e 6f6e 653c 2f73 7061 6e3e d_to_none │ │ │ │ -0000a410: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000a420: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0000a430: 2020 2020 2020 2020 203c 7370 616e 2063 raise.. def _resolve_ │ │ │ │ -0000a490: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field(self │ │ │ │ -0000a4d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0000a4f0: 0a3c 7370 616e 2063 6c61 7373 3d22 7722 . │ │ │ │ -0000a510: 3c73 7061 6e20 636c 6173 733d 2273 6422 ""&qu │ │ │ │ -0000a530: 6f74 3b3c 2f73 7061 6e3e 0a3c 7370 616e ot;. │ │ │ │ -0000a550: 2020 2020 4174 7465 6d70 7420 746f 2069 Attempt to i │ │ │ │ -0000a560: 6e66 6572 2074 6865 206f 7574 7075 7420 nfer the output │ │ │ │ -0000a570: 7479 7065 206f 6620 7468 6520 6578 7072 type of the expr │ │ │ │ -0000a580: 6573 7369 6f6e 2e3c 2f73 7061 6e3e 0a0a ession... │ │ │ │ -0000a590: 3c73 7061 6e20 636c 6173 733d 2273 6422 As a gu │ │ │ │ -0000a5b0: 6573 732c 2069 6620 7468 6520 6f75 7470 ess, if the outp │ │ │ │ -0000a5c0: 7574 2066 6965 6c64 7320 6f66 2061 6c6c ut fields of all │ │ │ │ -0000a5d0: 2073 6f75 7263 6520 6669 656c 6473 206d source fields m │ │ │ │ -0000a5e0: 6174 6368 2074 6865 6e20 7369 6d70 6c79 atch then simply │ │ │ │ -0000a5f0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -0000a610: 2069 6e66 6572 2074 6865 2073 616d 6520 infer the same │ │ │ │ -0000a620: 7479 7065 2068 6572 652e 3c2f 7370 616e type here... If a │ │ │ │ -0000a650: 2073 6f75 7263 6526 2333 393b 7320 6f75 source's ou │ │ │ │ -0000a660: 7470 7574 2066 6965 6c64 2072 6573 6f6c tput field resol │ │ │ │ -0000a670: 7665 7320 746f 204e 6f6e 652c 2065 7863 ves to None, exc │ │ │ │ -0000a680: 6c75 6465 2069 7420 6672 6f6d 2074 6869 lude it from thi │ │ │ │ -0000a690: 7320 6368 6563 6b2e 3c2f 7370 616e 3e0a s check.. │ │ │ │ -0000a6a0: 3c73 7061 6e20 636c 6173 733d 2273 6422 If all │ │ │ │ -0000a6c0: 736f 7572 6365 7320 6172 6520 4e6f 6e65 sources are None │ │ │ │ -0000a6d0: 2c20 7468 656e 2061 6e20 6572 726f 7220 , then an error │ │ │ │ -0000a6e0: 6973 2072 6169 7365 6420 6869 6768 6572 is raised higher │ │ │ │ -0000a6f0: 2075 7020 7468 6520 7374 6163 6b20 696e up the stack in │ │ │ │ -0000a700: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -0000a720: 2074 6865 206f 7574 7075 745f 6669 656c the output_fiel │ │ │ │ -0000a730: 6420 7072 6f70 6572 7479 2e3c 2f73 7061 d property.. &quo │ │ │ │ -0000a760: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". # │ │ │ │ -0000a790: 2054 6869 7320 6775 6573 7320 6973 206d This guess is m │ │ │ │ -0000a7a0: 6f73 746c 7920 6120 6261 6420 6964 6561 ostly a bad idea │ │ │ │ -0000a7b0: 2c20 6275 7420 7468 6572 6520 6973 2071 , but there is q │ │ │ │ -0000a7c0: 7569 7465 2061 206c 6f74 206f 6620 636f uite a lot of co │ │ │ │ -0000a7d0: 6465 3c2f 7370 616e 3e0a 2020 2020 2020 de. │ │ │ │ -0000a7e0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # (especially │ │ │ │ -0000a800: 2033 7264 2070 6172 7479 2046 756e 6320 3rd party Func │ │ │ │ -0000a810: 7375 6263 6c61 7373 6573 2920 7468 6174 subclasses) that │ │ │ │ -0000a820: 2064 6570 656e 6420 6f6e 2069 742c 2077 depend on it, w │ │ │ │ -0000a830: 6526 2333 393b 6420 6e65 6564 2061 3c2f e'd need a. # │ │ │ │ -0000a860: 2064 6570 7265 6361 7469 6f6e 2070 6174 deprecation pat │ │ │ │ -0000a870: 6820 746f 2066 6978 2069 742e 3c2f 7370 h to fix it.. sour │ │ │ │ -0000a8a0: 6365 735f 6974 6572 3c2f 7370 616e 3e20 ces_iter │ │ │ │ -0000a8b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000a8c0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = (. so │ │ │ │ -0000a900: 7572 6365 3c2f 7370 616e 3e20 3c73 7061 urce for< │ │ │ │ -0000a920: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> source in │ │ │ │ -0000a960: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.get_source_f │ │ │ │ -0000a9b0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields() if │ │ │ │ -0000a9f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000aa00: 736f 7572 6365 3c2f 7370 616e 3e20 3c73 source i │ │ │ │ -0000aa20: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s not None. ). for output_fie │ │ │ │ -0000aac0: 6c64 3c2f 7370 616e 3e20 3c73 7061 6e20 ld in sources_ite │ │ │ │ -0000ab00: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r: │ │ │ │ -0000ab20: 0a20 2020 2020 2020 2020 2020 203c 7370 . for │ │ │ │ -0000ab40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c source in │ │ │ │ -0000ab80: 203c 7370 616e 2063 6c61 7373 3d22 6e22 sources_iter:. │ │ │ │ -0000abc0: 2020 2020 2020 2020 2020 2020 203c 7370 if< │ │ │ │ -0000abe0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> not isinstance(out │ │ │ │ -0000ac50: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -0000ac60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000ac70: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , source< │ │ │ │ -0000ac90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -0000acc0: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ -0000acd0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0000ace0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0000acf0: 2020 2020 2020 2020 2020 2020 203c 7370 rai │ │ │ │ -0000ad10: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se FieldE │ │ │ │ -0000ad30: 7272 6f72 3c2f 7370 616e 3e3c 7370 616e rror(. │ │ │ │ -0000ad60: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ -0000ad80: 6f74 3b45 7870 7265 7373 696f 6e20 636f ot;Expression co │ │ │ │ -0000ad90: 6e74 6169 6e73 206d 6978 6564 2074 7970 ntains mixed typ │ │ │ │ -0000ada0: 6573 3a20 3c2f 7370 616e 3e3c 7370 616e es: %s, < │ │ │ │ -0000ade0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -0000adf0: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s. You │ │ │ │ -0000ae10: 6d75 7374 2026 7175 6f74 3b3c 2f73 7061 must ". │ │ │ │ -0000ae30: 2020 2020 2020 2020 2020 203c 7370 616e &quo │ │ │ │ -0000ae50: 743b 7365 7420 6f75 7470 7574 5f66 6965 t;set output_fie │ │ │ │ -0000ae60: 6c64 2e26 7175 6f74 3b3c 2f73 7061 6e3e ld." │ │ │ │ -0000ae70: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0000ae80: 2020 2020 2020 2020 203c 7370 616e 2063 % (. │ │ │ │ +0000a170: 2277 223e 2020 2020 2020 2020 3c2f 7370 "w"> "" │ │ │ │ +0000a1a0: 2671 756f 743b 3c2f 7370 616e 3e0a 3c73 ". │ │ │ │ +0000a1c0: 2020 2020 2020 2052 6574 7572 6e20 7468 Return th │ │ │ │ +0000a1d0: 6520 6f75 7470 7574 2066 6965 6c64 206f e output field o │ │ │ │ +0000a1e0: 6620 7468 6973 2065 7870 7265 7373 696f f this expressio │ │ │ │ +0000a1f0: 6e2c 206f 7220 4e6f 6e65 2069 663c 2f73 n, or None if. _r │ │ │ │ +0000a220: 6573 6f6c 7665 5f6f 7574 7075 745f 6669 esolve_output_fi │ │ │ │ +0000a230: 656c 6428 2920 6469 646e 2623 3339 3b74 eld() didn't │ │ │ │ +0000a240: 2072 6574 7572 6e20 616e 206f 7574 7075 return an outpu │ │ │ │ +0000a250: 7420 7479 7065 2e3c 2f73 7061 6e3e 0a3c t type..< │ │ │ │ +0000a260: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +0000a270: 2020 2020 2020 2020 2671 756f 743b 2671 "&q │ │ │ │ +0000a280: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;". try:. │ │ │ │ +0000a2d0: 2020 2020 2020 2020 203c 7370 616e 2063 return< │ │ │ │ +0000a2f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.outpu │ │ │ │ +0000a340: 745f 6669 656c 643c 2f73 7061 6e3e 0a20 t_field. │ │ │ │ +0000a350: 2020 2020 2020 203c 7370 616e 2063 6c61 except FieldError< │ │ │ │ +0000a390: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:. │ │ │ │ +0000a3b0: 2020 2020 2020 2020 2020 203c 7370 616e if not │ │ │ │ +0000a3f0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self._output_fie │ │ │ │ +0000a440: 6c64 5f72 6573 6f6c 7665 645f 746f 5f6e ld_resolved_to_n │ │ │ │ +0000a450: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one:. │ │ │ │ +0000a480: 2020 203c 7370 616e 2063 6c61 7373 3d22 raise. │ │ │ │ +0000a4a0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0000a4c0: 3c73 7061 6e20 636c 6173 733d 226e 6622 _resolve_output │ │ │ │ +0000a4e0: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field(self):. │ │ │ │ +0000a550: 2020 203c 2f73 7061 6e3e 3c73 7061 6e20 " │ │ │ │ +0000a570: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"". At │ │ │ │ +0000a5a0: 7465 6d70 7420 746f 2069 6e66 6572 2074 tempt to infer t │ │ │ │ +0000a5b0: 6865 206f 7574 7075 7420 7479 7065 206f he output type o │ │ │ │ +0000a5c0: 6620 7468 6520 6578 7072 6573 7369 6f6e f the expression │ │ │ │ +0000a5d0: 2e3c 2f73 7061 6e3e 0a0a 3c73 7061 6e20 ... │ │ │ │ +0000a5f0: 2020 2041 7320 6120 6775 6573 732c 2069 As a guess, i │ │ │ │ +0000a600: 6620 7468 6520 6f75 7470 7574 2066 6965 f the output fie │ │ │ │ +0000a610: 6c64 7320 6f66 2061 6c6c 2073 6f75 7263 lds of all sourc │ │ │ │ +0000a620: 6520 6669 656c 6473 206d 6174 6368 2074 e fields match t │ │ │ │ +0000a630: 6865 6e20 7369 6d70 6c79 3c2f 7370 616e hen simply. infer │ │ │ │ +0000a660: 2074 6865 2073 616d 6520 7479 7065 2068 the same type h │ │ │ │ +0000a670: 6572 652e 3c2f 7370 616e 3e0a 0a3c 7370 ere... │ │ │ │ +0000a690: 2020 2020 2020 4966 2061 2073 6f75 7263 If a sourc │ │ │ │ +0000a6a0: 6526 2333 393b 7320 6f75 7470 7574 2066 e's output f │ │ │ │ +0000a6b0: 6965 6c64 2072 6573 6f6c 7665 7320 746f ield resolves to │ │ │ │ +0000a6c0: 204e 6f6e 652c 2065 7863 6c75 6465 2069 None, exclude i │ │ │ │ +0000a6d0: 7420 6672 6f6d 2074 6869 7320 6368 6563 t from this chec │ │ │ │ +0000a6e0: 6b2e 3c2f 7370 616e 3e0a 3c73 7061 6e20 k.. │ │ │ │ +0000a700: 2020 2049 6620 616c 6c20 736f 7572 6365 If all source │ │ │ │ +0000a710: 7320 6172 6520 4e6f 6e65 2c20 7468 656e s are None, then │ │ │ │ +0000a720: 2061 6e20 6572 726f 7220 6973 2072 6169 an error is rai │ │ │ │ +0000a730: 7365 6420 6869 6768 6572 2075 7020 7468 sed higher up th │ │ │ │ +0000a740: 6520 7374 6163 6b20 696e 3c2f 7370 616e e stack in. the o │ │ │ │ +0000a770: 7574 7075 745f 6669 656c 6420 7072 6f70 utput_field prop │ │ │ │ +0000a780: 6572 7479 2e3c 2f73 7061 6e3e 0a3c 7370 erty.. │ │ │ │ +0000a7a0: 2020 2020 2020 2671 756f 743b 2671 756f "&quo │ │ │ │ +0000a7b0: 743b 2671 756f 743b 3c2f 7370 616e 3e0a t;". │ │ │ │ +0000a7c0: 2020 2020 2020 2020 3c73 7061 6e20 636c # This │ │ │ │ +0000a7e0: 6775 6573 7320 6973 206d 6f73 746c 7920 guess is mostly │ │ │ │ +0000a7f0: 6120 6261 6420 6964 6561 2c20 6275 7420 a bad idea, but │ │ │ │ +0000a800: 7468 6572 6520 6973 2071 7569 7465 2061 there is quite a │ │ │ │ +0000a810: 206c 6f74 206f 6620 636f 6465 3c2f 7370 lot of code. # ( │ │ │ │ +0000a840: 6573 7065 6369 616c 6c79 2033 7264 2070 especially 3rd p │ │ │ │ +0000a850: 6172 7479 2046 756e 6320 7375 6263 6c61 arty Func subcla │ │ │ │ +0000a860: 7373 6573 2920 7468 6174 2064 6570 656e sses) that depen │ │ │ │ +0000a870: 6420 6f6e 2069 742c 2077 6526 2333 393b d on it, we' │ │ │ │ +0000a880: 6420 6e65 6564 2061 3c2f 7370 616e 3e0a d need a. │ │ │ │ +0000a890: 2020 2020 2020 2020 3c73 7061 6e20 636c # depre │ │ │ │ +0000a8b0: 6361 7469 6f6e 2070 6174 6820 746f 2066 cation path to f │ │ │ │ +0000a8c0: 6978 2069 742e 3c2f 7370 616e 3e0a 2020 ix it.. │ │ │ │ +0000a8d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 sources_it │ │ │ │ +0000a8f0: 6572 3c2f 7370 616e 3e20 3c73 7061 6e20 er = (. │ │ │ │ +0000a930: 2020 2020 2020 2020 3c73 7061 6e20 636c source for │ │ │ │ +0000a970: 203c 7370 616e 2063 6c61 7373 3d22 6e22 source < │ │ │ │ +0000a990: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +0000a9a0: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in self< │ │ │ │ +0000a9c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ge │ │ │ │ +0000a9f0: 745f 736f 7572 6365 5f66 6965 6c64 733c t_source_fields< │ │ │ │ +0000aa00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>() │ │ │ │ +0000aa20: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000aa30: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if source │ │ │ │ +0000aa50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c is not < │ │ │ │ +0000aa90: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +0000aaa0: 4e6f 6e65 3c2f 7370 616e 3e0a 2020 2020 None. │ │ │ │ +0000aab0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +0000aad0: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +0000aaf0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000ab00: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field in < │ │ │ │ +0000ab30: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +0000ab40: 6f75 7263 6573 5f69 7465 723c 2f73 7061 ources_iter:. │ │ │ │ +0000ab70: 2020 2020 2020 203c 7370 616e 2063 6c61 for source │ │ │ │ +0000abb0: 3c73 7061 6e20 636c 6173 733d 226f 7722 in sourc │ │ │ │ +0000abe0: 6573 5f69 7465 723c 2f73 7061 6e3e 3c73 es_iter:< │ │ │ │ +0000ac00: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000ac10: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +0000ac30: 203c 7370 616e 2063 6c61 7373 3d22 6f77 not is │ │ │ │ +0000ac60: 696e 7374 616e 6365 3c2f 7370 616e 3e3c instance< │ │ │ │ +0000ac70: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000ac80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ +0000aca0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, source │ │ │ │ +0000ace0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000acf0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__class │ │ │ │ +0000ad10: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __):. │ │ │ │ +0000ad40: 2020 2020 2020 203c 7370 616e 2063 6c61 raise FieldError(. │ │ │ │ +0000ada0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000adb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 "Exp │ │ │ │ +0000add0: 7265 7373 696f 6e20 636f 6e74 6169 6e73 ression contains │ │ │ │ +0000ade0: 206d 6978 6564 2074 7970 6573 3a20 3c2f mixed types: %s< │ │ │ │ +0000ae10: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +0000ae20: 2c20 3c2f 7370 616e 3e3c 7370 616e 2063 , %s. You must & │ │ │ │ +0000ae60: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +0000ae70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000ae80: 2020 2020 203c 7370 616e 2063 6c61 7373 "set │ │ │ │ +0000aea0: 6f75 7470 7574 5f66 6965 6c64 2e26 7175 output_field.&qu │ │ │ │ +0000aeb0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 2020 ot;. │ │ │ │ 0000aec0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000aed0: 2020 2020 2020 203c 7370 616e 2063 6c61 output_fi │ │ │ │ -0000aef0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld.__class__.__na │ │ │ │ -0000af60: 6d65 5f5f 3c2f 7370 616e 3e3c 7370 616e me__,. │ │ │ │ -0000af90: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000afa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000afb0: 736f 7572 6365 3c2f 7370 616e 3e3c 7370 source.__class__< │ │ │ │ -0000aff0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -0000b020: 5f6e 616d 655f 5f3c 2f73 7061 6e3e 3c73 _name__,< │ │ │ │ -0000b040: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0000b050: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0000b060: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0000b070: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000b080: 2020 2020 2020 2020 2020 2020 3c73 7061 ). │ │ │ │ -0000b0b0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0000b0d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0000b0e0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field.. @static │ │ │ │ -0000b110: 6d65 7468 6f64 3c2f 7370 616e 3e0a 2020 method. │ │ │ │ -0000b120: 2020 3c73 7061 6e20 636c 6173 733d 226b def _c │ │ │ │ -0000b150: 6f6e 7665 7274 5f76 616c 7565 5f6e 6f6f onvert_value_noo │ │ │ │ -0000b160: 703c 2f73 7061 6e3e 3c73 7061 6e20 636c p( │ │ │ │ -0000b180: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000b190: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value, expression< │ │ │ │ -0000b1d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0000b1f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0000b200: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -0000b210: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000b220: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -0000b230: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0000b250: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000b260: 7661 6c75 653c 2f73 7061 6e3e 0a0a 2020 value.. │ │ │ │ -0000b270: 2020 3c73 7061 6e20 636c 6173 733d 226e @cached_prope │ │ │ │ -0000b290: 7274 793c 2f73 7061 6e3e 0a20 2020 203c rty. < │ │ │ │ -0000b2a0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0000b2b0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef conve │ │ │ │ -0000b2d0: 7274 5f76 616c 7565 3c2f 7370 616e 3e3c rt_value< │ │ │ │ -0000b2e0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0000b2f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -0000b340: 2020 2020 203c 2f73 7061 6e3e 3c73 7061 &qu │ │ │ │ -0000b360: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c ot;""< │ │ │ │ +0000aed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 % (. │ │ │ │ +0000af10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000af20: 203c 7370 616e 2063 6c61 7373 3d22 6e22 output_field.__c │ │ │ │ +0000af70: 6c61 7373 5f5f 3c2f 7370 616e 3e3c 7370 lass__.__name__,. │ │ │ │ +0000afd0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0000afe0: 2020 2020 2020 2020 2020 3c73 7061 6e20 source │ │ │ │ +0000b000: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0000b020: 7370 616e 2063 6c61 7373 3d22 766d 223e span class="vm"> │ │ │ │ +0000b030: 5f5f 636c 6173 735f 5f3c 2f73 7061 6e3e __class__ │ │ │ │ +0000b040: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000b050: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__name_ │ │ │ │ +0000b070: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _, │ │ │ │ +0000b090: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0000b0a0: 2020 2020 2020 2020 203c 7370 616e 2063 ). │ │ │ │ +0000b0d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0000b0f0: 2020 2020 2020 2020 2020 203c 7370 616e retur │ │ │ │ +0000b110: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n output_ │ │ │ │ +0000b130: 6669 656c 643c 2f73 7061 6e3e 0a0a 2020 field.. │ │ │ │ +0000b140: 2020 3c73 7061 6e20 636c 6173 733d 226e @staticmethod │ │ │ │ +0000b160: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . def< │ │ │ │ +0000b180: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _convert │ │ │ │ +0000b1a0: 5f76 616c 7565 5f6e 6f6f 703c 2f73 7061 _value_noop(value< │ │ │ │ +0000b1e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0000b200: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0000b210: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +0000b220: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000b230: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , connect │ │ │ │ +0000b250: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. retu │ │ │ │ +0000b290: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn value< │ │ │ │ +0000b2b0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. @ca │ │ │ │ +0000b2d0: 6368 6564 5f70 726f 7065 7274 793c 2f73 ched_property. def convert_val │ │ │ │ +0000b320: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue(self):< │ │ │ │ 0000b370: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ -0000b390: 4578 7072 6573 7369 6f6e 7320 7072 6f76 Expressions prov │ │ │ │ -0000b3a0: 6964 6520 7468 6569 7220 6f77 6e20 636f ide their own co │ │ │ │ -0000b3b0: 6e76 6572 7465 7273 2062 6563 6175 7365 nverters because │ │ │ │ -0000b3c0: 2075 7365 7273 2068 6176 6520 7468 6520 users have the │ │ │ │ -0000b3d0: 6f70 7469 6f6e 3c2f 7370 616e 3e0a 3c73 option. │ │ │ │ -0000b3f0: 2020 2020 2020 206f 6620 6d61 6e75 616c of manual │ │ │ │ -0000b400: 6c79 2073 7065 6369 6679 696e 6720 7468 ly specifying th │ │ │ │ -0000b410: 6520 6f75 7470 7574 5f66 6965 6c64 2077 e output_field w │ │ │ │ -0000b420: 6869 6368 206d 6179 2062 6520 6120 6469 hich may be a di │ │ │ │ -0000b430: 6666 6572 656e 7420 7479 7065 3c2f 7370 fferent type. fro │ │ │ │ -0000b460: 6d20 7468 6520 6f6e 6520 7468 6520 6461 m the one the da │ │ │ │ -0000b470: 7461 6261 7365 2072 6574 7572 6e73 2e3c tabase returns.< │ │ │ │ -0000b480: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ -0000b4a0: 2671 756f 743b 2671 756f 743b 2671 756f ""&quo │ │ │ │ -0000b4b0: 743b 3c2f 7370 616e 3e0a 2020 2020 2020 t;. │ │ │ │ -0000b4c0: 2020 3c73 7061 6e20 636c 6173 733d 226e field < │ │ │ │ -0000b4e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0000b4f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.outp │ │ │ │ -0000b540: 7574 5f66 6965 6c64 3c2f 7370 616e 3e0a ut_field. │ │ │ │ -0000b550: 2020 2020 2020 2020 3c73 7061 6e20 636c internal │ │ │ │ -0000b570: 5f74 7970 653c 2f73 7061 6e3e 203c 7370 _type = field.get_in │ │ │ │ -0000b5e0: 7465 726e 616c 5f74 7970 653c 2f73 7061 ternal_type(). │ │ │ │ -0000b610: 2020 2020 3c73 7061 6e20 636c 6173 733d if in │ │ │ │ -0000b640: 7465 726e 616c 5f74 7970 653c 2f73 7061 ternal_type == &q │ │ │ │ -0000b680: 756f 743b 466c 6f61 7446 6965 6c64 2671 uot;FloatField&q │ │ │ │ -0000b690: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;:. │ │ │ │ -0000b6c0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0000b6d0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return (< │ │ │ │ -0000b6f0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0000b700: 2020 2020 2020 203c 7370 616e 2063 6c61 lambda value, expres │ │ │ │ -0000b770: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion, connection: N │ │ │ │ -0000b7e0: 6f6e 653c 2f73 7061 6e3e 0a20 2020 2020 one. │ │ │ │ -0000b7f0: 2020 2020 2020 2020 2020 203c 7370 616e if value is No │ │ │ │ -0000b860: 6e65 3c2f 7370 616e 3e0a 2020 2020 2020 ne. │ │ │ │ -0000b870: 2020 2020 2020 2020 2020 3c73 7061 6e20 else float(value │ │ │ │ -0000b8e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -0000b900: 2020 2020 2020 2020 2020 2020 3c73 7061 ). eli │ │ │ │ -0000b940: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f interna │ │ │ │ -0000b960: 6c5f 7479 7065 3c2f 7370 616e 3e3c 7370 l_type.endswith(&qu │ │ │ │ -0000b9d0: 6f74 3b49 6e74 6567 6572 4669 656c 6426 ot;IntegerField& │ │ │ │ -0000b9e0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;):. │ │ │ │ -0000ba10: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0000ba30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000ba40: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ -0000ba50: 2020 2020 2020 2020 203c 7370 616e 2063 lambda< │ │ │ │ -0000ba70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> value, expr │ │ │ │ -0000bac0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession, connection │ │ │ │ -0000bb00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 : │ │ │ │ -0000bb20: 3c73 7061 6e20 636c 6173 733d 226b 6322 None. │ │ │ │ -0000bb40: 2020 2020 2020 2020 2020 2020 203c 7370 if< │ │ │ │ -0000bb60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> value is < │ │ │ │ -0000bba0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0000bbb0: 4e6f 6e65 3c2f 7370 616e 3e0a 2020 2020 None. │ │ │ │ -0000bbc0: 2020 2020 2020 2020 2020 2020 3c73 7061 else │ │ │ │ -0000bbe0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int(value │ │ │ │ -0000bc30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -0000bc50: 2020 2020 2020 2020 2020 2020 3c73 7061 ). eli │ │ │ │ -0000bc90: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f interna │ │ │ │ -0000bcb0: 6c5f 7479 7065 3c2f 7370 616e 3e20 3c73 l_type == │ │ │ │ -0000bcd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "D │ │ │ │ -0000bcf0: 6563 696d 616c 4669 656c 6426 7175 6f74 ecimalField" │ │ │ │ -0000bd00: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;: │ │ │ │ -0000bd20: 0a20 2020 2020 2020 2020 2020 203c 7370 . ret │ │ │ │ -0000bd40: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn (. │ │ │ │ -0000bd70: 2020 2020 3c73 7061 6e20 636c 6173 733d lambda value,< │ │ │ │ -0000bdc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> expressio │ │ │ │ -0000bde0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ -0000be00: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection: None │ │ │ │ -0000be50: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000be60: 2020 2020 2020 2020 3c73 7061 6e20 636c if value < │ │ │ │ -0000bea0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0000beb0: 6973 3c2f 7370 616e 3e20 3c73 7061 6e20 is None< │ │ │ │ -0000bed0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0000bee0: 2020 2020 2020 203c 7370 616e 2063 6c61 else Decimal(value). │ │ │ │ -0000bf70: 2020 2020 2020 2020 2020 3c73 7061 6e20 ). retur │ │ │ │ -0000bfb0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self._co │ │ │ │ -0000c000: 6e76 6572 745f 7661 6c75 655f 6e6f 6f70 nvert_value_noop │ │ │ │ -0000c010: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0000c030: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_loo │ │ │ │ -0000c050: 6b75 703c 2f73 7061 6e3e 3c73 7061 6e20 kup(self,< │ │ │ │ -0000c0a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lookup):. │ │ │ │ -0000c0e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ -0000c120: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000c130: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .output_f │ │ │ │ -0000c150: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield.get_lookup(look │ │ │ │ -0000c1c0: 7570 3c2f 7370 616e 3e3c 7370 616e 2063 up).. def get_transform │ │ │ │ -0000c220: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0000c240: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0000c250: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, name< │ │ │ │ -0000c290: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0000c2a0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0000c2b0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0000c2d0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0000c2e0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.output_field< │ │ │ │ -0000c320: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ge │ │ │ │ -0000c350: 745f 7472 616e 7366 6f72 6d3c 2f73 7061 t_transform(name).. │ │ │ │ -0000c3b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def r │ │ │ │ -0000c3e0: 656c 6162 656c 6564 5f63 6c6f 6e65 3c2f elabeled_clone(se │ │ │ │ -0000c420: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, change_map):. │ │ │ │ -0000c480: 2020 2020 203c 7370 616e 2063 6c61 7373 clone = self │ │ │ │ -0000c4d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0000c4f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0000c500: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy(). clon │ │ │ │ -0000c540: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -0000c560: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000c570: 7365 745f 736f 7572 6365 5f65 7870 7265 set_source_expre │ │ │ │ -0000c580: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions(. │ │ │ │ -0000c5b0: 2020 3c73 7061 6e20 636c 6173 733d 2270 [. │ │ │ │ -0000c5d0: 2020 2020 2020 2020 2020 203c 7370 616e e.relab │ │ │ │ -0000c620: 656c 6564 5f63 6c6f 6e65 3c2f 7370 616e eled_clone(change_ │ │ │ │ -0000c660: 6d61 703c 2f73 7061 6e3e 3c73 7061 6e20 map) if e is │ │ │ │ -0000c6d0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 not No │ │ │ │ -0000c700: 6e65 3c2f 7370 616e 3e20 3c73 7061 6e20 ne else None. │ │ │ │ -0000c750: 2020 203c 7370 616e 2063 6c61 7373 3d22 for e< │ │ │ │ -0000c780: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in self.< │ │ │ │ -0000c7d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_source │ │ │ │ -0000c7f0: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(). │ │ │ │ -0000c820: 2020 2020 2020 2020 203c 7370 616e 2063 ]. ). retur │ │ │ │ -0000c880: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n clone.. def replace_e │ │ │ │ -0000c8e0: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(self, re │ │ │ │ -0000c950: 706c 6163 656d 656e 7473 3c2f 7370 616e placements):. │ │ │ │ -0000c980: 2020 203c 7370 616e 2063 6c61 7373 3d22 if rep │ │ │ │ -0000c9b0: 6c61 6365 6d65 6e74 3c2f 7370 616e 3e20 lacement │ │ │ │ -0000c9c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000c9d0: 3a3d 3c2f 7370 616e 3e20 3c73 7061 6e20 := replac │ │ │ │ -0000c9f0: 656d 656e 7473 3c2f 7370 616e 3e3c 7370 ements.get< │ │ │ │ -0000ca30: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000b380: 7373 3d22 7722 3e20 2020 2020 2020 203c ss="w"> < │ │ │ │ +0000b390: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ +0000b3b0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ +0000b3c0: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . Expres │ │ │ │ +0000b3e0: 7369 6f6e 7320 7072 6f76 6964 6520 7468 sions provide th │ │ │ │ +0000b3f0: 6569 7220 6f77 6e20 636f 6e76 6572 7465 eir own converte │ │ │ │ +0000b400: 7273 2062 6563 6175 7365 2075 7365 7273 rs because users │ │ │ │ +0000b410: 2068 6176 6520 7468 6520 6f70 7469 6f6e have the option │ │ │ │ +0000b420: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ +0000b440: 206f 6620 6d61 6e75 616c 6c79 2073 7065 of manually spe │ │ │ │ +0000b450: 6369 6679 696e 6720 7468 6520 6f75 7470 cifying the outp │ │ │ │ +0000b460: 7574 5f66 6965 6c64 2077 6869 6368 206d ut_field which m │ │ │ │ +0000b470: 6179 2062 6520 6120 6469 6666 6572 656e ay be a differen │ │ │ │ +0000b480: 7420 7479 7065 3c2f 7370 616e 3e0a 3c73 t type. │ │ │ │ +0000b4a0: 2020 2020 2020 2066 726f 6d20 7468 6520 from the │ │ │ │ +0000b4b0: 6f6e 6520 7468 6520 6461 7461 6261 7365 one the database │ │ │ │ +0000b4c0: 2072 6574 7572 6e73 2e3c 2f73 7061 6e3e returns. │ │ │ │ +0000b4d0: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . " │ │ │ │ +0000b4f0: 2671 756f 743b 2671 756f 743b 3c2f 7370 "". fiel │ │ │ │ +0000b520: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d = self.< │ │ │ │ +0000b570: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ +0000b590: 6c64 3c2f 7370 616e 3e0a 2020 2020 2020 ld. │ │ │ │ +0000b5a0: 2020 3c73 7061 6e20 636c 6173 733d 226e internal_type< │ │ │ │ +0000b5c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0000b5e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000b5f0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.get_internal │ │ │ │ +0000b630: 5f74 7970 653c 2f73 7061 6e3e 3c73 7061 _type(). if │ │ │ │ +0000b670: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c internal │ │ │ │ +0000b690: 5f74 7970 653c 2f73 7061 6e3e 203c 7370 _type ==< │ │ │ │ +0000b6b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "Fl │ │ │ │ +0000b6d0: 6f61 7446 6965 6c64 2671 756f 743b 3c2f oatField":. │ │ │ │ +0000b700: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ +0000b720: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ( │ │ │ │ +0000b740: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0000b750: 203c 7370 616e 2063 6c61 7373 3d22 6b22 lambda < │ │ │ │ +0000b770: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ +0000b780: 616c 7565 3c2f 7370 616e 3e3c 7370 616e alue, expression, co │ │ │ │ +0000b7f0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +0000b800: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +0000b810: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c None. │ │ │ │ +0000b840: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +0000b860: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ +0000b870: 616c 7565 3c2f 7370 616e 3e20 3c73 7061 alue is< │ │ │ │ +0000b890: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None. │ │ │ │ +0000b8c0: 2020 2020 3c73 7061 6e20 636c 6173 733d else │ │ │ │ +0000b8e0: 3c73 7061 6e20 636c 6173 733d 226e 6222 float(value). │ │ │ │ +0000b950: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0000b970: 2020 2020 2020 203c 7370 616e 2063 6c61 elif internal_type │ │ │ │ +0000b9b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0000b9d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0000b9e0: 6e64 7377 6974 683c 2f73 7061 6e3e 3c73 ndswith(< │ │ │ │ +0000ba00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"Int │ │ │ │ +0000ba20: 6567 6572 4669 656c 6426 7175 6f74 3b3c egerField"< │ │ │ │ +0000ba30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0000ba50: 2020 2020 2020 2020 2020 2020 3c73 7061 retu │ │ │ │ +0000ba70: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn (. │ │ │ │ +0000baa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 lambda │ │ │ │ +0000bac0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 value, expression │ │ │ │ +0000bb10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0000bb30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000bb40: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection: None< │ │ │ │ +0000bb80: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000bb90: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +0000bbb0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 value i │ │ │ │ +0000bbe0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s None. │ │ │ │ +0000bc10: 2020 2020 2020 3c73 7061 6e20 636c 6173 else int(value). │ │ │ │ +0000bca0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0000bcc0: 2020 2020 2020 203c 7370 616e 2063 6c61 elif internal_type │ │ │ │ +0000bd00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c == "Decimal │ │ │ │ +0000bd40: 4669 656c 6426 7175 6f74 3b3c 2f73 7061 Field":. │ │ │ │ +0000bd70: 2020 2020 2020 203c 7370 616e 2063 6c61 return (. │ │ │ │ +0000bdb0: 2020 2020 2020 2020 2020 2020 2020 3c73 la │ │ │ │ +0000bdd0: 6d62 6461 3c2f 7370 616e 3e20 3c73 7061 mbda valu │ │ │ │ +0000bdf0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +0000be10: 203c 7370 616e 2063 6c61 7373 3d22 6e22 expression, conne │ │ │ │ +0000be60: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction: None. │ │ │ │ +0000beb0: 2020 3c73 7061 6e20 636c 6173 733d 226b if valu │ │ │ │ +0000bee0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e is None │ │ │ │ +0000bf20: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0000bf30: 203c 7370 616e 2063 6c61 7373 3d22 6b22 else Dec │ │ │ │ +0000bf60: 696d 616c 3c2f 7370 616e 3e3c 7370 616e imal(value< │ │ │ │ +0000bfa0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0000bfb0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0000bfc0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +0000bfe0: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ +0000c020: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0000c030: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 _convert_ │ │ │ │ +0000c050: 7661 6c75 655f 6e6f 6f70 3c2f 7370 616e value_noop.. def get_lookup(sel │ │ │ │ +0000c0d0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +0000c0f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 lookup): │ │ │ │ +0000c120: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0000c130: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000c140: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ +0000c160: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.output_field.get │ │ │ │ +0000c1d0: 5f6c 6f6f 6b75 703c 2f73 7061 6e3e 3c73 _lookup(< │ │ │ │ +0000c1f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>lookup).. │ │ │ │ +0000c230: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ +0000c260: 5f74 7261 6e73 666f 726d 3c2f 7370 616e _transform(self, na │ │ │ │ +0000c2d0: 6d65 3c2f 7370 616e 3e3c 7370 616e 2063 me):. retur │ │ │ │ +0000c310: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self.out │ │ │ │ +0000c360: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ +0000c370: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000c380: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .get_tran │ │ │ │ +0000c3a0: 7366 6f72 6d3c 2f73 7061 6e3e 3c73 7061 sform(name< │ │ │ │ +0000c3e0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0000c3f0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +0000c410: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c relabel │ │ │ │ +0000c430: 6564 5f63 6c6f 6e65 3c2f 7370 616e 3e3c ed_clone< │ │ │ │ +0000c440: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000c450: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, chan │ │ │ │ +0000c4a0: 6765 5f6d 6170 3c2f 7370 616e 3e3c 7370 ge_map):< │ │ │ │ +0000c4c0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0000c4d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +0000c4e0: 6c6f 6e65 3c2f 7370 616e 3e20 3c73 7061 lone = self.copy(). │ │ │ │ +0000c570: 2020 2020 2020 3c73 7061 6e20 636c 6173 clone.set_so │ │ │ │ +0000c5c0: 7572 6365 5f65 7870 7265 7373 696f 6e73 urce_expressions │ │ │ │ +0000c5d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (. │ │ │ │ +0000c5f0: 2020 2020 2020 2020 2020 2020 3c73 7061 [. │ │ │ │ +0000c620: 2020 2020 203c 7370 616e 2063 6c61 7373 e.relabeled_c │ │ │ │ +0000c670: 6c6f 6e65 3c2f 7370 616e 3e3c 7370 616e lone(change_map) if< │ │ │ │ +0000c6e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> e │ │ │ │ +0000c700: 3c73 7061 6e20 636c 6173 733d 226f 7722 is not< │ │ │ │ +0000c730: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None else │ │ │ │ +0000c770: 3c73 7061 6e20 636c 6173 733d 226b 6322 None. │ │ │ │ +0000c790: 2020 2020 2020 2020 2020 2020 203c 7370 for │ │ │ │ +0000c7b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c e │ │ │ │ +0000c7d0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in sel │ │ │ │ +0000c800: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0000c820: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000c830: 6765 745f 736f 7572 6365 5f65 7870 7265 get_source_expre │ │ │ │ +0000c840: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions()< │ │ │ │ +0000c860: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000c870: 2020 203c 7370 616e 2063 6c61 7373 3d22 ]. │ │ │ │ +0000c890: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +0000c8b0: 2020 2020 203c 7370 616e 2063 6c61 7373 return clone. │ │ │ │ +0000c8f0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0000c910: 3c73 7061 6e20 636c 6173 733d 226e 6622 replace_express │ │ │ │ +0000c930: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ +0000c970: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0000c980: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c replacem │ │ │ │ +0000c9a0: 656e 7473 3c2f 7370 616e 3e3c 7370 616e ents):. if< │ │ │ │ +0000c9e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> replaceme │ │ │ │ +0000ca00: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt := replacements │ │ │ │ 0000ca40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -0000ca80: 2020 2020 2020 2020 203c 7370 616e 2063 return< │ │ │ │ -0000caa0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> replaceme │ │ │ │ -0000cac0: 6e74 3c2f 7370 616e 3e0a 2020 2020 2020 nt. │ │ │ │ -0000cad0: 2020 3c73 7061 6e20 636c 6173 733d 226e clone < │ │ │ │ -0000caf0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0000cb00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.copy │ │ │ │ -0000cb50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ -0000cb70: 0a20 2020 2020 2020 203c 7370 616e 2063 . source_ │ │ │ │ -0000cb90: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions = clon │ │ │ │ -0000cbd0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -0000cbf0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000cc00: 6765 745f 736f 7572 6365 5f65 7870 7265 get_source_expre │ │ │ │ -0000cc10: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions()< │ │ │ │ -0000cc30: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0000cc40: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0000cc50: 6c6f 6e65 3c2f 7370 616e 3e3c 7370 616e lone.set_source_ex │ │ │ │ -0000cc90: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ -0000cca0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000ccb0: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ -0000ccc0: 2020 2020 203c 7370 616e 2063 6c61 7373 [. │ │ │ │ -0000cce0: 2020 2020 2020 2020 2020 2020 2020 3c73 ex │ │ │ │ -0000cd00: 7072 3c2f 7370 616e 3e3c 7370 616e 2063 pr.replace_express │ │ │ │ -0000cd40: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(replacements< │ │ │ │ -0000cd80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ -0000cda0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -0000cdb0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f expr else │ │ │ │ -0000cdf0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 None. │ │ │ │ -0000ce10: 2020 2020 2020 2020 2020 2020 2020 3c73 fo │ │ │ │ -0000ce30: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r expr in │ │ │ │ -0000ce70: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000ce80: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ -0000ce90: 6e73 3c2f 7370 616e 3e0a 2020 2020 2020 ns. │ │ │ │ -0000cea0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ]. │ │ │ │ -0000cec0: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ -0000cee0: 2020 2020 2020 2020 3c73 7061 6e20 636c return clone.. def get_refs(self │ │ │ │ -0000cf90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0000cfb0: 0a20 2020 2020 2020 203c 7370 616e 2063 . refs = s │ │ │ │ -0000d000: 6574 3c2f 7370 616e 3e3c 7370 616e 2063 et(). for expr in se │ │ │ │ -0000d090: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.get_source_expr │ │ │ │ -0000d0d0: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions() │ │ │ │ -0000d0f0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0000d100: 2020 2020 203c 7370 616e 2063 6c61 7373 refs │ │ │ │ -0000d120: 203c 7370 616e 2063 6c61 7373 3d22 6f22 |= expr< │ │ │ │ -0000d150: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ge │ │ │ │ -0000d180: 745f 7265 6673 3c2f 7370 616e 3e3c 7370 t_refs()< │ │ │ │ -0000d1a0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0000d1b0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -0000d1c0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn ref │ │ │ │ -0000d1e0: 733c 2f73 7061 6e3e 0a0a 2020 2020 3c73 s.. de │ │ │ │ -0000d200: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f copy(se │ │ │ │ -0000d250: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -0000d290: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n copy.copy │ │ │ │ -0000d2e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0000d300: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0000d310: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self).. def prefix_refe │ │ │ │ -0000d370: 7265 6e63 6573 3c2f 7370 616e 3e3c 7370 rences(self, prefix │ │ │ │ -0000d3e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0000d400: 0a20 2020 2020 2020 203c 7370 616e 2063 . clone = < │ │ │ │ -0000d440: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0000d450: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.copy() │ │ │ │ -0000d4a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000d4b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000d4c0: 636c 6f6e 653c 2f73 7061 6e3e 3c73 7061 clone.set_source_e │ │ │ │ -0000d500: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(. │ │ │ │ -0000d530: 2020 2020 2020 3c73 7061 6e20 636c 6173 [. │ │ │ │ -0000d550: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0000d560: 7370 616e 2063 6c61 7373 3d22 6e22 3e46 span class="n">F │ │ │ │ -0000d570: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0000d590: 7370 616e 2063 6c61 7373 3d22 7361 223e span class="sa"> │ │ │ │ -0000d5a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f"< │ │ │ │ -0000d5c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>{< │ │ │ │ -0000d5e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -0000d5f0: 7265 6669 783c 2f73 7061 6e3e 3c73 7061 refix}{< │ │ │ │ -0000d610: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>expr.name}&q │ │ │ │ -0000d690: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;). │ │ │ │ -0000d6c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if i │ │ │ │ -0000d6f0: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ -0000d700: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000d710: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (expr, F). │ │ │ │ -0000d780: 2020 2020 2020 2020 2020 2020 203c 7370 els │ │ │ │ -0000d7a0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e expr.pref │ │ │ │ -0000d7f0: 6978 5f72 6566 6572 656e 6365 733c 2f73 ix_references(pref │ │ │ │ -0000d830: 6978 3c2f 7370 616e 3e3c 7370 616e 2063 ix). │ │ │ │ -0000d860: 2020 3c73 7061 6e20 636c 6173 733d 226b for exp │ │ │ │ -0000d890: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r in self │ │ │ │ -0000d8d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000d8e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .get_sour │ │ │ │ -0000d900: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions(). │ │ │ │ -0000d930: 2020 2020 2020 2020 2020 203c 7370 616e ]. ). ret │ │ │ │ -0000d990: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn clone │ │ │ │ -0000d9b0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0000d9d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_gro │ │ │ │ -0000d9f0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols(self):. │ │ │ │ -0000da50: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -0000da70: 203c 7370 616e 2063 6c61 7373 3d22 6f77 not se │ │ │ │ -0000daa0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.contains_aggreg │ │ │ │ -0000dae0: 6174 653c 2f73 7061 6e3e 3c73 7061 6e20 ate:. < │ │ │ │ -0000db10: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -0000db20: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn [self]. │ │ │ │ -0000db80: 2020 3c73 7061 6e20 636c 6173 733d 226e cols =< │ │ │ │ -0000dbb0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [] │ │ │ │ -0000dbd0: 0a20 2020 2020 2020 203c 7370 616e 2063 . for source in se │ │ │ │ -0000dc40: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.get_source_expr │ │ │ │ -0000dc80: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions() │ │ │ │ -0000dca0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0000dcb0: 2020 2020 203c 7370 616e 2063 6c61 7373 cols │ │ │ │ -0000dcd0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000dce0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .extend(sou │ │ │ │ -0000dd30: 7263 653c 2f73 7061 6e3e 3c73 7061 6e20 rce.get_group_by_c │ │ │ │ -0000dd70: 6f6c 733c 2f73 7061 6e3e 3c73 7061 6e20 ols()). ret │ │ │ │ -0000ddb0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn cols< │ │ │ │ -0000ddd0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -0000ddf0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_sour │ │ │ │ -0000de10: 6365 5f66 6965 6c64 733c 2f73 7061 6e3e ce_fields │ │ │ │ -0000de20: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000de30: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0000de80: 2020 2020 2020 3c2f 7370 616e 3e3c 7370 &q │ │ │ │ -0000dea0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ -0000deb0: 5265 7475 726e 2074 6865 2075 6e64 6572 Return the under │ │ │ │ -0000dec0: 6c79 696e 6720 6669 656c 6420 7479 7065 lying field type │ │ │ │ -0000ded0: 7320 7573 6564 2062 7920 7468 6973 2061 s used by this a │ │ │ │ -0000dee0: 6767 7265 6761 7465 2e26 7175 6f74 3b26 ggregate."& │ │ │ │ -0000def0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;". retur │ │ │ │ -0000df20: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n [e._output_field_o │ │ │ │ -0000df90: 725f 6e6f 6e65 3c2f 7370 616e 3e20 3c73 r_none fo │ │ │ │ -0000dfb0: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r e in se │ │ │ │ -0000e000: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.get_source_expr │ │ │ │ -0000e040: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions() │ │ │ │ -0000e060: 5d3c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ].. de │ │ │ │ -0000e080: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f asc(sel │ │ │ │ -0000e0d0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -0000e0f0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **kwargs │ │ │ │ -0000e120: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0000e140: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0000e160: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> OrderBy(se │ │ │ │ -0000e1b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, **kwarg │ │ │ │ -0000e200: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ -0000e220: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0000e240: 203c 7370 616e 2063 6c61 7373 3d22 6e66 desc(self, **kwargs │ │ │ │ -0000e2e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000e2f0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -0000e300: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0000e320: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000e330: 4f72 6465 7242 793c 2f73 7061 6e3e 3c73 OrderBy(< │ │ │ │ -0000e350: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, desce │ │ │ │ -0000e3a0: 6e64 696e 673c 2f73 7061 6e3e 3c73 7061 nding=True │ │ │ │ -0000e3e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000e3f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , **kwargs< │ │ │ │ -0000e430: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0000e440: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0000e460: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c reverse │ │ │ │ -0000e480: 5f6f 7264 6572 696e 673c 2f73 7061 6e3e _ordering │ │ │ │ -0000e490: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000e4a0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0000e4e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ -0000e520: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0000e540: 203c 7370 616e 2063 6c61 7373 3d22 6e66 flatten │ │ │ │ -0000e560: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0000e570: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0000e5c0: 2020 2020 2020 3c2f 7370 616e 3e3c 7370 &q │ │ │ │ -0000e5e0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ +0000ca50: 7373 3d22 6f22 3e2e 3c2f 7370 616e 3e3c ss="o">.< │ │ │ │ +0000ca60: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +0000ca70: 6574 3c2f 7370 616e 3e3c 7370 616e 2063 et(self):< │ │ │ │ +0000cac0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000cad0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0000caf0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 replacement. clon │ │ │ │ +0000cb30: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = self.< │ │ │ │ +0000cb80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>copy(). │ │ │ │ +0000cbc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 source_expres │ │ │ │ +0000cbe0: 7369 6f6e 733c 2f73 7061 6e3e 203c 7370 sions = clone.get_so │ │ │ │ +0000cc50: 7572 6365 5f65 7870 7265 7373 696f 6e73 urce_expressions │ │ │ │ +0000cc60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +0000cc80: 0a20 2020 2020 2020 203c 7370 616e 2063 . clone.set │ │ │ │ +0000ccd0: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ +0000cce0: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(. < │ │ │ │ +0000cd10: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ +0000cd20: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0000cd30: 2020 2020 2020 2020 3c73 7061 6e20 636c expr.repla │ │ │ │ +0000cd80: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions(rep │ │ │ │ +0000cdc0: 6c61 6365 6d65 6e74 733c 2f73 7061 6e3e lacements │ │ │ │ +0000cdd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000cde0: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) if expr < │ │ │ │ +0000ce20: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ +0000ce30: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse None │ │ │ │ +0000ce50: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0000ce60: 2020 2020 2020 2020 3c73 7061 6e20 636c for expr < │ │ │ │ +0000cea0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +0000ceb0: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in source │ │ │ │ +0000ced0: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions. │ │ │ │ +0000cef0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000cf00: 5d3c 2f73 7061 6e3e 0a20 2020 2020 2020 ]. │ │ │ │ +0000cf10: 203c 7370 616e 2063 6c61 7373 3d22 7022 ). │ │ │ │ +0000cf30: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0000cf50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000cf60: 636c 6f6e 653c 2f73 7061 6e3e 0a0a 2020 clone.. │ │ │ │ +0000cf70: 2020 3c73 7061 6e20 636c 6173 733d 226b def ge │ │ │ │ +0000cfa0: 745f 7265 6673 3c2f 7370 616e 3e3c 7370 t_refs(self):. │ │ │ │ +0000d000: 2020 203c 7370 616e 2063 6c61 7373 3d22 refs < │ │ │ │ +0000d020: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0000d030: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c set(). │ │ │ │ +0000d070: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +0000d090: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000d0a0: 6578 7072 3c2f 7370 616e 3e20 3c73 7061 expr in< │ │ │ │ +0000d0c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.get_s │ │ │ │ +0000d110: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +0000d120: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s():. < │ │ │ │ +0000d150: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +0000d160: 6566 733c 2f73 7061 6e3e 203c 7370 616e efs |= expr │ │ │ │ +0000d1a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000d1b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .get_refs │ │ │ │ +0000d1d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +0000d1f0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +0000d210: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> refs.. def copy< │ │ │ │ +0000d270: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000d280: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ +0000d2c0: 2020 2020 203c 7370 616e 2063 6c61 7373 return copy.< │ │ │ │ +0000d310: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>copy(self).. │ │ │ │ +0000d380: 2020 203c 7370 616e 2063 6c61 7373 3d22 def p │ │ │ │ +0000d3b0: 7265 6669 785f 7265 6665 7265 6e63 6573 refix_references │ │ │ │ +0000d3c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0000d3e0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0000d3f0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, prefix):. │ │ │ │ +0000d450: 2020 203c 7370 616e 2063 6c61 7373 3d22 clone │ │ │ │ +0000d470: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000d480: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.cop │ │ │ │ +0000d4d0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y(). clone< │ │ │ │ +0000d510: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.se │ │ │ │ +0000d540: 745f 736f 7572 6365 5f65 7870 7265 7373 t_source_express │ │ │ │ +0000d550: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(. │ │ │ │ +0000d580: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000d590: 5b3c 2f73 7061 6e3e 0a20 2020 2020 2020 [. │ │ │ │ +0000d5a0: 2020 2020 2020 2020 203c 7370 616e 2063 F(f" │ │ │ │ +0000d610: 3c73 7061 6e20 636c 6173 733d 2273 6922 {prefix< │ │ │ │ +0000d640: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>}{ │ │ │ │ +0000d660: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000d670: 6578 7072 3c2f 7370 616e 3e3c 7370 616e expr.name} │ │ │ │ +0000d6c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "). │ │ │ │ +0000d700: 2020 2020 2020 2020 2020 2020 2020 3c73 if │ │ │ │ +0000d720: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ +0000d740: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(expr, F)< │ │ │ │ +0000d7c0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000d7d0: 2020 2020 2020 203c 7370 616e 2063 6c61 else expr.< │ │ │ │ +0000d820: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>prefix_ref │ │ │ │ +0000d840: 6572 656e 6365 733c 2f73 7061 6e3e 3c73 erences(< │ │ │ │ +0000d860: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>prefix). │ │ │ │ +0000d8a0: 2020 2020 2020 2020 2020 2020 3c73 7061 for< │ │ │ │ +0000d8c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> expr in s │ │ │ │ +0000d910: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.get_source_exp │ │ │ │ +0000d950: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ +0000d960: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000d970: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +0000d980: 2020 2020 203c 7370 616e 2063 6c61 7373 ]. │ │ │ │ +0000d9a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0000d9c0: 2020 2020 2020 203c 7370 616e 2063 6c61 return clone.. def get_group_by_ │ │ │ │ +0000da40: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols(self< │ │ │ │ +0000da80: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0000da90: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +0000daa0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if not< │ │ │ │ +0000dad0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.conta │ │ │ │ +0000db20: 696e 735f 6167 6772 6567 6174 653c 2f73 ins_aggregate:. │ │ │ │ +0000db50: 2020 2020 2020 2020 203c 7370 616e 2063 return< │ │ │ │ +0000db70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [< │ │ │ │ +0000db90: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0000dba0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self]. cols │ │ │ │ +0000dbe0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +0000dc00: 203c 7370 616e 2063 6c61 7373 3d22 7022 []. │ │ │ │ +0000dc20: 2020 203c 7370 616e 2063 6c61 7373 3d22 for so │ │ │ │ +0000dc50: 7572 6365 3c2f 7370 616e 3e20 3c73 7061 urce in< │ │ │ │ +0000dc70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.get_s │ │ │ │ +0000dcc0: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +0000dcd0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s():. < │ │ │ │ +0000dd00: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +0000dd10: 6f6c 733c 2f73 7061 6e3e 3c73 7061 6e20 ols.extend< │ │ │ │ +0000dd50: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000dd60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 source.get_ │ │ │ │ +0000ddb0: 6772 6f75 705f 6279 5f63 6f6c 733c 2f73 group_by_cols()). │ │ │ │ +0000dde0: 2020 2020 2020 203c 7370 616e 2063 6c61 return cols │ │ │ │ +0000de20: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +0000de40: 203c 7370 616e 2063 6c61 7373 3d22 6e66 get_source_fie │ │ │ │ +0000de60: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds(self): │ │ │ │ +0000deb0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ +0000ded0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "&q │ │ │ │ +0000def0: 756f 743b 2671 756f 743b 5265 7475 726e uot;"Return │ │ │ │ +0000df00: 2074 6865 2075 6e64 6572 6c79 696e 6720 the underlying │ │ │ │ +0000df10: 6669 656c 6420 7479 7065 7320 7573 6564 field types used │ │ │ │ +0000df20: 2062 7920 7468 6973 2061 6767 7265 6761 by this aggrega │ │ │ │ +0000df30: 7465 2e26 7175 6f74 3b26 7175 6f74 3b26 te.""& │ │ │ │ +0000df40: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +0000df50: 2020 2020 203c 7370 616e 2063 6c61 7373 return [e._outp │ │ │ │ +0000dfd0: 7574 5f66 6965 6c64 5f6f 725f 6e6f 6e65 ut_field_or_none │ │ │ │ +0000dfe0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c for e in< │ │ │ │ +0000e030: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.get_s │ │ │ │ +0000e080: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +0000e090: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s()].. def asc(< │ │ │ │ +0000e100: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, **kwargs):. │ │ │ │ +0000e190: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0000e1b0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 OrderBy< │ │ │ │ +0000e1d0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000e1e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, **kwargs).. │ │ │ │ +0000e270: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000e280: 6465 663c 2f73 7061 6e3e 203c 7370 616e def desc │ │ │ │ +0000e2a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0000e2c0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0000e2d0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, **kwa │ │ │ │ +0000e320: 7267 733c 2f73 7061 6e3e 3c73 7061 6e20 rgs):. retu │ │ │ │ +0000e360: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn OrderB │ │ │ │ +0000e380: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y( │ │ │ │ +0000e3a0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, descending< │ │ │ │ +0000e3f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=T │ │ │ │ +0000e420: 7275 653c 2f73 7061 6e3e 3c73 7061 6e20 rue, **kwar │ │ │ │ +0000e470: 6773 3c2f 7370 616e 3e3c 7370 616e 2063 gs).. def reverse_order │ │ │ │ +0000e4d0: 696e 673c 2f73 7061 6e3e 3c73 7061 6e20 ing(self): │ │ │ │ +0000e520: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0000e530: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000e540: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ +0000e560: 656c 663c 2f73 7061 6e3e 0a0a 2020 2020 elf.. │ │ │ │ +0000e570: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000e580: 6465 663c 2f73 7061 6e3e 203c 7370 616e def flat │ │ │ │ +0000e5a0: 7465 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ten(self): │ │ │ │ 0000e5f0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -0000e610: 2052 6563 7572 7369 7665 6c79 2079 6965 Recursively yie │ │ │ │ -0000e620: 6c64 2074 6869 7320 6578 7072 6573 7369 ld this expressi │ │ │ │ -0000e630: 6f6e 2061 6e64 2061 6c6c 2073 7562 6578 on and all subex │ │ │ │ -0000e640: 7072 6573 7369 6f6e 732c 2069 6e3c 2f73 pressions, in. de │ │ │ │ -0000e670: 7074 682d 6669 7273 7420 6f72 6465 722e pth-first order. │ │ │ │ -0000e680: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ -0000e6a0: 2026 7175 6f74 3b26 7175 6f74 3b26 7175 ""&qu │ │ │ │ -0000e6b0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 2020 ot;. │ │ │ │ -0000e6c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 yield │ │ │ │ -0000e6e0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self. │ │ │ │ -0000e700: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ -0000e720: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000e730: 6578 7072 3c2f 7370 616e 3e20 3c73 7061 expr in< │ │ │ │ -0000e750: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.get_s │ │ │ │ -0000e7a0: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ -0000e7b0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s():. < │ │ │ │ -0000e7e0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -0000e7f0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f expr:. │ │ │ │ -0000e830: 2020 2020 2020 2020 2020 2020 203c 7370 if< │ │ │ │ -0000e850: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> hasattr< │ │ │ │ -0000e870: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ex │ │ │ │ -0000e8a0: 7072 3c2f 7370 616e 3e3c 7370 616e 2063 pr, "flatten │ │ │ │ -0000e8e0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "):< │ │ │ │ -0000e900: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0000e910: 2020 2020 2020 2020 2020 203c 7370 616e yield │ │ │ │ -0000e930: 2066 726f 6d3c 2f73 7061 6e3e 203c 7370 from exp │ │ │ │ -0000e950: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r. │ │ │ │ -0000e970: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000e980: 666c 6174 7465 6e3c 2f73 7061 6e3e 3c73 flatten() │ │ │ │ -0000e9a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000e9b0: 2020 2020 2020 2020 3c73 7061 6e20 636c else:. │ │ │ │ -0000e9f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000ea00: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0000ea10: 7969 656c 643c 2f73 7061 6e3e 203c 7370 yield exp │ │ │ │ -0000ea30: 723c 2f73 7061 6e3e 0a0a 2020 2020 3c73 r.. de │ │ │ │ -0000ea50: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f select │ │ │ │ -0000ea70: 5f66 6f72 6d61 743c 2f73 7061 6e3e 3c73 _format(< │ │ │ │ -0000ea90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, compi │ │ │ │ -0000eae0: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler, sql, params):. │ │ │ │ -0000eb80: 2020 2020 203c 2f73 7061 6e3e 3c73 7061 &qu │ │ │ │ -0000eba0: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c ot;""< │ │ │ │ +0000e600: 6173 733d 2277 223e 2020 2020 2020 2020 ass="w"> │ │ │ │ +0000e610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "&q │ │ │ │ +0000e630: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;". Recur │ │ │ │ +0000e660: 7369 7665 6c79 2079 6965 6c64 2074 6869 sively yield thi │ │ │ │ +0000e670: 7320 6578 7072 6573 7369 6f6e 2061 6e64 s expression and │ │ │ │ +0000e680: 2061 6c6c 2073 7562 6578 7072 6573 7369 all subexpressi │ │ │ │ +0000e690: 6f6e 732c 2069 6e3c 2f73 7061 6e3e 0a3c ons, in.< │ │ │ │ +0000e6a0: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +0000e6b0: 2020 2020 2020 2020 6465 7074 682d 6669 depth-fi │ │ │ │ +0000e6c0: 7273 7420 6f72 6465 722e 3c2f 7370 616e rst order.. " │ │ │ │ +0000e6f0: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"". yie │ │ │ │ +0000e720: 6c64 3c2f 7370 616e 3e20 3c73 7061 6e20 ld self< │ │ │ │ +0000e740: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0000e750: 7370 616e 2063 6c61 7373 3d22 6b22 3e66 span class="k">f │ │ │ │ +0000e760: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or expr in │ │ │ │ +0000e7a0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.get_source_ │ │ │ │ +0000e7f0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions():. │ │ │ │ +0000e820: 2020 2020 2020 2020 203c 7370 616e 2063 if expr:< │ │ │ │ +0000e870: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0000e880: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +0000e8a0: 203c 7370 616e 2063 6c61 7373 3d22 6e62 hasattr │ │ │ │ +0000e8c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000e8d0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (expr, &qu │ │ │ │ +0000e920: 6f74 3b66 6c61 7474 656e 2671 756f 743b ot;flatten" │ │ │ │ +0000e930: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +0000e950: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0000e960: 2020 2020 203c 7370 616e 2063 6c61 7373 yield from< │ │ │ │ +0000e980: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> expr.flatte │ │ │ │ +0000e9d0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n(). │ │ │ │ +0000ea00: 2020 3c73 7061 6e20 636c 6173 733d 226b else:. │ │ │ │ +0000ea40: 2020 2020 2020 2020 2020 3c73 7061 6e20 yield< │ │ │ │ +0000ea60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> expr.. def select_forma │ │ │ │ +0000eac0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ +0000eae0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, compiler, sql │ │ │ │ +0000eb60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0000eb80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000eb90: 7061 7261 6d73 3c2f 7370 616e 3e3c 7370 params):< │ │ │ │ 0000ebb0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ -0000ebd0: 4375 7374 6f6d 2066 6f72 6d61 7420 666f Custom format fo │ │ │ │ -0000ebe0: 7220 7365 6c65 6374 2063 6c61 7573 6573 r select clauses │ │ │ │ -0000ebf0: 2e20 466f 7220 6578 616d 706c 652c 2045 . For example, E │ │ │ │ -0000ec00: 5849 5354 5320 6578 7072 6573 7369 6f6e XISTS expression │ │ │ │ -0000ec10: 7320 6e65 6564 3c2f 7370 616e 3e0a 3c73 s need. │ │ │ │ -0000ec30: 2020 2020 2020 2074 6f20 6265 2077 7261 to be wra │ │ │ │ -0000ec40: 7070 6564 2069 6e20 4341 5345 2057 4845 pped in CASE WHE │ │ │ │ -0000ec50: 4e20 6f6e 204f 7261 636c 652e 3c2f 7370 N on Oracle.. &qu │ │ │ │ -0000ec80: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c ot;""< │ │ │ │ -0000ec90: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0000eca0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -0000ecb0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f hasatt │ │ │ │ -0000ecd0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ -0000ecf0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.output_field │ │ │ │ -0000ed40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0000ed60: 3c73 7061 6e20 636c 6173 733d 2273 3222 "select_fo │ │ │ │ -0000ed80: 726d 6174 2671 756f 743b 3c2f 7370 616e rmat" < │ │ │ │ +0000ebd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ +0000ebf0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ +0000ec00: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . Custom │ │ │ │ +0000ec20: 2066 6f72 6d61 7420 666f 7220 7365 6c65 format for sele │ │ │ │ +0000ec30: 6374 2063 6c61 7573 6573 2e20 466f 7220 ct clauses. For │ │ │ │ +0000ec40: 6578 616d 706c 652c 2045 5849 5354 5320 example, EXISTS │ │ │ │ +0000ec50: 6578 7072 6573 7369 6f6e 7320 6e65 6564 expressions need │ │ │ │ +0000ec60: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . │ │ │ │ +0000ec80: 2074 6f20 6265 2077 7261 7070 6564 2069 to be wrapped i │ │ │ │ +0000ec90: 6e20 4341 5345 2057 4845 4e20 6f6e 204f n CASE WHEN on O │ │ │ │ +0000eca0: 7261 636c 652e 3c2f 7370 616e 3e0a 3c73 racle.. │ │ │ │ +0000ecc0: 2020 2020 2020 2026 7175 6f74 3b26 7175 "&qu │ │ │ │ +0000ecd0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ +0000ece0: 0a20 2020 2020 2020 203c 7370 616e 2063 . if hasattr(self< │ │ │ │ +0000ed50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ou │ │ │ │ +0000ed80: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field):. │ │ │ │ -0000edb0: 2020 2020 2020 203c 7370 616e 2063 6c61 return self.output_ │ │ │ │ -0000ee20: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.select_forma │ │ │ │ -0000ee60: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ -0000ee80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000ee90: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0000eea0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0000eeb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c sql, param │ │ │ │ -0000ef00: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ -0000ef20: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0000ef40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> sql, params │ │ │ │ -0000ef90: 3c2f 7370 616e 3e0a 0a0a 3c64 6976 2063 ....... │ │ │ │ +00010460: 3c73 7061 6e20 636c 6173 733d 2263 3122 # Type inferenc │ │ │ │ +00010480: 6520 666f 7220 436f 6d62 696e 6564 4578 e for CombinedEx │ │ │ │ +00010490: 7072 6573 7369 6f6e 2e6f 7574 7075 745f pression.output_ │ │ │ │ +000104a0: 6669 656c 642e 3c2f 7370 616e 3e0a 3c73 field..# │ │ │ │ +000104c0: 204d 6973 7369 6e67 2069 7465 6d73 2077 Missing items w │ │ │ │ +000104d0: 696c 6c20 7265 7375 6c74 2069 6e20 4669 ill result in Fi │ │ │ │ +000104e0: 656c 6445 7272 6f72 2c20 6279 2064 6573 eldError, by des │ │ │ │ +000104f0: 6967 6e2e 3c2f 7370 616e 3e0a 3c73 7061 ign..#.# The cur │ │ │ │ +00010530: 7265 6e74 2061 7070 726f 6163 6820 666f rent approach fo │ │ │ │ +00010540: 7220 4e55 4c4c 2069 7320 6261 7365 6420 r NULL is based │ │ │ │ +00010550: 6f6e 206c 6f77 6573 7420 636f 6d6d 6f6e on lowest common │ │ │ │ +00010560: 2064 656e 6f6d 696e 6174 6f72 2062 6568 denominator beh │ │ │ │ +00010570: 6176 696f 723c 2f73 7061 6e3e 0a3c 7370 avior.# │ │ │ │ +00010590: 692e 652e 2069 6620 6f6e 6520 6f66 2074 i.e. if one of t │ │ │ │ +000105a0: 6865 2073 7570 706f 7274 6564 2064 6174 he supported dat │ │ │ │ +000105b0: 6162 6173 6573 2069 7320 7261 6973 696e abases is raisin │ │ │ │ +000105c0: 6720 616e 2065 7272 6f72 2028 7261 7468 g an error (rath │ │ │ │ +000105d0: 6572 2074 6861 6e3c 2f73 7061 6e3e 0a3c er than.< │ │ │ │ +000105e0: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ +000105f0: 2320 7265 7475 726e 204e 554c 4c29 2066 # return NULL) f │ │ │ │ +00010600: 6f72 2060 7661 6c20 266c 743b 6f70 2667 or `val <op&g │ │ │ │ +00010610: 743b 204e 554c 4c60 2c20 7468 656e 2044 t; NULL`, then D │ │ │ │ +00010620: 6a61 6e67 6f20 7261 6973 6573 2046 6965 jango raises Fie │ │ │ │ +00010630: 6c64 4572 726f 722e 3c2f 7370 616e 3e0a ldError.. │ │ │ │ +00010640: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00010650: 4e6f 6e65 5479 7065 3c2f 7370 616e 3e20 NoneType │ │ │ │ +00010660: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00010670: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = type(No │ │ │ │ +000106c0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne).._connector_co │ │ │ │ +00010700: 6d62 696e 6174 696f 6e73 3c2f 7370 616e mbinations = [. # Numer │ │ │ │ +00010760: 6963 206f 7065 7261 7469 6f6e 7320 2d20 ic operations - │ │ │ │ +00010770: 6f70 6572 616e 6473 206f 6620 7361 6d65 operands of same │ │ │ │ +00010780: 2074 7970 652e 3c2f 7370 616e 3e0a 2020 type.. │ │ │ │ +00010790: 2020 3c73 7061 6e20 636c 6173 733d 2270 {. │ │ │ │ +000107b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 connector: [. │ │ │ │ +00010810: 203c 7370 616e 2063 6c61 7373 3d22 7022 (fields< │ │ │ │ +00010840: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.In │ │ │ │ +00010870: 7465 6765 7246 6965 6c64 3c2f 7370 616e tegerField, fields │ │ │ │ +000108b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000108d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e49 span class="n">I │ │ │ │ +000108e0: 6e74 6567 6572 4669 656c 643c 2f73 7061 ntegerField, field │ │ │ │ +00010920: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00010940: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00010950: 496e 7465 6765 7246 6965 6c64 3c2f 7370 IntegerField),. │ │ │ │ +00010980: 2020 2020 2020 2020 203c 7370 616e 2063 (fields.< │ │ │ │ +000109d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>FloatField │ │ │ │ +000109f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00010a10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00010a20: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.FloatField< │ │ │ │ +00010a60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00010a80: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00010a90: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.FloatField),. │ │ │ │ +00010af0: 2020 2020 2020 2020 2020 203c 7370 616e (fields │ │ │ │ +00010b30: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00010b40: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DecimalF │ │ │ │ +00010b60: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield, fields.Decimal │ │ │ │ +00010bd0: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field, fields.Decima │ │ │ │ +00010c40: 6c46 6965 6c64 3c2f 7370 616e 3e3c 7370 lField),< │ │ │ │ +00010c60: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00010c70: 7370 616e 2063 6c61 7373 3d22 7022 3e5d span class="p">] │ │ │ │ +00010c80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00010c90: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00010ca0: 666f 723c 2f73 7061 6e3e 203c 7370 616e for conne │ │ │ │ +00010cc0: 6374 6f72 3c2f 7370 616e 3e20 3c73 7061 ctor in< │ │ │ │ +00010ce0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (. │ │ │ │ +00010d00: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ +00010d20: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.ADD< │ │ │ │ +00010d60: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00010d70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00010d80: 2020 2020 3c73 7061 6e20 636c 6173 733d Combinable.SUB │ │ │ │ +00010dd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ +00010df0: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ +00010e10: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.MUL< │ │ │ │ +00010e50: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00010e60: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00010e70: 2020 2020 3c73 7061 6e20 636c 6173 733d # Behavior │ │ │ │ +00010e90: 666f 7220 4449 5620 7769 7468 2069 6e74 for DIV with int │ │ │ │ +00010ea0: 6567 6572 2061 7267 756d 656e 7473 2066 eger arguments f │ │ │ │ +00010eb0: 6f6c 6c6f 7773 2050 6f73 7467 7265 732f ollows Postgres/ │ │ │ │ +00010ec0: 5351 4c69 7465 2c3c 2f73 7061 6e3e 0a20 SQLite,. │ │ │ │ +00010ed0: 2020 2020 2020 2020 2020 203c 7370 616e # no │ │ │ │ +00010ef0: 7420 4d79 5351 4c2f 4f72 6163 6c65 2e3c t MySQL/Oracle.< │ │ │ │ +00010f00: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00010f10: 2020 203c 7370 616e 2063 6c61 7373 3d22 Combinable.DIV< │ │ │ │ +00010f60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00010f80: 2020 2020 2020 2020 2020 203c 7370 616e Combi │ │ │ │ +00010fa0: 6e61 626c 653c 2f73 7061 6e3e 3c73 7061 nable.MOD,< │ │ │ │ +00010ff0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00011000: 2020 203c 7370 616e 2063 6c61 7373 3d22 Combinable.POW< │ │ │ │ +00011050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00011070: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ +00011090: 2020 2020 3c73 7061 6e20 636c 6173 733d },. │ │ │ │ +000110b0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # Numeric ope │ │ │ │ +000110d0: 7261 7469 6f6e 7320 2d20 6f70 6572 616e rations - operan │ │ │ │ +000110e0: 6473 206f 6620 6469 6666 6572 656e 7420 ds of different │ │ │ │ +000110f0: 7479 7065 2e3c 2f73 7061 6e3e 0a20 2020 type.. │ │ │ │ +00011100: 203c 7370 616e 2063 6c61 7373 3d22 7022 {. │ │ │ │ +00011120: 2020 3c73 7061 6e20 636c 6173 733d 226e connector: [. │ │ │ │ +00011180: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011190: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (fields.Int │ │ │ │ +000111e0: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ +000111f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011200: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ +00011220: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.De │ │ │ │ +00011250: 6369 6d61 6c46 6965 6c64 3c2f 7370 616e cimalField, fields │ │ │ │ +00011290: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000112b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ +000112c0: 6563 696d 616c 4669 656c 643c 2f73 7061 ecimalField),. │ │ │ │ +000112f0: 2020 2020 2020 2020 3c73 7061 6e20 636c ( │ │ │ │ +00011310: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00011320: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DecimalFiel │ │ │ │ +00011360: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00011380: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +000113b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>IntegerFie │ │ │ │ +000113d0: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ +00011410: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00011420: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DecimalFi │ │ │ │ +00011440: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. │ │ │ │ +00011470: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011480: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (fields.Int │ │ │ │ +000114d0: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ +000114e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000114f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ +00011510: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Fl │ │ │ │ +00011540: 6f61 7446 6965 6c64 3c2f 7370 616e 3e3c oatField< │ │ │ │ +00011550: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00011560: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Flo │ │ │ │ +000115b0: 6174 4669 656c 643c 2f73 7061 6e3e 3c73 atField), │ │ │ │ +000115d0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000115e0: 2020 2020 3c73 7061 6e20 636c 6173 733d (fiel │ │ │ │ +00011610: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.FloatField, field │ │ │ │ +00011680: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +000116a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000116b0: 496e 7465 6765 7246 6965 6c64 3c2f 7370 IntegerField, fiel │ │ │ │ +000116f0: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.FloatField),. │ │ │ │ +00011750: 2020 2020 3c73 7061 6e20 636c 6173 733d ]. │ │ │ │ +00011770: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +00011790: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000117a0: 636f 6e6e 6563 746f 723c 2f73 7061 6e3e connector │ │ │ │ +000117b0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in (. │ │ │ │ +000117f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.ADD,. │ │ │ │ +00011860: 2020 2020 2020 2020 203c 7370 616e 2063 Combina │ │ │ │ +00011880: 626c 653c 2f73 7061 6e3e 3c73 7061 6e20 ble.SUB,. │ │ │ │ +000118e0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.MUL,. │ │ │ │ +00011950: 2020 2020 2020 2020 203c 7370 616e 2063 Combina │ │ │ │ +00011970: 626c 653c 2f73 7061 6e3e 3c73 7061 6e20 ble.DIV,. │ │ │ │ +000119d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.MOD,. │ │ │ │ +00011a40: 2020 2020 203c 7370 616e 2063 6c61 7373 ). │ │ │ │ +00011a60: 2020 3c73 7061 6e20 636c 6173 733d 2270 },. │ │ │ │ +00011a80: 3c73 7061 6e20 636c 6173 733d 2263 3122 # Bitwise opera │ │ │ │ +00011aa0: 746f 7273 2e3c 2f73 7061 6e3e 0a20 2020 tors.. │ │ │ │ +00011ab0: 203c 7370 616e 2063 6c61 7373 3d22 7022 {. │ │ │ │ +00011ad0: 2020 3c73 7061 6e20 636c 6173 733d 226e connector: [. │ │ │ │ +00011b30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011b40: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (fields.Int │ │ │ │ +00011b90: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ +00011ba0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011bb0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ +00011bd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.In │ │ │ │ +00011c00: 7465 6765 7246 6965 6c64 3c2f 7370 616e tegerField, fields │ │ │ │ +00011c40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00011c60: 7370 616e 2063 6c61 7373 3d22 6e22 3e49 span class="n">I │ │ │ │ +00011c70: 6e74 6567 6572 4669 656c 643c 2f73 7061 ntegerField),. │ │ │ │ +00011ca0: 2020 2020 3c73 7061 6e20 636c 6173 733d ]. │ │ │ │ +00011cc0: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +00011ce0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00011cf0: 636f 6e6e 6563 746f 723c 2f73 7061 6e3e connector │ │ │ │ +00011d00: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in (. │ │ │ │ +00011d40: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.BITAND │ │ │ │ +00011d90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ +00011db0: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ +00011dd0: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.BITOR,. │ │ │ │ +00011e30: 2020 2020 2020 3c73 7061 6e20 636c 6173 Combinable │ │ │ │ +00011e50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00011e70: 7370 616e 2063 6c61 7373 3d22 6e22 3e42 span class="n">B │ │ │ │ +00011e80: 4954 4c45 4654 5348 4946 543c 2f73 7061 ITLEFTSHIFT,. │ │ │ │ +00011eb0: 2020 2020 2020 203c 7370 616e 2063 6c61 Combinabl │ │ │ │ +00011ed0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ +00011ef0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00011f00: 4249 5452 4947 4854 5348 4946 543c 2f73 BITRIGHTSHIFT,. │ │ │ │ +00011f30: 2020 2020 2020 2020 203c 7370 616e 2063 Combina │ │ │ │ +00011f50: 626c 653c 2f73 7061 6e3e 3c73 7061 6e20 ble.BITXOR< │ │ │ │ +00011f90: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00011fa0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00011fb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00011fc0: 293c 2f73 7061 6e3e 0a20 2020 203c 7370 ). },< │ │ │ │ +00011fe0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. # Nu │ │ │ │ +00012000: 6d65 7269 6320 7769 7468 204e 554c 4c2e meric with NULL. │ │ │ │ +00012010: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . {. con │ │ │ │ +00012050: 6e65 6374 6f72 3c2f 7370 616e 3e3c 7370 nector: [. │ │ │ │ +00012090: 2020 2020 2020 2020 2020 203c 7370 616e (field_type, Non │ │ │ │ +00012100: 6554 7970 653c 2f73 7061 6e3e 3c73 7061 eType, field_type< │ │ │ │ +00012140: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),. │ │ │ │ +00012160: 2020 2020 2020 2020 2020 2020 3c73 7061 (NoneType, fiel │ │ │ │ +000121d0: 645f 7479 7065 3c2f 7370 616e 3e3c 7370 d_type, field_type │ │ │ │ +00012210: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ), │ │ │ │ +00012230: 0a20 2020 2020 2020 203c 7370 616e 2063 . ]. for connector in │ │ │ │ +000122b0: 203c 7370 616e 2063 6c61 7373 3d22 7022 (. │ │ │ │ +000122d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 Combinable │ │ │ │ +000122f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00012310: 7370 616e 2063 6c61 7373 3d22 6e22 3e41 span class="n">A │ │ │ │ +00012320: 4444 3c2f 7370 616e 3e3c 7370 616e 2063 DD,. Co │ │ │ │ +00012360: 6d62 696e 6162 6c65 3c2f 7370 616e 3e3c mbinable< │ │ │ │ +00012370: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00012380: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 SUB,. │ │ │ │ +000123c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 Combinable │ │ │ │ +000123e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00012400: 7370 616e 2063 6c61 7373 3d22 6e22 3e4d span class="n">M │ │ │ │ +00012410: 554c 3c2f 7370 616e 3e3c 7370 616e 2063 UL,. Co │ │ │ │ +00012450: 6d62 696e 6162 6c65 3c2f 7370 616e 3e3c mbinable< │ │ │ │ +00012460: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00012470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DIV,. │ │ │ │ +000124b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 Combinable │ │ │ │ +000124d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000124f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e4d span class="n">M │ │ │ │ +00012500: 4f44 3c2f 7370 616e 3e3c 7370 616e 2063 OD,. Co │ │ │ │ +00012540: 6d62 696e 6162 6c65 3c2f 7370 616e 3e3c mbinable< │ │ │ │ +00012550: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00012560: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 POW,. │ │ │ │ +000125a0: 2020 3c73 7061 6e20 636c 6173 733d 2270 ). │ │ │ │ +000125c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for fi │ │ │ │ +000125f0: 656c 645f 7479 7065 3c2f 7370 616e 3e20 eld_type │ │ │ │ +00012600: 3c73 7061 6e20 636c 6173 733d 226f 7722 in (fields │ │ │ │ +00012650: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00012660: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .IntegerF │ │ │ │ +00012680: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield, fields.Decimal │ │ │ │ +000126f0: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field, fields.FloatF │ │ │ │ +00012760: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield). },. # Date/Da │ │ │ │ +000127c0: 7465 5469 6d65 4669 656c 642f 4475 7261 teTimeField/Dura │ │ │ │ +000127d0: 7469 6f6e 4669 656c 642f 5469 6d65 4669 tionField/TimeFi │ │ │ │ +000127e0: 656c 642e 3c2f 7370 616e 3e0a 2020 2020 eld.. │ │ │ │ +000127f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00012800: 7b3c 2f73 7061 6e3e 0a20 2020 2020 2020 {. │ │ │ │ +00012810: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.ADD: [. │ │ │ │ +000128a0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # Date/DateTi │ │ │ │ +000128c0: 6d65 4669 656c 642e 3c2f 7370 616e 3e0a meField.. │ │ │ │ +000128d0: 2020 2020 2020 2020 2020 2020 3c73 7061 (fields.DateFie │ │ │ │ +00012940: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ +00012980: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00012990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DurationF │ │ │ │ +000129b0: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield, fields.DateTim │ │ │ │ +00012a20: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField),< │ │ │ │ +00012a40: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00012a50: 2020 203c 7370 616e 2063 6c61 7373 3d22 (field │ │ │ │ +00012a80: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00012aa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00012ab0: 4461 7465 5469 6d65 4669 656c 643c 2f73 DateTimeField, fie │ │ │ │ +00012af0: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DurationField< │ │ │ │ +00012b30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00012b50: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00012b60: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateTimeFiel │ │ │ │ +00012ba0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. (< │ │ │ │ +00012be0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.Durat │ │ │ │ +00012c30: 696f 6e46 6965 6c64 3c2f 7370 616e 3e3c ionField< │ │ │ │ +00012c40: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00012c50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dat │ │ │ │ +00012ca0: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField, fields.DateT │ │ │ │ +00012d10: 696d 6546 6965 6c64 3c2f 7370 616e 3e3c imeField< │ │ │ │ +00012d20: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00012d30: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ +00012d40: 2020 2020 203c 7370 616e 2063 6c61 7373 (fie │ │ │ │ +00012d70: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DurationField< │ │ │ │ +00012db0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00012dd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00012de0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateTimeFiel │ │ │ │ +00012e20: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00012e40: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +00012e70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DateTimeFi │ │ │ │ +00012e90: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. │ │ │ │ +00012ec0: 3c73 7061 6e20 636c 6173 733d 2263 3122 # DurationField │ │ │ │ +00012ee0: 2e3c 2f73 7061 6e3e 0a20 2020 2020 2020 .. │ │ │ │ +00012ef0: 2020 2020 203c 7370 616e 2063 6c61 7373 (fie │ │ │ │ +00012f20: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DurationField< │ │ │ │ +00012f60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00012f80: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00012f90: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ +00012fd0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00012ff0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +00013020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DurationFi │ │ │ │ +00013040: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. │ │ │ │ +00013070: 3c73 7061 6e20 636c 6173 733d 2263 3122 # TimeField.. │ │ │ │ +000130a0: 203c 7370 616e 2063 6c61 7373 3d22 7022 (fields< │ │ │ │ +000130d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Ti │ │ │ │ +00013100: 6d65 4669 656c 643c 2f73 7061 6e3e 3c73 meField,< │ │ │ │ +00013120: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Dura │ │ │ │ +00013170: 7469 6f6e 4669 656c 643c 2f73 7061 6e3e tionField │ │ │ │ +00013180: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00013190: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ +000131b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Ti │ │ │ │ +000131e0: 6d65 4669 656c 643c 2f73 7061 6e3e 3c73 meField), │ │ │ │ +00013200: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00013210: 2020 2020 3c73 7061 6e20 636c 6173 733d (fiel │ │ │ │ +00013240: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.DurationField, fi │ │ │ │ +000132b0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.TimeField, fiel │ │ │ │ +00013320: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.TimeField),. │ │ │ │ +00013380: 2020 203c 7370 616e 2063 6c61 7373 3d22 ],. │ │ │ │ +000133a0: 203c 7370 616e 2063 6c61 7373 3d22 7022 },. < │ │ │ │ +000133c0: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ +000133d0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000133e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000133f0: 436f 6d62 696e 6162 6c65 3c2f 7370 616e Combinable.SUB: [. │ │ │ │ +00013470: 203c 7370 616e 2063 6c61 7373 3d22 6331 # Date/DateTim │ │ │ │ +00013490: 6546 6965 6c64 2e3c 2f73 7061 6e3e 0a20 eField.. │ │ │ │ +000134a0: 2020 2020 2020 2020 2020 203c 7370 616e (fields │ │ │ │ +000134e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000134f0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DateFiel │ │ │ │ +00013510: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00013530: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +00013560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DurationFi │ │ │ │ +00013580: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, fields │ │ │ │ +000135c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000135d0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DateTime │ │ │ │ +000135f0: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field),. │ │ │ │ +00013620: 2020 3c73 7061 6e20 636c 6173 733d 2270 (fields │ │ │ │ +00013650: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00013670: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ +00013680: 6174 6554 696d 6546 6965 6c64 3c2f 7370 ateTimeField, fiel │ │ │ │ +000136c0: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.DurationField, fi │ │ │ │ +00013730: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.DateTimeField │ │ │ │ +00013770: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ), │ │ │ │ +00013790: 0a20 2020 2020 2020 2020 2020 203c 7370 . (fields.DateFi │ │ │ │ +00013800: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, fields │ │ │ │ +00013840: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00013850: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DateFiel │ │ │ │ +00013870: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00013890: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +000138c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DurationFi │ │ │ │ +000138e0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. │ │ │ │ +00013910: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00013920: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (fields.Dat │ │ │ │ +00013970: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField, fields.DateT │ │ │ │ +000139e0: 696d 6546 6965 6c64 3c2f 7370 616e 3e3c imeField< │ │ │ │ +000139f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00013a00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dur │ │ │ │ +00013a50: 6174 696f 6e46 6965 6c64 3c2f 7370 616e ationField),. │ │ │ │ +00013a80: 2020 2020 2020 203c 7370 616e 2063 6c61 (< │ │ │ │ +00013aa0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00013ab0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateTimeFiel │ │ │ │ +00013af0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +00013b10: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +00013b40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DateField< │ │ │ │ +00013b60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00013b80: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00013b90: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ +00013bd0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. (< │ │ │ │ +00013c10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.DateT │ │ │ │ +00013c60: 696d 6546 6965 6c64 3c2f 7370 616e 3e3c imeField< │ │ │ │ +00013c70: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00013c80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dat │ │ │ │ +00013cd0: 6554 696d 6546 6965 6c64 3c2f 7370 616e eTimeField, fields │ │ │ │ +00013d10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00013d30: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ +00013d40: 7572 6174 696f 6e46 6965 6c64 3c2f 7370 urationField),. │ │ │ │ +00013d70: 2020 2020 2020 2020 203c 7370 616e 2063 # Dura │ │ │ │ +00013d90: 7469 6f6e 4669 656c 642e 3c2f 7370 616e tionField.. (< │ │ │ │ +00013dc0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.Durat │ │ │ │ +00013e10: 696f 6e46 6965 6c64 3c2f 7370 616e 3e3c ionField< │ │ │ │ +00013e20: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00013e30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dur │ │ │ │ +00013e80: 6174 696f 6e46 6965 6c64 3c2f 7370 616e ationField, fields │ │ │ │ +00013ec0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00013ee0: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ +00013ef0: 7572 6174 696f 6e46 6965 6c64 3c2f 7370 urationField),. │ │ │ │ +00013f20: 2020 2020 2020 2020 203c 7370 616e 2063 # Time │ │ │ │ +00013f40: 4669 656c 642e 3c2f 7370 616e 3e0a 2020 Field.. │ │ │ │ +00013f50: 2020 2020 2020 2020 2020 3c73 7061 6e20 (fields< │ │ │ │ +00013f90: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00013fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 TimeField │ │ │ │ +00013fc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00013fe0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00013ff0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DurationFie │ │ │ │ +00014030: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ +00014070: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00014080: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 TimeField │ │ │ │ +000140a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ), │ │ │ │ +000140c0: 0a20 2020 2020 2020 2020 2020 203c 7370 . (fields.TimeFi │ │ │ │ +00014130: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, fields │ │ │ │ +00014170: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00014180: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .TimeFiel │ │ │ │ +000141a0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ +000141c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ +000141f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DurationFi │ │ │ │ +00014210: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. ],. },.].._c │ │ │ │ +000142a0: 6f6e 6e65 6374 6f72 5f63 6f6d 6269 6e61 onnector_combina │ │ │ │ +000142b0: 746f 7273 3c2f 7370 616e 3e20 3c73 7061 tors = defaultdict │ │ │ │ +000142f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00014310: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00014320: 6c69 7374 3c2f 7370 616e 3e3c 7370 616e list)...def │ │ │ │ +00014360: 203c 7370 616e 2063 6c61 7373 3d22 6e66 register_combi │ │ │ │ +00014380: 6e61 626c 655f 6669 656c 6473 3c2f 7370 nable_fields(lhs, co │ │ │ │ +000143f0: 6e6e 6563 746f 723c 2f73 7061 6e3e 3c73 nnector,< │ │ │ │ +00014410: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> rhs, result │ │ │ │ +00014460: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00014480: 0a3c 7370 616e 2063 6c61 7373 3d22 7722 . &qu │ │ │ │ +000144b0: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c ot;""< │ │ │ │ +000144c0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. Regi │ │ │ │ +000144e0: 7374 6572 2063 6f6d 6269 6e61 626c 6520 ster combinable │ │ │ │ +000144f0: 7479 7065 733a 3c2f 7370 616e 3e0a 3c73 types:. │ │ │ │ +00014510: 2020 2020 2020 206c 6873 2026 6c74 3b63 lhs <c │ │ │ │ +00014520: 6f6e 6e65 6374 6f72 2667 743b 2072 6873 onnector> rhs │ │ │ │ +00014530: 202d 2667 743b 2072 6573 756c 743c 2f73 -> result. e.g.. r │ │ │ │ +00014580: 6567 6973 7465 725f 636f 6d62 696e 6162 egister_combinab │ │ │ │ +00014590: 6c65 5f66 6965 6c64 7328 3c2f 7370 616e le_fields(. I │ │ │ │ +000145c0: 6e74 6567 6572 4669 656c 642c 2043 6f6d ntegerField, Com │ │ │ │ +000145d0: 6269 6e61 626c 652e 4144 442c 2046 6c6f binable.ADD, Flo │ │ │ │ +000145e0: 6174 4669 656c 642c 2046 6c6f 6174 4669 atField, FloatFi │ │ │ │ +000145f0: 656c 643c 2f73 7061 6e3e 0a3c 7370 616e eld. │ │ │ │ +00014610: 2020 2020 293c 2f73 7061 6e3e 0a3c 7370 ). │ │ │ │ +00014630: 2020 2671 756f 743b 2671 756f 743b 2671 ""&q │ │ │ │ +00014640: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ +00014650: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00014660: 5f63 6f6e 6e65 6374 6f72 5f63 6f6d 6269 _connector_combi │ │ │ │ +00014670: 6e61 746f 7273 3c2f 7370 616e 3e3c 7370 nators[connector].append((lhs, rh │ │ │ │ +00014760: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ +00014780: 203c 7370 616e 2063 6c61 7373 3d22 6e22 result)) │ │ │ │ +000147b0: 3c2f 7370 616e 3e0a 0a0a 3c73 7061 6e20 ...for d i │ │ │ │ +00014800: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n _connec │ │ │ │ +00014820: 746f 725f 636f 6d62 696e 6174 696f 6e73 tor_combinations │ │ │ │ +00014830: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +00014850: 2020 2020 3c73 7061 6e20 636c 6173 733d for < │ │ │ │ +00014870: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00014880: 6f6e 6e65 6374 6f72 3c2f 7370 616e 3e3c onnector< │ │ │ │ +00014890: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000148a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c field_ty │ │ │ │ +000148c0: 7065 733c 2f73 7061 6e3e 203c 7370 616e pes in d.< │ │ │ │ +00014910: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>items():. │ │ │ │ +00014950: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +00014970: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00014980: 6c68 733c 2f73 7061 6e3e 3c73 7061 6e20 lhs, rhs, result in < │ │ │ │ +00014a10: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00014a20: 6965 6c64 5f74 7970 6573 3c2f 7370 616e ield_types:. │ │ │ │ +00014a50: 2020 2020 2020 3c73 7061 6e20 636c 6173 register_c │ │ │ │ +00014a70: 6f6d 6269 6e61 626c 655f 6669 656c 6473 ombinable_fields │ │ │ │ +00014a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00014aa0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6c span class="n">l │ │ │ │ +00014ab0: 6873 3c2f 7370 616e 3e3c 7370 616e 2063 hs, connector, rhs, re │ │ │ │ +00014b50: 7375 6c74 3c2f 7370 616e 3e3c 7370 616e sult)...@functool │ │ │ │ +00014b90: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00014bb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00014bc0: 6c72 755f 6361 6368 653c 2f73 7061 6e3e lru_cache │ │ │ │ +00014bd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00014be0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (maxsize< │ │ │ │ +00014c00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=1 │ │ │ │ +00014c30: 3238 3c2f 7370 616e 3e3c 7370 616e 2063 28).def _r │ │ │ │ +00014c80: 6573 6f6c 7665 5f63 6f6d 6269 6e65 645f esolve_combined_ │ │ │ │ +00014c90: 7479 7065 3c2f 7370 616e 3e3c 7370 616e type(connector, lhs_ │ │ │ │ +00014d00: 7479 7065 3c2f 7370 616e 3e3c 7370 616e type, rhs_type):. │ │ │ │ +00014d60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 combinators = _co │ │ │ │ +00014db0: 6e6e 6563 746f 725f 636f 6d62 696e 6174 nnector_combinat │ │ │ │ +00014dc0: 6f72 733c 2f73 7061 6e3e 3c73 7061 6e20 ors.get(connector, ()) │ │ │ │ +00014e60: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . for< │ │ │ │ +00014e80: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> combinato │ │ │ │ +00014ea0: 725f 6c68 735f 7479 7065 3c2f 7370 616e r_lhs_type, combin │ │ │ │ +00014ee0: 6174 6f72 5f72 6873 5f74 7970 653c 2f73 ator_rhs_type, com │ │ │ │ +00014f20: 6269 6e65 645f 7479 7065 3c2f 7370 616e bined_type in com │ │ │ │ +00014f60: 6269 6e61 746f 7273 3c2f 7370 616e 3e3c binators< │ │ │ │ +00014f70: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00014f80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00014f90: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00014fa0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if issub │ │ │ │ +00014fc0: 636c 6173 733c 2f73 7061 6e3e 3c73 7061 class(lhs_type, comb │ │ │ │ +00015030: 696e 6174 6f72 5f6c 6873 5f74 7970 653c inator_lhs_type< │ │ │ │ +00015040: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ +00015060: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +00015070: 616e 643c 2f73 7061 6e3e 203c 7370 616e and issu │ │ │ │ +00015090: 6263 6c61 7373 3c2f 7370 616e 3e3c 7370 bclass(. │ │ │ │ +000150c0: 2020 3c73 7061 6e20 636c 6173 733d 226e rhs_type, combin │ │ │ │ +00015110: 6174 6f72 5f72 6873 5f74 7970 653c 2f73 ator_rhs_type. ):< │ │ │ │ +00015140: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00015150: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00015170: 203c 7370 616e 2063 6c61 7373 3d22 6e22 combined_type...class CombinedEx │ │ │ │ +000151d0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +000151e0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000151f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 SQLiteNum │ │ │ │ +00015210: 6572 6963 4d69 7869 6e3c 2f73 7061 6e3e ericMixin │ │ │ │ +00015220: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00015230: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , Express │ │ │ │ +00015250: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. def __init__(self │ │ │ │ +000152e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00015300: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00015310: 6c68 733c 2f73 7061 6e3e 3c73 7061 6e20 lhs, connector, rhs< │ │ │ │ +00015380: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +000153a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +000153b0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field=None< │ │ │ │ +000153f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00015410: 2020 2020 2020 2020 3c73 7061 6e20 636c super().< │ │ │ │ +00015460: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__init__< │ │ │ │ +00015480: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ou │ │ │ │ +000154b0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field=output_ │ │ │ │ +000154f0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field). se │ │ │ │ +00015530: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.connector = conne │ │ │ │ +000155a0: 6374 6f72 3c2f 7370 616e 3e0a 2020 2020 ctor. │ │ │ │ +000155b0: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +000155d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000155e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .lhs = lhs< │ │ │ │ +00015630: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00015640: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00015650: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.rhs =< │ │ │ │ +000156a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> rhs.. def __repr__(self< │ │ │ │ +00015730: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00015750: 2020 2020 2020 2020 3c73 7061 6e20 636c return "< │ │ │ │ +00015790: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;{}: {}< │ │ │ │ +000157e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>>" │ │ │ │ +00015800: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;. │ │ │ │ +00015820: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00015830: 666f 726d 6174 3c2f 7370 616e 3e3c 7370 format(self.__clas │ │ │ │ +000158a0: 735f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 s__.__name__, self │ │ │ │ +00015910: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00015930: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +00015950: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __str__< │ │ │ │ +00015970: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00015980: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ +000159c0: 2020 2020 203c 7370 616e 2063 6c61 7373 return "{} {} │ │ │ │ +00015a60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 {}"< │ │ │ │ +00015aa0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00015ab0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 format(sel │ │ │ │ +00015b00: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00015b20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00015b30: 6c68 733c 2f73 7061 6e3e 3c73 7061 6e20 lhs, self< │ │ │ │ +00015b70: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00015b80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 connector │ │ │ │ +00015ba0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00015bc0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.rhs)< │ │ │ │ +00015c20: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +00015c40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_sour │ │ │ │ +00015c60: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions(se │ │ │ │ +00015ca0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ +00015ce0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n [self.lhs< │ │ │ │ +00015d50: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00015d60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.rhs< │ │ │ │ +00015db0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>].. │ │ │ │ +00015dd0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00015df0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00015e00: 7365 745f 736f 7572 6365 5f65 7870 7265 set_source_expre │ │ │ │ +00015e10: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions(self, exprs< │ │ │ │ +00015e80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00015ea0: 2020 2020 2020 2020 3c73 7061 6e20 636c self.lhs< │ │ │ │ +00015ef0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00015f10: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00015f20: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.rhs =< │ │ │ │ +00015f70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> exprs.. def _resolve_ou │ │ │ │ +00015fd0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field(self):. │ │ │ │ +00016030: 2020 2020 2020 203c 7370 616e 2063 6c61 # We avo │ │ │ │ +00016050: 6964 2075 7369 6e67 2073 7570 6572 2829 id using super() │ │ │ │ +00016060: 2068 6572 6520 666f 7220 7265 6173 6f6e here for reason │ │ │ │ +00016070: 7320 6769 7665 6e20 696e 3c2f 7370 616e s given in. # Exp │ │ │ │ +000160a0: 7265 7373 696f 6e2e 5f72 6573 6f6c 7665 ression._resolve │ │ │ │ +000160b0: 5f6f 7574 7075 745f 6669 656c 6428 293c _output_field()< │ │ │ │ +000160c0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +000160d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +000160e0: 6f6d 6269 6e65 645f 7479 7065 3c2f 7370 ombined_type = _re │ │ │ │ +00016120: 736f 6c76 655f 636f 6d62 696e 6564 5f74 solve_combined_t │ │ │ │ +00016130: 7970 653c 2f73 7061 6e3e 3c73 7061 6e20 ype(. < │ │ │ │ +00016160: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00016170: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.connector,. │ │ │ │ +000161d0: 2020 2020 2020 2020 3c73 7061 6e20 636c type(sel │ │ │ │ +00016220: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00016240: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00016250: 6c68 733c 2f73 7061 6e3e 3c73 7061 6e20 lhs._output_field_ │ │ │ │ +00016290: 6f72 5f6e 6f6e 653c 2f73 7061 6e3e 3c73 or_none), │ │ │ │ +000162b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000162c0: 2020 2020 3c73 7061 6e20 636c 6173 733d type │ │ │ │ +000162e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000162f0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.rhs< │ │ │ │ +00016340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._o │ │ │ │ +00016370: 7574 7075 745f 6669 656c 645f 6f72 5f6e utput_field_or_n │ │ │ │ +00016380: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one),. ). if< │ │ │ │ +000163e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> combined_ │ │ │ │ +00016400: 7479 7065 3c2f 7370 616e 3e20 3c73 7061 type is< │ │ │ │ +00016420: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None:. │ │ │ │ +00016460: 2020 2020 2020 2020 3c73 7061 6e20 636c raise FieldError< │ │ │ │ +000164a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(. │ │ │ │ +000164c0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +000164d0: 7370 616e 2063 6c61 7373 3d22 7361 223e span class="sa"> │ │ │ │ +000164e0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f"C │ │ │ │ +00016500: 616e 6e6f 7420 696e 6665 7220 7479 7065 annot infer type │ │ │ │ +00016510: 206f 6620 3c2f 7370 616e 3e3c 7370 616e of {self │ │ │ │ +00016550: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00016560: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .connecto │ │ │ │ +00016580: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r!r} expression │ │ │ │ +000165c0: 696e 766f 6c76 696e 6720 7468 6573 6520 involving these │ │ │ │ +000165d0: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ +000165e0: 2020 2020 2020 2020 2020 2020 2020 3c73 f │ │ │ │ +00016600: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "ty │ │ │ │ +00016620: 7065 733a 203c 2f73 7061 6e3e 3c73 7061 pes: {self.lhs.outpu │ │ │ │ +000166c0: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field.< │ │ │ │ +000166e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__class__ │ │ │ │ +00016700: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00016720: 7370 616e 2063 6c61 7373 3d22 766d 223e span class="vm"> │ │ │ │ +00016730: 5f5f 6e61 6d65 5f5f 3c2f 7370 616e 3e3c __name__< │ │ │ │ +00016740: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +00016750: 7d3c 2f73 7061 6e3e 3c73 7061 6e20 636c }, " │ │ │ │ +00016770: 3b3c 2f73 7061 6e3e 0a20 2020 2020 2020 ;. │ │ │ │ +00016780: 2020 2020 2020 2020 203c 7370 616e 2063 f" │ │ │ │ +000167c0: 3c73 7061 6e20 636c 6173 733d 2273 6922 {self.rhs │ │ │ │ +00016820: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00016840: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00016850: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field.__cla │ │ │ │ +00016890: 7373 5f5f 3c2f 7370 616e 3e3c 7370 616e ss__.__name__}. Y │ │ │ │ +00016900: 6f75 206d 7573 7420 7365 7420 2671 756f ou must set &quo │ │ │ │ +00016910: 743b 3c2f 7370 616e 3e0a 2020 2020 2020 t;. │ │ │ │ +00016920: 2020 2020 2020 2020 2020 3c73 7061 6e20 f"output │ │ │ │ +00016960: 5f66 6965 6c64 2e26 7175 6f74 3b3c 2f73 _field.". │ │ │ │ +00016980: 203c 7370 616e 2063 6c61 7373 3d22 7022 ). │ │ │ │ +000169a0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +000169c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000169d0: 636f 6d62 696e 6564 5f74 7970 653c 2f73 combined_type().. │ │ │ │ +00016a00: 2020 203c 7370 616e 2063 6c61 7373 3d22 def a │ │ │ │ +00016a30: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(self │ │ │ │ +00016a70: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00016a80: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ +00016aa0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00016ac0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection):. │ │ │ │ +00016b00: 2020 2020 3c73 7061 6e20 636c 6173 733d expressions< │ │ │ │ +00016b20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00016b40: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00016b50: 5b5d 3c2f 7370 616e 3e0a 2020 2020 2020 []. │ │ │ │ +00016b60: 2020 3c73 7061 6e20 636c 6173 733d 226e expression_par │ │ │ │ +00016b80: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = []. │ │ │ │ +00016bc0: 2020 2020 2020 3c73 7061 6e20 636c 6173 sql │ │ │ │ +00016be0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00016bf0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , params< │ │ │ │ +00016c10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00016c30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00016c40: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ +00016c50: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ 00016c60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00016c80: 7370 616e 2063 6c61 7373 3d22 6e22 3e6c span class="n">l │ │ │ │ -00016c90: 6873 3c2f 7370 616e 3e3c 7370 616e 2063 hs). expres │ │ │ │ -00016cd0: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions.append(sql). │ │ │ │ -00016d60: 2020 2020 3c73 7061 6e20 636c 6173 733d expression_p │ │ │ │ -00016d80: 6172 616d 733c 2f73 7061 6e3e 3c73 7061 arams.extend(params< │ │ │ │ +00016c70: 7373 3d22 6e22 3e63 6f6d 7069 6c65 3c2f ss="n">compile(se │ │ │ │ +00016cb0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.lhs). expr │ │ │ │ +00016d20: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions.< │ │ │ │ +00016d40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>append(sql). │ │ │ │ +00016db0: 2020 2020 2020 3c73 7061 6e20 636c 6173 expression │ │ │ │ +00016dd0: 5f70 6172 616d 733c 2f73 7061 6e3e 3c73 _params.< │ │ │ │ 00016df0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -00016e10: 2020 2020 2020 203c 7370 616e 2063 6c61 sql, params │ │ │ │ -00016e60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00016e80: 203c 7370 616e 2063 6c61 7373 3d22 6e22 compiler │ │ │ │ -00016ea0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00016eb0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .compile< │ │ │ │ -00016ed0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00016f00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.rhs). exp │ │ │ │ -00016f70: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ -00016f80: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00016f90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 append(sql< │ │ │ │ -00016fe0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -00017000: 2020 2020 2020 203c 7370 616e 2063 6c61 expressio │ │ │ │ -00017020: 6e5f 7061 7261 6d73 3c2f 7370 616e 3e3c n_params< │ │ │ │ -00017030: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00017040: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extend(para │ │ │ │ -00017090: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms). # ord │ │ │ │ -000170d0: 6572 206f 6620 7072 6563 6564 656e 6365 er of precedence │ │ │ │ -000170e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000170f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00017100: 6578 7072 6573 7369 6f6e 5f77 7261 7070 expression_wrapp │ │ │ │ -00017110: 6572 3c2f 7370 616e 3e20 3c73 7061 6e20 er = "(%s)&q │ │ │ │ -00017180: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ -00017190: 2020 2020 3c73 7061 6e20 636c 6173 733d sql < │ │ │ │ -000171b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -000171c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -000171e0: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.ops.combine_expre │ │ │ │ -00017250: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion(self │ │ │ │ -00017290: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000172a0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .connecto │ │ │ │ -000172c0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ -000172e0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 expressions). │ │ │ │ -00017320: 2020 2020 3c73 7061 6e20 636c 6173 733d return expression_wra │ │ │ │ -00017360: 7070 6572 3c2f 7370 616e 3e20 3c73 7061 pper % sql< │ │ │ │ -000173a0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000173b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expressi │ │ │ │ -000173d0: 6f6e 5f70 6172 616d 733c 2f73 7061 6e3e on_params │ │ │ │ -000173e0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00017400: 203c 7370 616e 2063 6c61 7373 3d22 6e66 resolve_expres │ │ │ │ -00017420: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(. sel │ │ │ │ -00017460: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -00017480: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query=None, allow_ │ │ │ │ -00017500: 6a6f 696e 733c 2f73 7061 6e3e 3c73 7061 joins=True │ │ │ │ -00017540: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00017550: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , reuse=No │ │ │ │ -000175a0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, summarize=False │ │ │ │ -00017610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00017630: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00017640: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ -00017650: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00017660: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 False. ):. lhs = < │ │ │ │ -000176e0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -000176f0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.lhs.resolve_exp │ │ │ │ -00017760: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ -00017780: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00017790: 2020 203c 7370 616e 2063 6c61 7373 3d22 query< │ │ │ │ -000177b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000177c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c allow_jo │ │ │ │ -000177e0: 696e 733c 2f73 7061 6e3e 3c73 7061 6e20 ins, reuse< │ │ │ │ -00017820: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00017830: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c summariz │ │ │ │ -00017850: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -00017870: 203c 7370 616e 2063 6c61 7373 3d22 6e22 for_save │ │ │ │ -00017890: 0a20 2020 2020 2020 203c 7370 616e 2063 . ). rhs = s │ │ │ │ -00017900: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.rhs.resolve_expr │ │ │ │ -00017970: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(. │ │ │ │ -000179a0: 2020 3c73 7061 6e20 636c 6173 733d 226e query,< │ │ │ │ -000179d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> allow_joi │ │ │ │ -000179f0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns, reuse,< │ │ │ │ -00017a40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ -00017a60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00017a80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00017a90: 666f 725f 7361 7665 3c2f 7370 616e 3e0a for_save. │ │ │ │ -00017aa0: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ -00017ac0: 0a20 2020 2020 2020 203c 7370 616e 2063 . if not < │ │ │ │ -00017b00: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00017b10: 6973 696e 7374 616e 6365 3c2f 7370 616e isinstance(self, (< │ │ │ │ -00017b80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DurationEx │ │ │ │ -00017ba0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -00017bb0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00017bc0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Temporal │ │ │ │ -00017be0: 5375 6274 7261 6374 696f 6e3c 2f73 7061 Subtraction)):. │ │ │ │ -00017c10: 2020 2020 2020 2020 203c 7370 616e 2063 try:. │ │ │ │ -00017c50: 2020 2020 2020 2020 2020 2020 3c73 7061 lhs_ │ │ │ │ -00017c70: 7479 7065 3c2f 7370 616e 3e20 3c73 7061 type = lhs< │ │ │ │ -00017cb0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00017cc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ -00017ce0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld.get_internal_t │ │ │ │ -00017d20: 7970 653c 2f73 7061 6e3e 3c73 7061 6e20 ype(). │ │ │ │ -00017d50: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00017d60: 6578 6365 7074 3c2f 7370 616e 3e20 3c73 except (< │ │ │ │ -00017d80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>Attribute │ │ │ │ -00017da0: 4572 726f 723c 2f73 7061 6e3e 3c73 7061 Error, FieldError< │ │ │ │ -00017de0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00017e00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00017e10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00017e20: 6c68 735f 7479 7065 3c2f 7370 616e 3e20 lhs_type │ │ │ │ -00017e30: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00017e40: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = None. │ │ │ │ -00017e70: 2020 3c73 7061 6e20 636c 6173 733d 226b try:. │ │ │ │ -00017eb0: 2020 2020 203c 7370 616e 2063 6c61 7373 rhs_type = rh │ │ │ │ -00017f00: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00017f20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00017f30: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field.get_i │ │ │ │ -00017f70: 6e74 6572 6e61 6c5f 7479 7065 3c2f 7370 nternal_type(). │ │ │ │ -00017fa0: 2020 2020 2020 2020 203c 7370 616e 2063 except< │ │ │ │ -00017fc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ -00017fe0: 7370 616e 2063 6c61 7373 3d22 6e65 223e span class="ne"> │ │ │ │ -00017ff0: 4174 7472 6962 7574 6545 7272 6f72 3c2f AttributeError, Fi │ │ │ │ -00018030: 656c 6445 7272 6f72 3c2f 7370 616e 3e3c eldError< │ │ │ │ -00018040: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00018050: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00018060: 2020 2020 2020 2020 203c 7370 616e 2063 rhs_typ │ │ │ │ -00018080: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = None. │ │ │ │ -000180c0: 2020 2020 2020 2020 2020 203c 7370 616e if "Dura │ │ │ │ -00018100: 7469 6f6e 4669 656c 6426 7175 6f74 3b3c tionField"< │ │ │ │ -00018110: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in {lhs_ty │ │ │ │ -00018160: 7065 3c2f 7370 616e 3e3c 7370 616e 2063 pe, rhs_type} and lhs_type != │ │ │ │ -00018210: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018220: 7268 735f 7479 7065 3c2f 7370 616e 3e3c rhs_type< │ │ │ │ -00018230: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -00018240: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00018250: 2020 2020 2020 2020 3c73 7061 6e20 636c return DurationEx │ │ │ │ -00018290: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -000182a0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000182b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000182c0: 2020 2020 2020 2020 2020 2020 3c73 7061 sel │ │ │ │ -000182e0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00018300: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018310: 6c68 733c 2f73 7061 6e3e 3c73 7061 6e20 lhs, self< │ │ │ │ -00018350: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00018360: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 connector │ │ │ │ -00018380: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000183a0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.rhs. │ │ │ │ -000183f0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -00018400: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00018410: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00018430: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00018440: 6573 6f6c 7665 5f65 7870 7265 7373 696f esolve_expressio │ │ │ │ -00018450: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n( │ │ │ │ -00018470: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -00018480: 2020 2020 203c 7370 616e 2063 6c61 7373 query,. │ │ │ │ -000184c0: 2020 2020 2020 2020 2020 2020 2020 3c73 al │ │ │ │ -000184e0: 6c6f 775f 6a6f 696e 733c 2f73 7061 6e3e low_joins │ │ │ │ -000184f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00018500: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -00018510: 2020 2020 2020 2020 2020 2020 203c 7370 reu │ │ │ │ -00018530: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se,. │ │ │ │ -00018560: 2020 2020 2020 3c73 7061 6e20 636c 6173 summarize< │ │ │ │ -00018580: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ -000185a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000185b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for_save,. │ │ │ │ -000185f0: 2020 2020 2020 2020 2020 203c 7370 616e ). │ │ │ │ -00018620: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018630: 6461 7465 7469 6d65 5f66 6965 6c64 733c datetime_fields< │ │ │ │ -00018640: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00018660: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00018670: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {"D │ │ │ │ -00018690: 6174 6546 6965 6c64 2671 756f 743b 3c2f ateField", & │ │ │ │ -000186d0: 7175 6f74 3b44 6174 6554 696d 6546 6965 quot;DateTimeFie │ │ │ │ -000186e0: 6c64 2671 756f 743b 3c2f 7370 616e 3e3c ld"< │ │ │ │ -000186f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00018700: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "T │ │ │ │ -00018720: 696d 6546 6965 6c64 2671 756f 743b 3c2f imeField"}. │ │ │ │ -00018750: 2020 2020 2020 2020 2020 3c73 7061 6e20 if (. │ │ │ │ -00018790: 2020 2020 2020 2020 2020 2020 203c 7370 se │ │ │ │ -000187b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.connector == sel │ │ │ │ -00018820: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00018840: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018850: 5355 423c 2f73 7061 6e3e 0a20 2020 2020 SUB. │ │ │ │ -00018860: 2020 2020 2020 2020 2020 203c 7370 616e and< │ │ │ │ -00018880: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lhs_type< │ │ │ │ -000188a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in datetime_field │ │ │ │ -000188e0: 733c 2f73 7061 6e3e 0a20 2020 2020 2020 s. │ │ │ │ -000188f0: 2020 2020 2020 2020 203c 7370 616e 2063 and lhs_type == < │ │ │ │ -00018950: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00018960: 6873 5f74 7970 653c 2f73 7061 6e3e 0a20 hs_type. │ │ │ │ -00018970: 2020 2020 2020 2020 2020 203c 7370 616e ):. │ │ │ │ -000189a0: 2020 2020 203c 7370 616e 2063 6c61 7373 return TemporalSubtr │ │ │ │ -000189e0: 6163 7469 6f6e 3c2f 7370 616e 3e3c 7370 action(self.lhs, sel │ │ │ │ -00018a80: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00018aa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018ab0: 7268 733c 2f73 7061 6e3e 3c73 7061 6e20 rhs).resolv │ │ │ │ -00018b00: 655f 6578 7072 6573 7369 6f6e 3c2f 7370 e_expression(. │ │ │ │ -00018b30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00018b40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00018b50: 7175 6572 793c 2f73 7061 6e3e 3c73 7061 query,. │ │ │ │ -00018b80: 2020 2020 2020 2020 203c 7370 616e 2063 allow_j │ │ │ │ -00018ba0: 6f69 6e73 3c2f 7370 616e 3e3c 7370 616e oins,. │ │ │ │ -00018bd0: 2020 2020 2020 2020 3c73 7061 6e20 636c reuse,. │ │ │ │ -00018c10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00018c20: 203c 7370 616e 2063 6c61 7373 3d22 6e22 summarize,. │ │ │ │ -00018c60: 2020 2020 2020 2020 2020 2020 2020 3c73 fo │ │ │ │ -00018c80: 725f 7361 7665 3c2f 7370 616e 3e3c 7370 r_save,. │ │ │ │ -00018cb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ -00018cd0: 2020 2020 2020 203c 7370 616e 2063 6c61 c │ │ │ │ -00018cf0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00018d00: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.cop │ │ │ │ -00018d50: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y(). c.is_sum │ │ │ │ -00018dc0: 6d61 7279 3c2f 7370 616e 3e20 3c73 7061 mary = summarize. c< │ │ │ │ -00018e20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.lh │ │ │ │ -00018e50: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = lhs. │ │ │ │ -00018e90: 2020 2020 203c 7370 616e 2063 6c61 7373 c.rhs │ │ │ │ -00018ee0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00018ef0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = rhs. retu │ │ │ │ -00018f30: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn c...class DurationExpre │ │ │ │ -00018f90: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion(CombinedExpr │ │ │ │ -00018fd0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession):< │ │ │ │ -00018ff0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. def compile(se │ │ │ │ -00019060: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, side, compiler, co │ │ │ │ -00019100: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -00019110: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00019120: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00019130: 203c 7370 616e 2063 6c61 7373 3d22 6b22 try:. │ │ │ │ -00019170: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00019180: 6f75 7470 7574 3c2f 7370 616e 3e20 3c73 output =< │ │ │ │ -000191a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> side.output │ │ │ │ -000191f0: 5f66 6965 6c64 3c2f 7370 616e 3e0a 2020 _field. │ │ │ │ -00019200: 2020 2020 2020 3c73 7061 6e20 636c 6173 except FieldError:. │ │ │ │ -00019260: 2020 2020 2020 2020 2020 3c73 7061 6e20 pass. el │ │ │ │ -000192a0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se:. if │ │ │ │ -000192e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c output.get │ │ │ │ -00019330: 5f69 6e74 6572 6e61 6c5f 7479 7065 3c2f _internal_type() < │ │ │ │ -00019360: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00019370: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -00019390: 4475 7261 7469 6f6e 4669 656c 6426 7175 DurationField&qu │ │ │ │ -000193a0: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;:. │ │ │ │ -000193d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 sql, params = com │ │ │ │ -00019450: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler.compile(side). │ │ │ │ -000194e0: 2020 2020 2020 2020 2020 2020 2020 3c73 re │ │ │ │ -00019500: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn conn │ │ │ │ -00019520: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.ops< │ │ │ │ -00019560: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00019570: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 format_fo │ │ │ │ -00019590: 725f 6475 7261 7469 6f6e 5f61 7269 7468 r_duration_arith │ │ │ │ -000195a0: 6d65 7469 633c 2f73 7061 6e3e 3c73 7061 metic(sql), │ │ │ │ -000195f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c params. re │ │ │ │ -00019630: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn comp │ │ │ │ -00019650: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(side).. │ │ │ │ -000196e0: 2020 3c73 7061 6e20 636c 6173 733d 226b def as │ │ │ │ -00019710: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(self< │ │ │ │ -00019750: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00019760: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ -00019780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000197a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000197b0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection):. │ │ │ │ -000197e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if con │ │ │ │ -00019810: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -00019830: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>features.has │ │ │ │ -00019880: 5f6e 6174 6976 655f 6475 7261 7469 6f6e _native_duration │ │ │ │ -00019890: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field:. │ │ │ │ -000198c0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -000198e0: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ -00019910: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.as │ │ │ │ -00019940: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(compiler, conne │ │ │ │ -000199b0: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction). con │ │ │ │ -000199f0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -00019a10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ops │ │ │ │ -00019a30: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00019a40: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .check_ex │ │ │ │ -00019a60: 7072 6573 7369 6f6e 5f73 7570 706f 7274 pression_support │ │ │ │ -00019a70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00019a90: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00019aa0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self). expr │ │ │ │ -00019ae0: 6573 7369 6f6e 733c 2f73 7061 6e3e 203c essions < │ │ │ │ -00019af0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00019b00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c []. expres │ │ │ │ -00019b40: 7369 6f6e 5f70 6172 616d 733c 2f73 7061 sion_params = []. sq │ │ │ │ -00019ba0: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ -00019bc0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 params < │ │ │ │ -00019be0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00019bf0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.comp │ │ │ │ -00019c40: 696c 653c 2f73 7061 6e3e 3c73 7061 6e20 ile(self.< │ │ │ │ -00019c90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>lhs │ │ │ │ -00019cb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00019cc0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ -00019ce0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ -00019d00: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection). │ │ │ │ -00019d40: 2020 203c 7370 616e 2063 6c61 7373 3d22 expressions.app │ │ │ │ -00019d90: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end(sql). exp │ │ │ │ -00019e00: 7265 7373 696f 6e5f 7061 7261 6d73 3c2f ression_params.ext │ │ │ │ -00019e40: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end(params< │ │ │ │ -00019e80: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00019e90: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00019ea0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00019eb0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ -00019ef0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = self< │ │ │ │ -00019f20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ -00019f50: 6d70 696c 653c 2f73 7061 6e3e 3c73 7061 mpile(self │ │ │ │ -00019f90: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00019fa0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .rhs, compi │ │ │ │ -00019ff0: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler, connection). │ │ │ │ -0001a050: 2020 2020 203c 7370 616e 2063 6c61 7373 expressions │ │ │ │ -0001a070: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0001a090: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -0001a0a0: 7070 656e 643c 2f73 7061 6e3e 3c73 7061 ppend(sql)< │ │ │ │ -0001a0f0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0001a100: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0001a110: 7870 7265 7373 696f 6e5f 7061 7261 6d73 xpression_params │ │ │ │ -0001a120: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0001a140: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0001a150: 7874 656e 643c 2f73 7061 6e3e 3c73 7061 xtend(params). │ │ │ │ -0001a1b0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # order of pr │ │ │ │ -0001a1d0: 6563 6564 656e 6365 3c2f 7370 616e 3e0a ecedence. │ │ │ │ -0001a1e0: 2020 2020 2020 2020 3c73 7061 6e20 636c expressi │ │ │ │ -0001a200: 6f6e 5f77 7261 7070 6572 3c2f 7370 616e on_wrapper = &quo │ │ │ │ -0001a240: 743b 283c 2f73 7061 6e3e 3c73 7061 6e20 t;(%s)". sql< │ │ │ │ -0001a2a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -0001a2c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001a2d0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection.ops.combi │ │ │ │ -0001a340: 6e65 5f64 7572 6174 696f 6e5f 6578 7072 ne_duration_expr │ │ │ │ -0001a350: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(self.connect │ │ │ │ -0001a3c0: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063 or, expressions). │ │ │ │ -0001a420: 2020 2020 203c 7370 616e 2063 6c61 7373 return expression_wr │ │ │ │ -0001a460: 6170 7065 723c 2f73 7061 6e3e 203c 7370 apper % sql │ │ │ │ -0001a4a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001a4b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , express │ │ │ │ -0001a4d0: 696f 6e5f 7061 7261 6d73 3c2f 7370 616e ion_params.. def as_sqlite(self │ │ │ │ -0001a550: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0001a570: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001a580: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0001a590: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001a5a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -0001a5c0: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, **extra │ │ │ │ -0001a610: 5f63 6f6e 7465 7874 3c2f 7370 616e 3e3c _context< │ │ │ │ -0001a620: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001a630: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0001a640: 203c 7370 616e 2063 6c61 7373 3d22 6e22 sql, params = self │ │ │ │ -0001a6c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0001a6e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -0001a6f0: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(compiler, conn │ │ │ │ -0001a760: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection, **< │ │ │ │ -0001a7a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0001a7b0: 7874 7261 5f63 6f6e 7465 7874 3c2f 7370 xtra_context). │ │ │ │ -0001a7e0: 2020 2020 3c73 7061 6e20 636c 6173 733d if s │ │ │ │ -0001a810: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.connector in {< │ │ │ │ -0001a880: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>Combinable │ │ │ │ -0001a8a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0001a8c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e4d span class="n">M │ │ │ │ -0001a8d0: 554c 3c2f 7370 616e 3e3c 7370 616e 2063 UL, Combinable.DIV}:. │ │ │ │ -0001a960: 2020 2020 2020 2020 2020 203c 7370 616e try:. │ │ │ │ -0001a9a0: 2020 2020 2020 2020 2020 2020 2020 3c73 lh │ │ │ │ -0001a9c0: 735f 7479 7065 3c2f 7370 616e 3e20 3c73 s_type =< │ │ │ │ -0001a9e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.lhs.out │ │ │ │ -0001aa60: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -0001aa70: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001aa80: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .get_inte │ │ │ │ -0001aaa0: 726e 616c 5f74 7970 653c 2f73 7061 6e3e rnal_type │ │ │ │ -0001aab0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001aac0: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ -0001aad0: 2020 2020 2020 2020 2020 3c73 7061 6e20 rhs_ty │ │ │ │ -0001aaf0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe = self< │ │ │ │ -0001ab30: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0001ab40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 rhs.output_ │ │ │ │ -0001ab90: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.get_internal │ │ │ │ -0001abd0: 5f74 7970 653c 2f73 7061 6e3e 3c73 7061 _type(). │ │ │ │ -0001ac00: 2020 3c73 7061 6e20 636c 6173 733d 226b except │ │ │ │ -0001ac20: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001ac30: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (Attribu │ │ │ │ -0001ac50: 7465 4572 726f 723c 2f73 7061 6e3e 3c73 teError,< │ │ │ │ -0001ac70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> FieldErro │ │ │ │ -0001ac90: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r):. │ │ │ │ -0001acc0: 2020 3c73 7061 6e20 636c 6173 733d 226b pass. │ │ │ │ -0001ace0: 2020 2020 2020 2020 2020 3c73 7061 6e20 else:. │ │ │ │ -0001ad20: 2020 2020 2020 2020 2020 2020 2020 3c73 al │ │ │ │ -0001ad40: 6c6f 7765 645f 6669 656c 6473 3c2f 7370 lowed_fields = {. │ │ │ │ -0001ad90: 2020 2020 2020 2020 2020 3c73 7061 6e20 " │ │ │ │ -0001adb0: 3b44 6563 696d 616c 4669 656c 6426 7175 ;DecimalField&qu │ │ │ │ -0001adc0: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;,. │ │ │ │ -0001adf0: 2020 2020 2020 203c 7370 616e 2063 6c61 "Du │ │ │ │ -0001ae10: 7261 7469 6f6e 4669 656c 6426 7175 6f74 rationField" │ │ │ │ -0001ae20: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;, │ │ │ │ -0001ae40: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0001ae50: 2020 2020 203c 7370 616e 2063 6c61 7373 "Floa │ │ │ │ -0001ae70: 7446 6965 6c64 2671 756f 743b 3c2f 7370 tField",. │ │ │ │ -0001aea0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0001aeb0: 3c73 7061 6e20 636c 6173 733d 2273 3222 "IntegerFi │ │ │ │ -0001aed0: 656c 6426 7175 6f74 3b3c 2f73 7061 6e3e eld" │ │ │ │ -0001aee0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001aef0: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -0001af00: 2020 2020 2020 2020 203c 7370 616e 2063 }. │ │ │ │ -0001af30: 2020 3c73 7061 6e20 636c 6173 733d 226b if lhs_ │ │ │ │ -0001af60: 7479 7065 3c2f 7370 616e 3e20 3c73 7061 type not │ │ │ │ -0001af80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c in allowed_field │ │ │ │ -0001afc0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s or rhs_type not │ │ │ │ -0001b020: 3c73 7061 6e20 636c 6173 733d 226f 7722 in allow │ │ │ │ -0001b050: 6564 5f66 6965 6c64 733c 2f73 7061 6e3e ed_fields │ │ │ │ -0001b060: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001b070: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0001b080: 2020 2020 2020 2020 2020 2020 203c 7370 rai │ │ │ │ -0001b0a0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se Databa │ │ │ │ -0001b0c0: 7365 4572 726f 723c 2f73 7061 6e3e 3c73 seError(< │ │ │ │ -0001b0e0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0001b0f0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0001b100: 7370 616e 2063 6c61 7373 3d22 7361 223e span class="sa"> │ │ │ │ -0001b110: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f"I │ │ │ │ -0001b130: 6e76 616c 6964 2061 7267 756d 656e 7473 nvalid arguments │ │ │ │ -0001b140: 2066 6f72 206f 7065 7261 746f 7220 3c2f for operator {s │ │ │ │ -0001b180: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.connector}.&qu │ │ │ │ -0001b1f0: 6f74 3b3c 2f73 7061 6e3e 0a20 2020 2020 ot;. │ │ │ │ -0001b200: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0001b210: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001b220: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001b230: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001b240: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return sq │ │ │ │ -0001b260: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ -0001b280: 203c 7370 616e 2063 6c61 7373 3d22 6e22 params.. │ │ │ │ -0001b2a0: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22 .class T │ │ │ │ -0001b2d0: 656d 706f 7261 6c53 7562 7472 6163 7469 emporalSubtracti │ │ │ │ -0001b2e0: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(CombinedExpress │ │ │ │ -0001b320: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. output_f │ │ │ │ -0001b360: 6965 6c64 3c2f 7370 616e 3e20 3c73 7061 ield = fields.Durati │ │ │ │ -0001b3d0: 6f6e 4669 656c 643c 2f73 7061 6e3e 3c73 onField() │ │ │ │ -0001b3f0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0001b410: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __init_ │ │ │ │ -0001b430: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ -0001b450: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, lhs< │ │ │ │ -0001b4a0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001b4b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c rhs):. │ │ │ │ -0001b4f0: 2020 2020 3c73 7061 6e20 636c 6173 733d super().__init__(lhsextend(param │ │ │ │ +00016e40: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ +00016e60: 0a20 2020 2020 2020 203c 7370 616e 2063 . sql, para │ │ │ │ +00016eb0: 6d73 3c2f 7370 616e 3e20 3c73 7061 6e20 ms = compiler.compil │ │ │ │ +00016f20: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +00016f40: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.rhs)< │ │ │ │ +00016fa0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00016fb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00016fc0: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions.append< │ │ │ │ +00017000: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(sq │ │ │ │ +00017030: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l) │ │ │ │ +00017050: 0a20 2020 2020 2020 203c 7370 616e 2063 . express │ │ │ │ +00017070: 696f 6e5f 7061 7261 6d73 3c2f 7370 616e ion_params.extend< │ │ │ │ +000170b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(pa │ │ │ │ +000170e0: 7261 6d73 3c2f 7370 616e 3e3c 7370 616e rams). # o │ │ │ │ +00017120: 7264 6572 206f 6620 7072 6563 6564 656e rder of preceden │ │ │ │ +00017130: 6365 3c2f 7370 616e 3e0a 2020 2020 2020 ce. │ │ │ │ +00017140: 2020 3c73 7061 6e20 636c 6173 733d 226e expression_wra │ │ │ │ +00017160: 7070 6572 3c2f 7370 616e 3e20 3c73 7061 pper = "(%s) │ │ │ │ +000171d0: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ +000171e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 sql │ │ │ │ +00017200: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = connec │ │ │ │ +00017230: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion.ops.combine_exp │ │ │ │ +000172a0: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ +000172c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.connec │ │ │ │ +00017310: 746f 723c 2f73 7061 6e3e 3c73 7061 6e20 tor, expressions). │ │ │ │ +00017370: 2020 2020 2020 3c73 7061 6e20 636c 6173 return expression_w │ │ │ │ +000173b0: 7261 7070 6572 3c2f 7370 616e 3e20 3c73 rapper %< │ │ │ │ +000173d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> sql, expres │ │ │ │ +00017420: 7369 6f6e 5f70 6172 616d 733c 2f73 7061 sion_params.. def resolve_expr │ │ │ │ +00017470: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(. s │ │ │ │ +000174b0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, query< │ │ │ │ +000174f0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00017500: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None, allo │ │ │ │ +00017550: 775f 6a6f 696e 733c 2f73 7061 6e3e 3c73 w_joins=< │ │ │ │ +00017570: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>True, reuse │ │ │ │ +000175c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ +000175e0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +000175f0: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None, summarize=Fal │ │ │ │ +00017660: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, for_save=False< │ │ │ │ +000176d0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. ):. lhs │ │ │ │ +00017710: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +00017730: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.lhs< │ │ │ │ +00017780: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00017790: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 resolve_e │ │ │ │ +000177b0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +000177c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000177d0: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ +000177e0: 2020 2020 203c 7370 616e 2063 6c61 7373 query, allow_ │ │ │ │ +00017830: 6a6f 696e 733c 2f73 7061 6e3e 3c73 7061 joins, reuse, summar │ │ │ │ +000178a0: 697a 653c 2f73 7061 6e3e 3c73 7061 6e20 ize, for_save. ). rhs< │ │ │ │ +00017920: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00017940: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.rhs.< │ │ │ │ +000179a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>resolve_ex │ │ │ │ +000179c0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +000179d0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000179e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000179f0: 2020 2020 3c73 7061 6e20 636c 6173 733d query │ │ │ │ +00017a10: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00017a20: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , allow_j │ │ │ │ +00017a40: 6f69 6e73 3c2f 7370 616e 3e3c 7370 616e oins, reuse │ │ │ │ +00017a80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00017a90: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , summari │ │ │ │ +00017ab0: 7a65 3c2f 7370 616e 3e3c 7370 616e 2063 ze, for_save. ). if not │ │ │ │ +00017b50: 203c 7370 616e 2063 6c61 7373 3d22 6e62 isinstance(self │ │ │ │ +00017ba0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00017bc0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00017bd0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (Duration │ │ │ │ +00017bf0: 4578 7072 6573 7369 6f6e 3c2f 7370 616e Expression, Tempor │ │ │ │ +00017c30: 616c 5375 6274 7261 6374 696f 6e3c 2f73 alSubtraction)):. │ │ │ │ +00017c60: 2020 2020 2020 2020 2020 203c 7370 616e try:. │ │ │ │ +00017ca0: 2020 2020 2020 2020 2020 2020 2020 3c73 lh │ │ │ │ +00017cc0: 735f 7479 7065 3c2f 7370 616e 3e20 3c73 s_type =< │ │ │ │ +00017ce0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lhs.output_ │ │ │ │ +00017d30: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.get_internal │ │ │ │ +00017d70: 5f74 7970 653c 2f73 7061 6e3e 3c73 7061 _type(). │ │ │ │ +00017da0: 2020 3c73 7061 6e20 636c 6173 733d 226b except │ │ │ │ +00017dc0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00017dd0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (Attribu │ │ │ │ +00017df0: 7465 4572 726f 723c 2f73 7061 6e3e 3c73 teError,< │ │ │ │ +00017e10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> FieldErro │ │ │ │ +00017e30: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r):. │ │ │ │ +00017e60: 2020 3c73 7061 6e20 636c 6173 733d 226e lhs_type = None │ │ │ │ +00017eb0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00017ec0: 2020 2020 3c73 7061 6e20 636c 6173 733d try:< │ │ │ │ +00017ef0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00017f00: 2020 2020 2020 203c 7370 616e 2063 6c61 rhs_type< │ │ │ │ +00017f20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00017f40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00017f50: 7268 733c 2f73 7061 6e3e 3c73 7061 6e20 rhs.output_field.get │ │ │ │ +00017fc0: 5f69 6e74 6572 6e61 6c5f 7479 7065 3c2f _internal_type(). │ │ │ │ +00017ff0: 2020 2020 2020 2020 2020 203c 7370 616e excep │ │ │ │ +00018010: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t (AttributeError │ │ │ │ +00018050: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00018070: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00018080: 4669 656c 6445 7272 6f72 3c2f 7370 616e FieldError):. │ │ │ │ +000180b0: 2020 2020 2020 2020 2020 203c 7370 616e rhs_t │ │ │ │ +000180d0: 7970 653c 2f73 7061 6e3e 203c 7370 616e ype = None │ │ │ │ +00018110: 0a20 2020 2020 2020 2020 2020 203c 7370 . if< │ │ │ │ +00018130: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "Du │ │ │ │ +00018150: 7261 7469 6f6e 4669 656c 6426 7175 6f74 rationField" │ │ │ │ +00018160: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; in {lhs_ │ │ │ │ +000181b0: 7479 7065 3c2f 7370 616e 3e3c 7370 616e type, rhs_type} and │ │ │ │ +00018220: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c lhs_type │ │ │ │ +00018240: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c != rhs_type:. │ │ │ │ +000182a0: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ +000182c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Duration │ │ │ │ +000182e0: 4578 7072 6573 7369 6f6e 3c2f 7370 616e Expression(. │ │ │ │ +00018310: 2020 2020 2020 2020 2020 2020 2020 3c73 s │ │ │ │ +00018330: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.lhs, self.connect │ │ │ │ +000183d0: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063 or, self.< │ │ │ │ +00018420: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>rhs │ │ │ │ +00018440: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +00018450: 203c 7370 616e 2063 6c61 7373 3d22 7022 ).resolve_express │ │ │ │ +000184a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion(. │ │ │ │ +000184d0: 2020 2020 2020 203c 7370 616e 2063 6c61 query,. │ │ │ │ +00018510: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018520: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00018530: 616c 6c6f 775f 6a6f 696e 733c 2f73 7061 allow_joins,. │ │ │ │ +00018560: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00018570: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +00018580: 6575 7365 3c2f 7370 616e 3e3c 7370 616e euse,. │ │ │ │ +000185b0: 2020 2020 2020 2020 3c73 7061 6e20 636c summariz │ │ │ │ +000185d0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +000185f0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +00018600: 2020 2020 203c 7370 616e 2063 6c61 7373 for_save,. │ │ │ │ +00018640: 2020 2020 2020 2020 2020 2020 203c 7370 ). │ │ │ │ +00018670: 2020 3c73 7061 6e20 636c 6173 733d 226e datetime_field │ │ │ │ +00018690: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = {" │ │ │ │ +000186e0: 3b44 6174 6546 6965 6c64 2671 756f 743b ;DateField" │ │ │ │ +000186f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00018710: 3c73 7061 6e20 636c 6173 733d 2273 3222 "DateTimeF │ │ │ │ +00018730: 6965 6c64 2671 756f 743b 3c2f 7370 616e ield", " │ │ │ │ +00018770: 3b54 696d 6546 6965 6c64 2671 756f 743b ;TimeField" │ │ │ │ +00018780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 }. │ │ │ │ +000187a0: 2020 2020 2020 2020 2020 2020 3c73 7061 if (. │ │ │ │ +000187e0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +000187f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00018800: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.connector == s │ │ │ │ +00018870: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.SUB. │ │ │ │ +000188b0: 2020 2020 2020 2020 2020 2020 203c 7370 an │ │ │ │ +000188d0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d lhs_typ │ │ │ │ +000188f0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e in datetime_fie │ │ │ │ +00018930: 6c64 733c 2f73 7061 6e3e 0a20 2020 2020 lds. │ │ │ │ +00018940: 2020 2020 2020 2020 2020 203c 7370 616e and< │ │ │ │ +00018960: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lhs_type< │ │ │ │ +00018980: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> == │ │ │ │ +000189a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 rhs_type │ │ │ │ +000189c0: 0a20 2020 2020 2020 2020 2020 203c 7370 . ):< │ │ │ │ +000189e0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +000189f0: 2020 2020 2020 203c 7370 616e 2063 6c61 return TemporalSub │ │ │ │ +00018a30: 7472 6163 7469 6f6e 3c2f 7370 616e 3e3c traction< │ │ │ │ +00018a40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00018a50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.lhs, s │ │ │ │ +00018ad0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.rhs).reso │ │ │ │ +00018b50: 6c76 655f 6578 7072 6573 7369 6f6e 3c2f lve_expression(. │ │ │ │ +00018b80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018b90: 2020 3c73 7061 6e20 636c 6173 733d 226e query,< │ │ │ │ +00018bc0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00018bd0: 2020 2020 2020 2020 2020 203c 7370 616e allow │ │ │ │ +00018bf0: 5f6a 6f69 6e73 3c2f 7370 616e 3e3c 7370 _joins,. │ │ │ │ +00018c20: 2020 2020 2020 2020 2020 3c73 7061 6e20 reuse< │ │ │ │ +00018c40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00018c60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018c70: 2020 203c 7370 616e 2063 6c61 7373 3d22 summarize,. │ │ │ │ +00018cb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00018cc0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00018cd0: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ +00018ce0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00018cf0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00018d00: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ +00018d20: 0a20 2020 2020 2020 203c 7370 616e 2063 . c = self │ │ │ │ +00018d70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00018d90: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00018da0: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy(). c.is_s │ │ │ │ +00018e10: 756d 6d61 7279 3c2f 7370 616e 3e20 3c73 ummary =< │ │ │ │ +00018e30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ +00018e50: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00018e60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00018e70: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c. │ │ │ │ +00018e90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00018ea0: 6c68 733c 2f73 7061 6e3e 203c 7370 616e lhs = lhs. │ │ │ │ +00018ee0: 2020 2020 2020 203c 7370 616e 2063 6c61 c< │ │ │ │ +00018f00: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00018f10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 rhs = rhs. re │ │ │ │ +00018f80: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn c...class DurationExp │ │ │ │ +00018fe0: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ +00019000: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>CombinedEx │ │ │ │ +00019020: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +00019030: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00019040: 3a3c 2f73 7061 6e3e 0a20 2020 203c 7370 :. def │ │ │ │ +00019060: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compile │ │ │ │ +00019080: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000190a0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +000190b0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, side< │ │ │ │ +000190f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00019100: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ +00019120: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00019140: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00019150: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection):. │ │ │ │ +00019180: 2020 203c 7370 616e 2063 6c61 7373 3d22 try:. │ │ │ │ +000191c0: 2020 3c73 7061 6e20 636c 6173 733d 226e output │ │ │ │ +000191e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000191f0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = side.outp │ │ │ │ +00019240: 7574 5f66 6965 6c64 3c2f 7370 616e 3e0a ut_field. │ │ │ │ +00019250: 2020 2020 2020 2020 3c73 7061 6e20 636c except FieldError │ │ │ │ +00019290: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +000192b0: 2020 2020 2020 2020 2020 2020 3c73 7061 pass │ │ │ │ +000192d0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000192e0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000192f0: 656c 7365 3c2f 7370 616e 3e3c 7370 616e else:. │ │ │ │ +00019320: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00019330: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if output │ │ │ │ +00019350: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00019370: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +00019380: 6574 5f69 6e74 6572 6e61 6c5f 7479 7065 et_internal_type │ │ │ │ +00019390: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +000193b0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 == &quo │ │ │ │ +000193e0: 743b 4475 7261 7469 6f6e 4669 656c 6426 t;DurationField& │ │ │ │ +000193f0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;:. │ │ │ │ +00019420: 2020 2020 203c 7370 616e 2063 6c61 7373 sql< │ │ │ │ +00019440: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00019450: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c params = < │ │ │ │ +00019490: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +000194a0: 6f6d 7069 6c65 723c 2f73 7061 6e3e 3c73 ompiler.< │ │ │ │ +000194c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>compile(side │ │ │ │ +00019510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00019530: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00019540: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00019550: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return co │ │ │ │ +00019570: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +00019580: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00019590: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ops.format_ │ │ │ │ +000195e0: 666f 725f 6475 7261 7469 6f6e 5f61 7269 for_duration_ari │ │ │ │ +000195f0: 7468 6d65 7469 633c 2f73 7061 6e3e 3c73 thmetic(< │ │ │ │ +00019610: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>sql │ │ │ │ +00019630: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00019640: 292c 3c2f 7370 616e 3e20 3c73 7061 6e20 ), params │ │ │ │ +00019660: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00019670: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00019680: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return co │ │ │ │ +000196a0: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler.compile(side< │ │ │ │ +00019710: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ +00019730: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00019750: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00019760: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(self, compil │ │ │ │ +000197d0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection):. │ │ │ │ +00019830: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +00019850: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00019860: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ +00019870: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00019880: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .features │ │ │ │ +000198a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000198c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e68 span class="n">h │ │ │ │ +000198d0: 6173 5f6e 6174 6976 655f 6475 7261 7469 as_native_durati │ │ │ │ +000198e0: 6f6e 5f66 6965 6c64 3c2f 7370 616e 3e3c on_field< │ │ │ │ +000198f0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00019900: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00019910: 2020 2020 3c73 7061 6e20 636c 6173 733d return super< │ │ │ │ +00019950: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00019960: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ +00019980: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00019990: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(compiler, con │ │ │ │ +00019a00: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection)< │ │ │ │ +00019a20: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00019a30: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00019a40: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ +00019a50: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00019a60: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .ops.check_ │ │ │ │ +00019ab0: 6578 7072 6573 7369 6f6e 5f73 7570 706f expression_suppo │ │ │ │ +00019ac0: 7274 3c2f 7370 616e 3e3c 7370 616e 2063 rt(self). ex │ │ │ │ +00019b30: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +00019b40: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = []. expr │ │ │ │ +00019b90: 6573 7369 6f6e 5f70 6172 616d 733c 2f73 ession_params = [] │ │ │ │ +00019bd0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00019be0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00019bf0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ +00019c30: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = self< │ │ │ │ +00019c60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ +00019c90: 6d70 696c 653c 2f73 7061 6e3e 3c73 7061 mpile(self │ │ │ │ +00019cd0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00019ce0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .lhs, compi │ │ │ │ +00019d30: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler, connection). │ │ │ │ +00019d90: 2020 2020 203c 7370 616e 2063 6c61 7373 expressions │ │ │ │ +00019db0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00019dd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ +00019de0: 7070 656e 643c 2f73 7061 6e3e 3c73 7061 ppend(sql)< │ │ │ │ +00019e30: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00019e40: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00019e50: 7870 7265 7373 696f 6e5f 7061 7261 6d73 xpression_params │ │ │ │ +00019e60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00019e80: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00019e90: 7874 656e 643c 2f73 7061 6e3e 3c73 7061 xtend(params). │ │ │ │ +00019ef0: 2020 3c73 7061 6e20 636c 6173 733d 226e sql, params = sel │ │ │ │ +00019f70: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00019f90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00019fa0: 636f 6d70 696c 653c 2f73 7061 6e3e 3c73 compile(< │ │ │ │ +00019fc0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.rhs, com │ │ │ │ +0001a040: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler, connection< │ │ │ │ +0001a080: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +0001a0a0: 2020 2020 2020 203c 7370 616e 2063 6c61 expressio │ │ │ │ +0001a0c0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns.append(< │ │ │ │ +0001a110: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>sql │ │ │ │ +0001a130: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001a140: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +0001a150: 203c 7370 616e 2063 6c61 7373 3d22 6e22 expression_para │ │ │ │ +0001a170: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms.extend(< │ │ │ │ +0001a1c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>params). │ │ │ │ +0001a200: 2020 2020 3c73 7061 6e20 636c 6173 733d # order of │ │ │ │ +0001a220: 7072 6563 6564 656e 6365 3c2f 7370 616e precedence. expres │ │ │ │ +0001a250: 7369 6f6e 5f77 7261 7070 6572 3c2f 7370 sion_wrapper = &q │ │ │ │ +0001a290: 756f 743b 283c 2f73 7061 6e3e 3c73 7061 uot;(%s< │ │ │ │ +0001a2b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>)". sq │ │ │ │ +0001a2f0: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l = connection.ops.com │ │ │ │ +0001a390: 6269 6e65 5f64 7572 6174 696f 6e5f 6578 bine_duration_ex │ │ │ │ +0001a3a0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0001a3b0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0001a3c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.conne │ │ │ │ +0001a410: 6374 6f72 3c2f 7370 616e 3e3c 7370 616e ctor, expressions< │ │ │ │ +0001a450: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +0001a470: 2020 2020 2020 203c 7370 616e 2063 6c61 return expression_ │ │ │ │ +0001a4b0: 7772 6170 7065 723c 2f73 7061 6e3e 203c wrapper < │ │ │ │ +0001a4c0: 7370 616e 2063 6c61 7373 3d22 6f22 3e25 span class="o">% │ │ │ │ +0001a4d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c sql, expre │ │ │ │ +0001a520: 7373 696f 6e5f 7061 7261 6d73 3c2f 7370 ssion_params.. def as_sqlite(se │ │ │ │ +0001a5a0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, compiler, connec │ │ │ │ +0001a610: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion, **ext │ │ │ │ +0001a660: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context):. │ │ │ │ +0001a690: 2020 203c 7370 616e 2063 6c61 7373 3d22 sql, params = se │ │ │ │ +0001a710: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.as_sql(< │ │ │ │ +0001a760: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>compiler, co │ │ │ │ +0001a7b0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +0001a7c0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0001a7d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **extra_context). │ │ │ │ +0001a830: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ +0001a850: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.connector in │ │ │ │ +0001a8c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001a8d0: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {Combinab │ │ │ │ +0001a8f0: 6c65 3c2f 7370 616e 3e3c 7370 616e 2063 le.MUL, Combinable.DIV │ │ │ │ +0001a990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 }: │ │ │ │ +0001a9b0: 0a20 2020 2020 2020 2020 2020 203c 7370 . try │ │ │ │ +0001a9d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +0001a9f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001aa00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001aa10: 6c68 735f 7479 7065 3c2f 7370 616e 3e20 lhs_type │ │ │ │ +0001aa20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001aa30: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.lhs │ │ │ │ +0001aa80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0001aaa0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +0001aab0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field.get_in │ │ │ │ +0001aaf0: 7465 726e 616c 5f74 7970 653c 2f73 7061 ternal_type(). │ │ │ │ +0001ab20: 2020 2020 2020 2020 2020 2020 3c73 7061 rhs_ │ │ │ │ +0001ab40: 7479 7065 3c2f 7370 616e 3e20 3c73 7061 type = self.rhs.outpu │ │ │ │ +0001abe0: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field.< │ │ │ │ +0001ac00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_intern │ │ │ │ +0001ac20: 616c 5f74 7970 653c 2f73 7061 6e3e 3c73 al_type() │ │ │ │ +0001ac40: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0001ac50: 2020 2020 3c73 7061 6e20 636c 6173 733d except (Attri │ │ │ │ +0001aca0: 6275 7465 4572 726f 723c 2f73 7061 6e3e buteError │ │ │ │ +0001acb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001acc0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , FieldEr │ │ │ │ +0001ace0: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20 ror):. │ │ │ │ +0001ad10: 2020 2020 3c73 7061 6e20 636c 6173 733d pass. │ │ │ │ +0001ad30: 2020 2020 2020 2020 2020 2020 3c73 7061 else │ │ │ │ +0001ad50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +0001ad70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001ad80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001ad90: 616c 6c6f 7765 645f 6669 656c 6473 3c2f allowed_fields = < │ │ │ │ +0001adc0: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ +0001add0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0001ade0: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ +0001ae00: 6f74 3b44 6563 696d 616c 4669 656c 6426 ot;DecimalField& │ │ │ │ +0001ae10: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;,. │ │ │ │ +0001ae40: 2020 2020 2020 2020 203c 7370 616e 2063 " │ │ │ │ +0001ae60: 4475 7261 7469 6f6e 4669 656c 6426 7175 DurationField&qu │ │ │ │ +0001ae70: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;,. │ │ │ │ +0001aea0: 2020 2020 2020 203c 7370 616e 2063 6c61 "Fl │ │ │ │ +0001aec0: 6f61 7446 6965 6c64 2671 756f 743b 3c2f oatField",. │ │ │ │ +0001aef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001af00: 2020 3c73 7061 6e20 636c 6173 733d 2273 "Integer │ │ │ │ +0001af20: 4669 656c 6426 7175 6f74 3b3c 2f73 7061 Field",. │ │ │ │ +0001af50: 2020 2020 2020 2020 2020 203c 7370 616e }. │ │ │ │ +0001af80: 2020 2020 3c73 7061 6e20 636c 6173 733d if lh │ │ │ │ +0001afb0: 735f 7479 7065 3c2f 7370 616e 3e20 3c73 s_type n │ │ │ │ +0001afd0: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot in allowed_fie │ │ │ │ +0001b010: 6c64 733c 2f73 7061 6e3e 203c 7370 616e lds or rhs_type not in all │ │ │ │ +0001b0a0: 6f77 6564 5f66 6965 6c64 733c 2f73 7061 owed_fields:. │ │ │ │ +0001b0d0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +0001b0e0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +0001b0f0: 6169 7365 3c2f 7370 616e 3e20 3c73 7061 aise Data │ │ │ │ +0001b110: 6261 7365 4572 726f 723c 2f73 7061 6e3e baseError │ │ │ │ +0001b120: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001b130: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ +0001b140: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b150: 203c 7370 616e 2063 6c61 7373 3d22 7361 f" │ │ │ │ +0001b180: 3b49 6e76 616c 6964 2061 7267 756d 656e ;Invalid argumen │ │ │ │ +0001b190: 7473 2066 6f72 206f 7065 7261 746f 7220 ts for operator │ │ │ │ +0001b1a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 { │ │ │ │ +0001b1c0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.connector}.& │ │ │ │ +0001b240: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +0001b250: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001b260: 203c 7370 616e 2063 6c61 7373 3d22 7022 ). │ │ │ │ +0001b280: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0001b2a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001b2b0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ +0001b2f0: 0a0a 0a3c 7370 616e 2063 6c61 7373 3d22 ...class │ │ │ │ +0001b310: 3c73 7061 6e20 636c 6173 733d 226e 6322 TemporalSubtrac │ │ │ │ +0001b330: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion(CombinedExpre │ │ │ │ +0001b370: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. output │ │ │ │ +0001b3b0: 5f66 6965 6c64 3c2f 7370 616e 3e20 3c73 _field =< │ │ │ │ +0001b3d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Dura │ │ │ │ +0001b420: 7469 6f6e 4669 656c 643c 2f73 7061 6e3e tionField │ │ │ │ +0001b430: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001b440: 2829 3c2f 7370 616e 3e0a 0a20 2020 203c ().. < │ │ │ │ +0001b450: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0001b460: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __ini │ │ │ │ +0001b480: 745f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 t__(self,< │ │ │ │ +0001b4d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lhs, rhs):. │ │ │ │ +0001b540: 2020 2020 2020 3c73 7061 6e20 636c 6173 super()., se │ │ │ │ -0001b5c0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.SUB, rhs)< │ │ │ │ -0001b640: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -0001b660: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> as_sql(se │ │ │ │ -0001b6b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, compiler, connec │ │ │ │ -0001b720: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion):. con │ │ │ │ -0001b760: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -0001b780: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ops │ │ │ │ -0001b7a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001b7b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .check_ex │ │ │ │ -0001b7d0: 7072 6573 7369 6f6e 5f73 7570 706f 7274 pression_support │ │ │ │ -0001b7e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0001b800: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0001b810: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self). lhs< │ │ │ │ -0001b850: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -0001b870: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001b880: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0001b890: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0001b8a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compile(se │ │ │ │ -0001b8f0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.lhs). rhs< │ │ │ │ -0001b960: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -0001b980: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001b990: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0001b9a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0001b9b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compile(se │ │ │ │ -0001ba00: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.rhs). retu │ │ │ │ -0001ba70: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn connec │ │ │ │ -0001ba90: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion.ops.subtract_te │ │ │ │ -0001bb00: 6d70 6f72 616c 733c 2f73 7061 6e3e 3c73 mporals(< │ │ │ │ -0001bb20: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0001bb30: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ -0001bb50: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0001bb60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 lhs.output_ │ │ │ │ -0001bbb0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.get_internal │ │ │ │ -0001bbf0: 5f74 7970 653c 2f73 7061 6e3e 3c73 7061 _type(),< │ │ │ │ -0001bc10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> lhs, rhs. )...
    .[docs].@ │ │ │ │ -0001bd30: 6465 636f 6e73 7472 7563 7469 626c 653c deconstructible< │ │ │ │ -0001bd40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(pa │ │ │ │ -0001bd70: 7468 3c2f 7370 616e 3e3c 7370 616e 2063 th="django.d │ │ │ │ -0001bdb0: 622e 6d6f 6465 6c73 2e46 2671 756f 743b b.models.F" │ │ │ │ -0001bdc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -0001bde0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001bdf0: 636c 6173 733c 2f73 7061 6e3e 203c 7370 class F< │ │ │ │ -0001be10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(Co │ │ │ │ -0001be40: 6d62 696e 6162 6c65 3c2f 7370 616e 3e3c mbinable< │ │ │ │ -0001be50: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001be60: 3a3c 2f73 7061 6e3e 0a3c 7370 616e 2063 :. "" │ │ │ │ -0001bea0: 3b26 7175 6f74 3b41 6e20 6f62 6a65 6374 ;"An object │ │ │ │ -0001beb0: 2063 6170 6162 6c65 206f 6620 7265 736f capable of reso │ │ │ │ -0001bec0: 6c76 696e 6720 7265 6665 7265 6e63 6573 lving references │ │ │ │ -0001bed0: 2074 6f20 6578 6973 7469 6e67 2071 7565 to existing que │ │ │ │ -0001bee0: 7279 206f 626a 6563 7473 2e26 7175 6f74 ry objects." │ │ │ │ -0001bef0: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"".. def __init__(se │ │ │ │ -0001bf70: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, name):< │ │ │ │ -0001bfc0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. < │ │ │ │ -0001bfe0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ -0001c000: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ -0001c010: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . Argume │ │ │ │ -0001c030: 6e74 733a 3c2f 7370 616e 3e0a 3c73 7061 nts:. │ │ │ │ -0001c050: 2020 2020 2020 2a20 6e61 6d65 3a20 7468 * name: th │ │ │ │ -0001c060: 6520 6e61 6d65 206f 6620 7468 6520 6669 e name of the fi │ │ │ │ -0001c070: 656c 6420 7468 6973 2065 7870 7265 7373 eld this express │ │ │ │ -0001c080: 696f 6e20 7265 6665 7265 6e63 6573 3c2f ion references__init__(lhs< │ │ │ │ +0001b5e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0001b600: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001b610: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.SUB, rhs │ │ │ │ +0001b680: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001b690: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ +0001b6b0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f as_sql │ │ │ │ +0001b6d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001b6f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001b700: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, compiler, conn │ │ │ │ +0001b770: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection):< │ │ │ │ +0001b790: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0001b7a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +0001b7b0: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ +0001b7c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001b7d0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .ops.check_ │ │ │ │ +0001b820: 6578 7072 6573 7369 6f6e 5f73 7570 706f expression_suppo │ │ │ │ +0001b830: 7274 3c2f 7370 616e 3e3c 7370 616e 2063 rt(self). lh │ │ │ │ +0001b8a0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = compiler.compile │ │ │ │ +0001b910: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001b930: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001b940: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.lhs). rh │ │ │ │ +0001b9b0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = compiler.compile │ │ │ │ +0001ba20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001ba40: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001ba50: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.rhs). re │ │ │ │ +0001bac0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn conn │ │ │ │ +0001bae0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.ops< │ │ │ │ +0001bb20: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001bb30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 subtract_ │ │ │ │ +0001bb50: 7465 6d70 6f72 616c 733c 2f73 7061 6e3e temporals │ │ │ │ +0001bb60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001bb70: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ +0001bb80: 2020 2020 203c 7370 616e 2063 6c61 7373 self.lhs.outpu │ │ │ │ +0001bc00: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field.< │ │ │ │ +0001bc20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_intern │ │ │ │ +0001bc40: 616c 5f74 7970 653c 2f73 7061 6e3e 3c73 al_type() │ │ │ │ +0001bc60: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , lhs, rhs< │ │ │ │ +0001bcb0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0001bcc0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0001bcd0: 3c2f 7370 616e 3e0a 0a0a 3c64 6976 2063 ...
    .[documentat │ │ │ │ +0001bd70: 6965 5d3c 2f61 3e0a 3c73 7061 6e20 636c ie].@decons │ │ │ │ +0001bd90: 7472 7563 7469 626c 653c 2f73 7061 6e3e tructible │ │ │ │ +0001bda0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001bdb0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (path=&quo │ │ │ │ +0001be00: 743b 646a 616e 676f 2e64 622e 6d6f 6465 t;django.db.mode │ │ │ │ +0001be10: 6c73 2e46 2671 756f 743b 3c2f 7370 616e ls.F").class< │ │ │ │ +0001be50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> F │ │ │ │ +0001be70: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001be80: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (Combinab │ │ │ │ +0001bea0: 6c65 3c2f 7370 616e 3e3c 7370 616e 2063 le):. & │ │ │ │ +0001bef0: 7175 6f74 3b26 7175 6f74 3b26 7175 6f74 quot;"" │ │ │ │ +0001bf00: 3b41 6e20 6f62 6a65 6374 2063 6170 6162 ;An object capab │ │ │ │ +0001bf10: 6c65 206f 6620 7265 736f 6c76 696e 6720 le of resolving │ │ │ │ +0001bf20: 7265 6665 7265 6e63 6573 2074 6f20 6578 references to ex │ │ │ │ +0001bf30: 6973 7469 6e67 2071 7565 7279 206f 626a isting query obj │ │ │ │ +0001bf40: 6563 7473 2e26 7175 6f74 3b26 7175 6f74 ects."" │ │ │ │ +0001bf50: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 0a0a ;".. │ │ │ │ +0001bf60: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +0001bf80: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ +0001bf90: 5f5f 696e 6974 5f5f 3c2f 7370 616e 3e3c __init__< │ │ │ │ +0001bfa0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0001bfb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, name │ │ │ │ +0001c000: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +0001c020: 0a3c 7370 616e 2063 6c61 7373 3d22 7722 . │ │ │ │ +0001c040: 3c73 7061 6e20 636c 6173 733d 2273 6422 ""&qu │ │ │ │ +0001c060: 6f74 3b3c 2f73 7061 6e3e 0a3c 7370 616e ot;. │ │ │ │ +0001c080: 2020 2020 4172 6775 6d65 6e74 733a 3c2f Arguments:. & │ │ │ │ -0001c0b0: 7175 6f74 3b26 7175 6f74 3b26 7175 6f74 quot;"" │ │ │ │ -0001c0c0: 3b3c 2f73 7061 6e3e 0a20 2020 2020 2020 ;. │ │ │ │ -0001c0d0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.name │ │ │ │ -0001c120: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = name.. def __repr__< │ │ │ │ -0001c190: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0001c1c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -0001c200: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn " │ │ │ │ -0001c220: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;{}({})".form │ │ │ │ -0001c2c0: 6174 3c2f 7370 616e 3e3c 7370 616e 2063 at(self.__class__< │ │ │ │ -0001c330: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -0001c360: 5f6e 616d 655f 5f3c 2f73 7061 6e3e 3c73 _name__,< │ │ │ │ -0001c380: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.name< │ │ │ │ -0001c3d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ -0001c3f0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0001c410: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -0001c420: 7265 736f 6c76 655f 6578 7072 6573 7369 resolve_expressi │ │ │ │ -0001c430: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(. self< │ │ │ │ -0001c470: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0001c490: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ -0001c4a0: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery=None< │ │ │ │ -0001c4e0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001c4f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c allow_jo │ │ │ │ -0001c510: 696e 733c 2f73 7061 6e3e 3c73 7061 6e20 ins=True,< │ │ │ │ -0001c560: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> reuse=None │ │ │ │ -0001c5b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0001c5d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001c5e0: 7375 6d6d 6172 697a 653c 2f73 7061 6e3e summarize │ │ │ │ -0001c5f0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001c600: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =False, fo │ │ │ │ -0001c650: 725f 7361 7665 3c2f 7370 616e 3e3c 7370 r_save=False. ): │ │ │ │ -0001c6b0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0001c6d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> query.resol │ │ │ │ -0001c720: 7665 5f72 6566 3c2f 7370 616e 3e3c 7370 ve_ref(self.name, all │ │ │ │ -0001c7c0: 6f77 5f6a 6f69 6e73 3c2f 7370 616e 3e3c ow_joins< │ │ │ │ -0001c7d0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001c7e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c reuse, sum │ │ │ │ -0001c830: 6d61 7269 7a65 3c2f 7370 616e 3e3c 7370 marize).. def replace_e │ │ │ │ -0001c890: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(self, re │ │ │ │ -0001c900: 706c 6163 656d 656e 7473 3c2f 7370 616e placements):. │ │ │ │ -0001c930: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -0001c950: 203c 7370 616e 2063 6c61 7373 3d22 6e22 replacements.get< │ │ │ │ -0001c9a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0001c9d0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, self< │ │ │ │ -0001ca10: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001ca20: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0001ca40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c asc(self │ │ │ │ -0001ca90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0001cab0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001cac0: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **kwargs< │ │ │ │ -0001cae0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -0001cb00: 2020 2020 2020 2020 3c73 7061 6e20 636c return OrderBy(sel │ │ │ │ -0001cb70: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -0001cb90: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **kwargs │ │ │ │ -0001cbc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -0001cbe0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -0001cc00: 3c73 7061 6e20 636c 6173 733d 226e 6622 desc(self │ │ │ │ -0001cc50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001cc60: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , **kwargs< │ │ │ │ -0001cca0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001ccb0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0001ccc0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0001cce0: 7370 616e 2063 6c61 7373 3d22 6e22 3e4f span class="n">O │ │ │ │ -0001ccf0: 7264 6572 4279 3c2f 7370 616e 3e3c 7370 rderBy(self, descen │ │ │ │ -0001cd60: 6469 6e67 3c2f 7370 616e 3e3c 7370 616e ding=True< │ │ │ │ -0001cda0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001cdb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **kwargs)< │ │ │ │ -0001ce00: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -0001ce20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __eq__(se │ │ │ │ -0001ce70: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, other): │ │ │ │ -0001cec0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001ced0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001cee0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ -0001cf00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.__class__ == ot │ │ │ │ -0001cf70: 6865 723c 2f73 7061 6e3e 3c73 7061 6e20 her.__class__ and │ │ │ │ -0001cfd0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.name │ │ │ │ -0001d020: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001d030: 3d3d 3c2f 7370 616e 3e20 3c73 7061 6e20 == other< │ │ │ │ -0001d050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.na │ │ │ │ -0001d080: 6d65 3c2f 7370 616e 3e0a 0a20 2020 203c me.. < │ │ │ │ -0001d090: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0001d0a0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __has │ │ │ │ -0001d0c0: 685f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 h__(self): │ │ │ │ -0001d110: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001d120: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001d130: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return h │ │ │ │ -0001d150: 6173 683c 2f73 7061 6e3e 3c73 7061 6e20 ash(self.< │ │ │ │ -0001d1a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>name).. < │ │ │ │ -0001d1e0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0001d1f0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef copy< │ │ │ │ -0001d210: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0001d240: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -0001d280: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn copy.cop │ │ │ │ -0001d2d0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y( │ │ │ │ -0001d2f0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self)
    ....cl │ │ │ │ -0001d340: 6173 733c 2f73 7061 6e3e 203c 7370 616e ass Reso │ │ │ │ -0001d360: 6c76 6564 4f75 7465 7252 6566 3c2f 7370 lvedOuterRef(F):. │ │ │ │ -0001d3d0: 203c 2f73 7061 6e3e 3c73 7061 6e20 636c "& │ │ │ │ -0001d3f0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;"
    . An objec │ │ │ │ -0001d420: 7420 7468 6174 2063 6f6e 7461 696e 7320 t that contains │ │ │ │ -0001d430: 6120 7265 6665 7265 6e63 6520 746f 2061 a reference to a │ │ │ │ -0001d440: 6e20 6f75 7465 7220 7175 6572 792e 3c2f n outer query... In t │ │ │ │ -0001d470: 6869 7320 6361 7365 2c20 7468 6520 7265 his case, the re │ │ │ │ -0001d480: 6665 7265 6e63 6520 746f 2074 6865 206f ference to the o │ │ │ │ -0001d490: 7574 6572 2071 7565 7279 2068 6173 2062 uter query has b │ │ │ │ -0001d4a0: 6565 6e20 7265 736f 6c76 6564 2062 6563 een resolved bec │ │ │ │ -0001d4b0: 6175 7365 3c2f 7370 616e 3e0a 3c73 7061 ause. │ │ │ │ -0001d4d0: 2074 6865 2069 6e6e 6572 2071 7565 7279 the inner query │ │ │ │ -0001d4e0: 2068 6173 2062 6565 6e20 7573 6564 2061 has been used a │ │ │ │ -0001d4f0: 7320 6120 7375 6271 7565 7279 2e3c 2f73 s a subquery.. " │ │ │ │ -0001d520: 2671 756f 743b 2671 756f 743b 3c2f 7370 "".. contain │ │ │ │ -0001d550: 735f 6167 6772 6567 6174 653c 2f73 7061 s_aggregate = Fal │ │ │ │ -0001d590: 7365 3c2f 7370 616e 3e0a 2020 2020 3c73 se. co │ │ │ │ -0001d5b0: 6e74 6169 6e73 5f6f 7665 725f 636c 6175 ntains_over_clau │ │ │ │ -0001d5c0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se = False │ │ │ │ -0001d600: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0001d620: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sql< │ │ │ │ -0001d640: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0001d650: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, *args< │ │ │ │ -0001d6c0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001d6d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **kwargs): │ │ │ │ -0001d720: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001d730: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001d740: 7261 6973 653c 2f73 7061 6e3e 203c 7370 raise Va │ │ │ │ -0001d760: 6c75 6545 7272 6f72 3c2f 7370 616e 3e3c lueError< │ │ │ │ -0001d770: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0001d780: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001d790: 2020 2020 3c73 7061 6e20 636c 6173 733d "This │ │ │ │ -0001d7b0: 7175 6572 7973 6574 2063 6f6e 7461 696e queryset contain │ │ │ │ -0001d7c0: 7320 6120 7265 6665 7265 6e63 6520 746f s a reference to │ │ │ │ -0001d7d0: 2061 6e20 6f75 7465 7220 7175 6572 7920 an outer query │ │ │ │ -0001d7e0: 616e 6420 6d61 7920 2671 756f 743b 3c2f and may ". │ │ │ │ -0001d800: 2020 3c73 7061 6e20 636c 6173 733d 2273 "only be │ │ │ │ -0001d820: 2075 7365 6420 696e 2061 2073 7562 7175 used in a subqu │ │ │ │ -0001d830: 6572 792e 2671 756f 743b 3c2f 7370 616e ery.". ).. def resolve_expr │ │ │ │ -0001d8a0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(self, *args, **< │ │ │ │ -0001d960: 7370 616e 2063 6c61 7373 3d22 6e22 3e6b span class="n">k │ │ │ │ -0001d970: 7761 7267 733c 2f73 7061 6e3e 3c73 7061 wargs):. co │ │ │ │ -0001d9b0: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l = super< │ │ │ │ -0001d9f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0001da00: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ -0001da20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001da30: 7265 736f 6c76 655f 6578 7072 6573 7369 resolve_expressi │ │ │ │ -0001da40: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(*args, **< │ │ │ │ -0001dac0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>kwargs). │ │ │ │ -0001db00: 2020 2020 3c73 7061 6e20 636c 6173 733d if co │ │ │ │ -0001db30: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l. │ │ │ │ -0001db50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001db60: 636f 6e74 6169 6e73 5f6f 7665 725f 636c contains_over_cl │ │ │ │ -0001db70: 6175 7365 3c2f 7370 616e 3e3c 7370 616e ause:. │ │ │ │ -0001dba0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001dbb0: 7261 6973 653c 2f73 7061 6e3e 203c 7370 raise Not │ │ │ │ -0001dbd0: 5375 7070 6f72 7465 6445 7272 6f72 3c2f SupportedError(. │ │ │ │ -0001dc00: 2020 2020 2020 2020 2020 2020 2020 3c73 f │ │ │ │ -0001dc20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "Re │ │ │ │ -0001dc40: 6665 7265 6e63 696e 6720 6f75 7465 7220 ferencing outer │ │ │ │ -0001dc50: 7175 6572 7920 7769 6e64 6f77 2065 7870 query window exp │ │ │ │ -0001dc60: 7265 7373 696f 6e20 6973 206e 6f74 2073 ression is not s │ │ │ │ -0001dc70: 7570 706f 7274 6564 3a20 2671 756f 743b upported: " │ │ │ │ -0001dc80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001dc90: 2020 2020 2020 2020 3c73 7061 6e20 636c f"< │ │ │ │ -0001dcd0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -0001dce0: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {self.name │ │ │ │ -0001dd30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 } │ │ │ │ -0001dd50: 3c73 7061 6e20 636c 6173 733d 2273 3222 .". │ │ │ │ -0001dd70: 2020 2020 2020 2020 2020 2020 3c73 7061 ). # │ │ │ │ -0001ddb0: 4649 584d 453a 2052 656e 616d 6520 706f FIXME: Rename po │ │ │ │ -0001ddc0: 7373 6962 6c79 5f6d 756c 7469 7661 6c75 ssibly_multivalu │ │ │ │ -0001ddd0: 6564 2074 6f20 6d75 6c74 6976 616c 7565 ed to multivalue │ │ │ │ -0001dde0: 6420 616e 6420 6669 7820 6465 7465 6374 d and fix detect │ │ │ │ -0001ddf0: 696f 6e3c 2f73 7061 6e3e 0a20 2020 2020 ion. │ │ │ │ -0001de00: 2020 203c 7370 616e 2063 6c61 7373 3d22 # for non-mu │ │ │ │ -0001de20: 6c74 6976 616c 7565 6420 4a4f 494e 7320 ltivalued JOINs │ │ │ │ -0001de30: 2865 2e67 2e20 666f 7265 6967 6e20 6b65 (e.g. foreign ke │ │ │ │ -0001de40: 7920 6669 656c 6473 292e 2054 6869 7320 y fields). This │ │ │ │ -0001de50: 7368 6f75 6c64 2074 616b 653c 2f73 7061 should take. # in │ │ │ │ -0001de80: 746f 2061 6363 6f75 6e74 c2a0 6f6e 6c79 to account..only │ │ │ │ -0001de90: 206d 616e 792d 746f 2d6d 616e 7920 616e many-to-many an │ │ │ │ -0001dea0: 6420 6f6e 652d 746f 2d6d 616e 7920 7265 d one-to-many re │ │ │ │ -0001deb0: 6c61 7469 6f6e 7368 6970 732e 3c2f 7370 lationships.. col< │ │ │ │ -0001dee0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.po │ │ │ │ -0001df10: 7373 6962 6c79 5f6d 756c 7469 7661 6c75 ssibly_multivalu │ │ │ │ -0001df20: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed = LOOKUP_SEP in │ │ │ │ -0001df80: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.name. │ │ │ │ -0001dfd0: 2020 2020 2020 2020 3c73 7061 6e20 636c return col │ │ │ │ -0001e010: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0001e030: 203c 7370 616e 2063 6c61 7373 3d22 6e66 relabeled_clon │ │ │ │ -0001e050: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0001e070: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, relabels):. │ │ │ │ -0001e0e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ -0001e120: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0001e140: 203c 7370 616e 2063 6c61 7373 3d22 6e66 get_group_by_c │ │ │ │ -0001e160: 6f6c 733c 2f73 7061 6e3e 3c73 7061 6e20 ols(self): │ │ │ │ -0001e1b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001e1c0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0001e1d0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return [] │ │ │ │ -0001e1f0: 3c2f 7370 616e 3e0a 0a0a 3c64 6976 2063 ...
    .[docs].cl │ │ │ │ -0001e2b0: 6173 733c 2f73 7061 6e3e 203c 7370 616e ass Oute │ │ │ │ -0001e2d0: 7252 6566 3c2f 7370 616e 3e3c 7370 616e rRef(F):. contain │ │ │ │ -0001e340: 735f 6167 6772 6567 6174 653c 2f73 7061 s_aggregate = Fal │ │ │ │ -0001e380: 7365 3c2f 7370 616e 3e0a 2020 2020 3c73 se. co │ │ │ │ -0001e3a0: 6e74 6169 6e73 5f6f 7665 725f 636c 6175 ntains_over_clau │ │ │ │ -0001e3b0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se = False │ │ │ │ -0001e3f0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0001e410: 203c 7370 616e 2063 6c61 7373 3d22 6e66 resolve_expres │ │ │ │ -0001e430: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(self< │ │ │ │ -0001e470: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001e480: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c * │ │ │ │ -0001e4a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001e4b0: 6172 6773 3c2f 7370 616e 3e3c 7370 616e args, **kwa │ │ │ │ -0001e500: 7267 733c 2f73 7061 6e3e 3c73 7061 6e20 rgs):. if isinstanc │ │ │ │ -0001e560: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0001e580: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.name< │ │ │ │ -0001e5d0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0001e5e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.__c │ │ │ │ -0001e630: 6c61 7373 5f5f 3c2f 7370 616e 3e3c 7370 lass__):< │ │ │ │ -0001e650: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0001e660: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -0001e680: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.name │ │ │ │ -0001e6d0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0001e6f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ResolvedO │ │ │ │ -0001e710: 7574 6572 5265 663c 2f73 7061 6e3e 3c73 uterRef(< │ │ │ │ -0001e730: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.name).. │ │ │ │ -0001e7a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def r │ │ │ │ -0001e7d0: 656c 6162 656c 6564 5f63 6c6f 6e65 3c2f elabeled_clone(se │ │ │ │ -0001e810: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, relabels):. │ │ │ │ -0001e870: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -0001e890: 203c 7370 616e 2063 6c61 7373 3d22 6270 self....
    .[docs].@deconstruct │ │ │ │ -0001e970: 6962 6c65 3c2f 7370 616e 3e3c 7370 616e ible(path=< │ │ │ │ -0001e9c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"dja │ │ │ │ -0001e9e0: 6e67 6f2e 6462 2e6d 6f64 656c 732e 4675 ngo.db.models.Fu │ │ │ │ -0001e9f0: 6e63 2671 756f 743b 3c2f 7370 616e 3e3c nc"< │ │ │ │ -0001ea00: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001ea10: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c .class Func(SQLiteN │ │ │ │ -0001ea80: 756d 6572 6963 4d69 7869 6e3c 2f73 7061 umericMixin, Expre │ │ │ │ -0001eac0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. ""&q │ │ │ │ -0001eb20: 756f 743b 416e 2053 514c 2066 756e 6374 uot;An SQL funct │ │ │ │ -0001eb30: 696f 6e20 6361 6c6c 2e26 7175 6f74 3b26 ion call."& │ │ │ │ -0001eb40: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;".. function │ │ │ │ -0001eb70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -0001eb90: 203c 7370 616e 2063 6c61 7373 3d22 6b63 None. │ │ │ │ -0001ebb0: 2020 3c73 7061 6e20 636c 6173 733d 226e template = &quo │ │ │ │ -0001ec00: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;%(func │ │ │ │ -0001ec20: 7469 6f6e 2973 3c2f 7370 616e 3e3c 7370 tion)s(< │ │ │ │ -0001ec40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%(express │ │ │ │ -0001ec60: 696f 6e73 2973 3c2f 7370 616e 3e3c 7370 ions)s)& │ │ │ │ -0001ec80: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ -0001ec90: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arg_joiner = &qu │ │ │ │ -0001ece0: 6f74 3b2c 2026 7175 6f74 3b3c 2f73 7061 ot;, ". arity = No │ │ │ │ -0001ed40: 6e65 3c2f 7370 616e 3e20 203c 7370 616e ne # Th │ │ │ │ -0001ed60: 6520 6e75 6d62 6572 206f 6620 6172 6775 e number of argu │ │ │ │ -0001ed70: 6d65 6e74 7320 7468 6520 6675 6e63 7469 ments the functi │ │ │ │ -0001ed80: 6f6e 2061 6363 6570 7473 2e3c 2f73 7061 on accepts... def __init__(self │ │ │ │ -0001ee00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0001ee20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001ee30: 2a3c 2f73 7061 6e3e 3c73 7061 6e20 636c *expressi │ │ │ │ -0001ee50: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons, output_field< │ │ │ │ -0001ee90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ -0001eec0: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one, **extr │ │ │ │ -0001ef10: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a):. if self │ │ │ │ -0001ef70: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001ef80: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .arity is │ │ │ │ -0001efc0: 3c73 7061 6e20 636c 6173 733d 226f 7722 not Non │ │ │ │ -0001eff0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e and len │ │ │ │ -0001f030: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001f040: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (expressi │ │ │ │ -0001f060: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons) != se │ │ │ │ -0001f0b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.arity:. │ │ │ │ -0001f110: 2020 3c73 7061 6e20 636c 6173 733d 226b raise < │ │ │ │ -0001f130: 7370 616e 2063 6c61 7373 3d22 6e65 223e span class="ne"> │ │ │ │ -0001f140: 5479 7065 4572 726f 723c 2f73 7061 6e3e TypeError │ │ │ │ -0001f150: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001f160: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ -0001f170: 2020 2020 2020 2020 203c 7370 616e 2063 " │ │ │ │ -0001f190: 2623 3339 3b3c 2f73 7061 6e3e 3c73 7061 '%s< │ │ │ │ -0001f1b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>' tak │ │ │ │ -0001f1d0: 6573 2065 7861 6374 6c79 203c 2f73 7061 es exactly %s %s< │ │ │ │ -0001f230: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -0001f240: 2028 3c2f 7370 616e 3e3c 7370 616e 2063 (%s given)" │ │ │ │ -0001f280: 3b3c 2f73 7061 6e3e 0a20 2020 2020 2020 ;. │ │ │ │ -0001f290: 2020 2020 2020 2020 203c 7370 616e 2063 % (. │ │ │ │ -0001f2d0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0001f2e0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0001f2f0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.__class__.__n │ │ │ │ -0001f360: 616d 655f 5f3c 2f73 7061 6e3e 3c73 7061 ame__,. │ │ │ │ -0001f390: 2020 2020 2020 2020 203c 7370 616e 2063 self.ari │ │ │ │ -0001f3e0: 7479 3c2f 7370 616e 3e3c 7370 616e 2063 ty,. │ │ │ │ -0001f410: 2020 2020 2020 3c73 7061 6e20 636c 6173 "arg │ │ │ │ -0001f430: 756d 656e 7426 7175 6f74 3b3c 2f73 7061 ument" if se │ │ │ │ -0001f470: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.arity == │ │ │ │ -0001f4c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c 1 else & │ │ │ │ -0001f510: 7175 6f74 3b61 7267 756d 656e 7473 2671 quot;arguments&q │ │ │ │ -0001f520: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;,. │ │ │ │ -0001f550: 2020 2020 2020 2020 3c73 7061 6e20 636c len(expre │ │ │ │ -0001f5a0: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions),< │ │ │ │ -0001f5c0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0001f5d0: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ -0001f5f0: 2020 2020 2020 2020 2020 2020 3c73 7061 ). su │ │ │ │ -0001f630: 7065 723c 2f73 7061 6e3e 3c73 7061 6e20 per().__in │ │ │ │ -0001f680: 6974 5f5f 3c2f 7370 616e 3e3c 7370 616e it__(output_field< │ │ │ │ -0001f6c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=ou │ │ │ │ -0001f6f0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field). │ │ │ │ -0001f720: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -0001f750: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>source_exp │ │ │ │ -0001f770: 7265 7373 696f 6e73 3c2f 7370 616e 3e20 ressions │ │ │ │ -0001f780: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001f790: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self._pa │ │ │ │ -0001f7e0: 7273 655f 6578 7072 6573 7369 6f6e 733c rse_expressions< │ │ │ │ -0001f7f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(*< │ │ │ │ -0001f820: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>expression │ │ │ │ -0001f840: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ -0001f860: 0a20 2020 2020 2020 203c 7370 616e 2063 . self.ext │ │ │ │ -0001f8b0: 7261 3c2f 7370 616e 3e20 3c73 7061 6e20 ra = extra. │ │ │ │ -0001f8f0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -0001f910: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __repr__ │ │ │ │ -0001f930: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0001f940: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0001f980: 2020 2020 2020 3c73 7061 6e20 636c 6173 args = self │ │ │ │ -0001f9d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0001f9f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -0001fa00: 7267 5f6a 6f69 6e65 723c 2f73 7061 6e3e rg_joiner │ │ │ │ -0001fa10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001fa20: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .join(str< │ │ │ │ -0001fa70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ar │ │ │ │ -0001faa0: 673c 2f73 7061 6e3e 3c73 7061 6e20 636c g) │ │ │ │ -0001fac0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 for arg< │ │ │ │ -0001faf0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in self.< │ │ │ │ -0001fb40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>source_exp │ │ │ │ -0001fb60: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ -0001fb70: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0001fb80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0001fb90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0001fba0: 6578 7472 613c 2f73 7061 6e3e 203c 7370 extra = {** │ │ │ │ -0001fbf0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.extra │ │ │ │ -0001fc40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0001fc60: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001fc70: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **self │ │ │ │ +0001c0b0: 2a20 6e61 6d65 3a20 7468 6520 6e61 6d65 * name: the name │ │ │ │ +0001c0c0: 206f 6620 7468 6520 6669 656c 6420 7468 of the field th │ │ │ │ +0001c0d0: 6973 2065 7870 7265 7373 696f 6e20 7265 is expression re │ │ │ │ +0001c0e0: 6665 7265 6e63 6573 3c2f 7370 616e 3e0a ferences. │ │ │ │ +0001c0f0: 3c73 7061 6e20 636c 6173 733d 2273 6422 "& │ │ │ │ +0001c110: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;". self │ │ │ │ +0001c140: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0001c160: 7370 616e 2063 6c61 7373 3d22 6e22 3e6e span class="n">n │ │ │ │ +0001c170: 616d 653c 2f73 7061 6e3e 203c 7370 616e ame = name. │ │ │ │ +0001c1b0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0001c1d0: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __repr__ │ │ │ │ +0001c1f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001c200: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +0001c240: 2020 2020 2020 3c73 7061 6e20 636c 6173 return "{}({}< │ │ │ │ +0001c2d0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +0001c2e0: 2926 7175 6f74 3b3c 2f73 7061 6e3e 3c73 )".< │ │ │ │ +0001c300: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>format(self │ │ │ │ +0001c350: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0001c370: 7370 616e 2063 6c61 7373 3d22 766d 223e span class="vm"> │ │ │ │ +0001c380: 5f5f 636c 6173 735f 5f3c 2f73 7061 6e3e __class__ │ │ │ │ +0001c390: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001c3a0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__name_ │ │ │ │ +0001c3c0: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _, │ │ │ │ +0001c3e0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.name │ │ │ │ +0001c430: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001c440: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ +0001c460: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f resolv │ │ │ │ +0001c480: 655f 6578 7072 6573 7369 6f6e 3c2f 7370 e_expression(. │ │ │ │ +0001c4b0: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +0001c4d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001c4e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , query=No │ │ │ │ +0001c530: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, allow_joins=Tru │ │ │ │ +0001c5a0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +0001c5c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 reuse=None, summar │ │ │ │ +0001c640: 697a 653c 2f73 7061 6e3e 3c73 7061 6e20 ize=False< │ │ │ │ +0001c680: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0001c690: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c for_save │ │ │ │ +0001c6b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ +0001c6d0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +0001c6e0: 4661 6c73 653c 2f73 7061 6e3e 0a20 2020 False. │ │ │ │ +0001c6f0: 203c 7370 616e 2063 6c61 7373 3d22 7022 ):. │ │ │ │ +0001c710: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0001c730: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query.resolve_ref │ │ │ │ +0001c780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001c7a0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001c7b0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.name,< │ │ │ │ +0001c800: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> allow_joi │ │ │ │ +0001c820: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns, reuse,< │ │ │ │ +0001c870: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ +0001c890: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0001c8b0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0001c8d0: 3c73 7061 6e20 636c 6173 733d 226e 6622 replace_express │ │ │ │ +0001c8f0: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ +0001c930: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0001c940: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c replacem │ │ │ │ +0001c960: 656e 7473 3c2f 7370 616e 3e3c 7370 616e ents):. ret │ │ │ │ +0001c9a0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn repla │ │ │ │ +0001c9c0: 6365 6d65 6e74 733c 2f73 7061 6e3e 3c73 cements.< │ │ │ │ +0001c9e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get │ │ │ │ +0001ca00: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001ca10: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, se │ │ │ │ +0001ca60: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf).. def asc(self, **kwargs │ │ │ │ +0001cb40: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001cb50: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +0001cb60: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0001cb80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001cb90: 4f72 6465 7242 793c 2f73 7061 6e3e 3c73 OrderBy(< │ │ │ │ +0001cbb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, **kwargs).. < │ │ │ │ +0001cc40: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0001cc50: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef desc< │ │ │ │ +0001cc70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +0001cca0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, **kwar │ │ │ │ +0001ccf0: 6773 3c2f 7370 616e 3e3c 7370 616e 2063 gs):. retur │ │ │ │ +0001cd30: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n OrderBy │ │ │ │ +0001cd50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001cd70: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001cd80: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, descending=Tr │ │ │ │ +0001cdf0: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue, **kwarg │ │ │ │ +0001ce40: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ +0001ce60: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +0001ce80: 203c 7370 616e 2063 6c61 7373 3d22 666d __eq__< │ │ │ │ +0001cea0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0001ceb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, othe │ │ │ │ +0001cf00: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r):. return │ │ │ │ +0001cf40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.__c │ │ │ │ +0001cf90: 6c61 7373 5f5f 3c2f 7370 616e 3e20 3c73 lass__ == │ │ │ │ +0001cfb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c other.__c │ │ │ │ +0001d000: 6c61 7373 5f5f 3c2f 7370 616e 3e20 3c73 lass__ a │ │ │ │ +0001d020: 6e64 3c2f 7370 616e 3e20 3c73 7061 6e20 nd self< │ │ │ │ +0001d040: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.na │ │ │ │ +0001d070: 6d65 3c2f 7370 616e 3e20 3c73 7061 6e20 me == other │ │ │ │ +0001d0b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001d0c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .name.. def __hash__(sel │ │ │ │ +0001d150: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ +0001d190: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c hash(sel │ │ │ │ +0001d1e0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0001d200: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001d210: 6e61 6d65 3c2f 7370 616e 3e3c 7370 616e name).. def copy │ │ │ │ +0001d270: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001d280: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +0001d2c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return copy< │ │ │ │ +0001d300: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001d310: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 copy(self< │ │ │ │ +0001d360: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>)....class ResolvedOu │ │ │ │ +0001d3c0: 7465 7252 6566 3c2f 7370 616e 3e3c 7370 terRef(F):< │ │ │ │ +0001d410: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. ""& │ │ │ │ +0001d450: 7175 6f74 3b3c 2f73 7061 6e3e 0a3c 7370 quot;. │ │ │ │ +0001d470: 2020 416e 206f 626a 6563 7420 7468 6174 An object that │ │ │ │ +0001d480: 2063 6f6e 7461 696e 7320 6120 7265 6665 contains a refe │ │ │ │ +0001d490: 7265 6e63 6520 746f 2061 6e20 6f75 7465 rence to an oute │ │ │ │ +0001d4a0: 7220 7175 6572 792e 3c2f 7370 616e 3e0a r query.. │ │ │ │ +0001d4b0: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . In this ca │ │ │ │ +0001d4d0: 7365 2c20 7468 6520 7265 6665 7265 6e63 se, the referenc │ │ │ │ +0001d4e0: 6520 746f 2074 6865 206f 7574 6572 2071 e to the outer q │ │ │ │ +0001d4f0: 7565 7279 2068 6173 2062 6565 6e20 7265 uery has been re │ │ │ │ +0001d500: 736f 6c76 6564 2062 6563 6175 7365 3c2f solved because. the i │ │ │ │ +0001d530: 6e6e 6572 2071 7565 7279 2068 6173 2062 nner query has b │ │ │ │ +0001d540: 6565 6e20 7573 6564 2061 7320 6120 7375 een used as a su │ │ │ │ +0001d550: 6271 7565 7279 2e3c 2f73 7061 6e3e 0a3c bquery..< │ │ │ │ +0001d560: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +0001d570: 2020 2020 2671 756f 743b 2671 756f 743b "" │ │ │ │ +0001d580: 2671 756f 743b 3c2f 7370 616e 3e0a 0a20 ".. │ │ │ │ +0001d590: 2020 203c 7370 616e 2063 6c61 7373 3d22 contains_aggr │ │ │ │ +0001d5b0: 6567 6174 653c 2f73 7061 6e3e 203c 7370 egate = False. contains │ │ │ │ +0001d610: 5f6f 7665 725f 636c 6175 7365 3c2f 7370 _over_clause = Fa │ │ │ │ +0001d650: 6c73 653c 2f73 7061 6e3e 0a0a 2020 2020 lse.. │ │ │ │ +0001d660: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0001d670: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_s │ │ │ │ +0001d690: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql(self, *ar │ │ │ │ +0001d710: 6773 3c2f 7370 616e 3e3c 7370 616e 2063 gs, **kwarg │ │ │ │ +0001d760: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s):. raise< │ │ │ │ +0001d7a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ValueErr │ │ │ │ +0001d7c0: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063 or(. & │ │ │ │ +0001d800: 7175 6f74 3b54 6869 7320 7175 6572 7973 quot;This querys │ │ │ │ +0001d810: 6574 2063 6f6e 7461 696e 7320 6120 7265 et contains a re │ │ │ │ +0001d820: 6665 7265 6e63 6520 746f 2061 6e20 6f75 ference to an ou │ │ │ │ +0001d830: 7465 7220 7175 6572 7920 616e 6420 6d61 ter query and ma │ │ │ │ +0001d840: 7920 2671 756f 743b 3c2f 7370 616e 3e0a y ". │ │ │ │ +0001d850: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ +0001d870: 6f74 3b6f 6e6c 7920 6265 2075 7365 6420 ot;only be used │ │ │ │ +0001d880: 696e 2061 2073 7562 7175 6572 792e 2671 in a subquery.&q │ │ │ │ +0001d890: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ +0001d8a0: 2020 2020 3c73 7061 6e20 636c 6173 733d ).. │ │ │ │ +0001d8c0: 2020 3c73 7061 6e20 636c 6173 733d 226b def re │ │ │ │ +0001d8f0: 736f 6c76 655f 6578 7072 6573 7369 6f6e solve_expression │ │ │ │ +0001d900: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001d920: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001d930: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, *args │ │ │ │ +0001d980: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0001d9a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001d9b0: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **kwargs< │ │ │ │ +0001d9d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0001d9f0: 2020 2020 2020 2020 3c73 7061 6e20 636c col = sup │ │ │ │ +0001da40: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er().resolv │ │ │ │ +0001da90: 655f 6578 7072 6573 7369 6f6e 3c2f 7370 e_expression(*args,< │ │ │ │ +0001db00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ +0001db20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001db30: 6b77 6172 6773 3c2f 7370 616e 3e3c 7370 kwargs). if │ │ │ │ +0001db70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c col.contai │ │ │ │ +0001dbc0: 6e73 5f6f 7665 725f 636c 6175 7365 3c2f ns_over_clause:. │ │ │ │ +0001dbf0: 2020 2020 2020 2020 2020 3c73 7061 6e20 raise< │ │ │ │ +0001dc10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> NotSuppor │ │ │ │ +0001dc30: 7465 6445 7272 6f72 3c2f 7370 616e 3e3c tedError< │ │ │ │ +0001dc40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0001dc50: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0001dc60: 2020 2020 2020 2020 3c73 7061 6e20 636c f"Referenc │ │ │ │ +0001dca0: 696e 6720 6f75 7465 7220 7175 6572 7920 ing outer query │ │ │ │ +0001dcb0: 7769 6e64 6f77 2065 7870 7265 7373 696f window expressio │ │ │ │ +0001dcc0: 6e20 6973 206e 6f74 2073 7570 706f 7274 n is not support │ │ │ │ +0001dcd0: 6564 3a20 2671 756f 743b 3c2f 7370 616e ed: ". │ │ │ │ +0001dcf0: 2020 3c73 7061 6e20 636c 6173 733d 2273 f&quo │ │ │ │ +0001dd20: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;{self.< │ │ │ │ +0001dd70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>name}.&quo │ │ │ │ +0001ddc0: 743b 3c2f 7370 616e 3e0a 2020 2020 2020 t;. │ │ │ │ +0001ddd0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0001ddf0: 2020 2020 2020 203c 7370 616e 2063 6c61 # FIXME: │ │ │ │ +0001de10: 2052 656e 616d 6520 706f 7373 6962 6c79 Rename possibly │ │ │ │ +0001de20: 5f6d 756c 7469 7661 6c75 6564 2074 6f20 _multivalued to │ │ │ │ +0001de30: 6d75 6c74 6976 616c 7565 6420 616e 6420 multivalued and │ │ │ │ +0001de40: 6669 7820 6465 7465 6374 696f 6e3c 2f73 fix detection. # │ │ │ │ +0001de70: 666f 7220 6e6f 6e2d 6d75 6c74 6976 616c for non-multival │ │ │ │ +0001de80: 7565 6420 4a4f 494e 7320 2865 2e67 2e20 ued JOINs (e.g. │ │ │ │ +0001de90: 666f 7265 6967 6e20 6b65 7920 6669 656c foreign key fiel │ │ │ │ +0001dea0: 6473 292e 2054 6869 7320 7368 6f75 6c64 ds). This should │ │ │ │ +0001deb0: 2074 616b 653c 2f73 7061 6e3e 0a20 2020 take. │ │ │ │ +0001dec0: 2020 2020 203c 7370 616e 2063 6c61 7373 # into acc │ │ │ │ +0001dee0: 6f75 6e74 c2a0 6f6e 6c79 206d 616e 792d ount..only many- │ │ │ │ +0001def0: 746f 2d6d 616e 7920 616e 6420 6f6e 652d to-many and one- │ │ │ │ +0001df00: 746f 2d6d 616e 7920 7265 6c61 7469 6f6e to-many relation │ │ │ │ +0001df10: 7368 6970 732e 3c2f 7370 616e 3e0a 2020 ships.. │ │ │ │ +0001df20: 2020 2020 2020 3c73 7061 6e20 636c 6173 col │ │ │ │ +0001df40: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001df50: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .possibly │ │ │ │ +0001df70: 5f6d 756c 7469 7661 6c75 6564 3c2f 7370 _multivalued = LOO │ │ │ │ +0001dfb0: 4b55 505f 5345 503c 2f73 7061 6e3e 203c KUP_SEP < │ │ │ │ +0001dfc0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +0001dfd0: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in self< │ │ │ │ +0001dff0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.na │ │ │ │ +0001e020: 6d65 3c2f 7370 616e 3e0a 2020 2020 2020 me. │ │ │ │ +0001e030: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0001e050: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001e060: 636f 6c3c 2f73 7061 6e3e 0a0a 2020 2020 col.. │ │ │ │ +0001e070: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0001e080: 6465 663c 2f73 7061 6e3e 203c 7370 616e def rela │ │ │ │ +0001e0a0: 6265 6c65 645f 636c 6f6e 653c 2f73 7061 beled_clone(self< │ │ │ │ +0001e0e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0001e100: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +0001e110: 656c 6162 656c 733c 2f73 7061 6e3e 3c73 elabels): │ │ │ │ +0001e130: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0001e140: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0001e150: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ +0001e170: 656c 663c 2f73 7061 6e3e 0a0a 2020 2020 elf.. │ │ │ │ +0001e180: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0001e190: 6465 663c 2f73 7061 6e3e 203c 7370 616e def get_ │ │ │ │ +0001e1b0: 6772 6f75 705f 6279 5f63 6f6c 733c 2f73 group_by_cols(sel │ │ │ │ +0001e1f0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ +0001e230: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c []...
    .< │ │ │ │ +0001e280: 6120 636c 6173 733d 2276 6965 7763 6f64 a class="viewcod │ │ │ │ +0001e290: 652d 6261 636b 2220 6872 6566 3d22 2e2e e-back" href=".. │ │ │ │ +0001e2a0: 2f2e 2e2f 2e2e 2f2e 2e2f 7265 662f 6d6f /../../../ref/mo │ │ │ │ +0001e2b0: 6465 6c73 2f65 7870 7265 7373 696f 6e73 dels/expressions │ │ │ │ +0001e2c0: 2e68 746d 6c23 646a 616e 676f 2e64 622e .html#django.db. │ │ │ │ +0001e2d0: 6d6f 6465 6c73 2e65 7870 7265 7373 696f models.expressio │ │ │ │ +0001e2e0: 6e73 2e4f 7574 6572 5265 6622 3e5b 646f ns.OuterRef">[do │ │ │ │ +0001e2f0: 6375 6d65 6e74 6174 6965 5d3c 2f61 3e0a cumentatie]. │ │ │ │ +0001e300: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0001e310: 636c 6173 733c 2f73 7061 6e3e 203c 7370 class Ou │ │ │ │ +0001e330: 7465 7252 6566 3c2f 7370 616e 3e3c 7370 terRef(F):< │ │ │ │ +0001e380: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. conta │ │ │ │ +0001e3a0: 696e 735f 6167 6772 6567 6174 653c 2f73 ins_aggregate = F │ │ │ │ +0001e3e0: 616c 7365 3c2f 7370 616e 3e0a 2020 2020 alse. │ │ │ │ +0001e3f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001e400: 636f 6e74 6169 6e73 5f6f 7665 725f 636c contains_over_cl │ │ │ │ +0001e410: 6175 7365 3c2f 7370 616e 3e20 3c73 7061 ause = False.. def resolve_expr │ │ │ │ +0001e490: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(self, *args, **< │ │ │ │ +0001e550: 7370 616e 2063 6c61 7373 3d22 6e22 3e6b span class="n">k │ │ │ │ +0001e560: 7761 7267 733c 2f73 7061 6e3e 3c73 7061 wargs):. if │ │ │ │ +0001e5a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ +0001e5c0: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(self.< │ │ │ │ +0001e610: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>name, self< │ │ │ │ +0001e660: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ +0001e690: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ +0001e6a0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0001e6b0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +0001e6c0: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ +0001e700: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001e710: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 name. retur │ │ │ │ +0001e750: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n Resolve │ │ │ │ +0001e770: 644f 7574 6572 5265 663c 2f73 7061 6e3e dOuterRef │ │ │ │ +0001e780: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001e790: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.name │ │ │ │ +0001e7e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0001e800: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0001e820: 3c73 7061 6e20 636c 6173 733d 226e 6622 relabeled_clone │ │ │ │ +0001e840: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0001e860: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0001e870: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, relabels):. │ │ │ │ +0001e8d0: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ +0001e910: 2f64 6976 3e0a 0a0a 0a3c 6469 7620 636c /div>....
    . │ │ │ │ +0001e940: 3c61 2063 6c61 7373 3d22 7669 6577 636f [docum │ │ │ │ +0001e9b0: 656e 7461 7469 655d 3c2f 613e 0a3c 7370 entatie].@d │ │ │ │ +0001e9d0: 6563 6f6e 7374 7275 6374 6962 6c65 3c2f econstructible(pat │ │ │ │ +0001ea10: 683c 2f73 7061 6e3e 3c73 7061 6e20 636c h= │ │ │ │ +0001ea30: 3c73 7061 6e20 636c 6173 733d 2273 3222 "django.db │ │ │ │ +0001ea50: 2e6d 6f64 656c 732e 4675 6e63 2671 756f .models.Func&quo │ │ │ │ +0001ea60: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;).class < │ │ │ │ +0001eaa0: 7370 616e 2063 6c61 7373 3d22 6e63 223e span class="nc"> │ │ │ │ +0001eab0: 4675 6e63 3c2f 7370 616e 3e3c 7370 616e Func(SQLiteNumeric │ │ │ │ +0001eaf0: 4d69 7869 6e3c 2f73 7061 6e3e 3c73 7061 Mixin, Expression< │ │ │ │ +0001eb30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0001eb50: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ +0001eb60: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +0001eb80: 743b 2671 756f 743b 2671 756f 743b 416e t;""An │ │ │ │ +0001eb90: 2053 514c 2066 756e 6374 696f 6e20 6361 SQL function ca │ │ │ │ +0001eba0: 6c6c 2e26 7175 6f74 3b26 7175 6f74 3b26 ll.""& │ │ │ │ +0001ebb0: 7175 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 quot;.. │ │ │ │ +0001ebc0: 2020 3c73 7061 6e20 636c 6173 733d 226e function = None │ │ │ │ +0001ec10: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . temp │ │ │ │ +0001ec30: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late = "%(function)s │ │ │ │ +0001ec90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ( │ │ │ │ +0001ecb0: 3c73 7061 6e20 636c 6173 733d 2273 6922 %(expressions)s │ │ │ │ +0001ecd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )"< │ │ │ │ +0001ecf0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. arg_j │ │ │ │ +0001ed10: 6f69 6e65 723c 2f73 7061 6e3e 203c 7370 oiner = ", & │ │ │ │ +0001ed50: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +0001ed60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arity =< │ │ │ │ +0001ed90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None # The numb │ │ │ │ +0001edd0: 6572 206f 6620 6172 6775 6d65 6e74 7320 er of arguments │ │ │ │ +0001ede0: 7468 6520 6675 6e63 7469 6f6e 2061 6363 the function acc │ │ │ │ +0001edf0: 6570 7473 2e3c 2f73 7061 6e3e 0a0a 2020 epts... │ │ │ │ +0001ee00: 2020 3c73 7061 6e20 636c 6173 733d 226b def __ │ │ │ │ +0001ee30: 696e 6974 5f5f 3c2f 7370 616e 3e3c 7370 init__(self, *expressions, out │ │ │ │ +0001eef0: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ +0001ef00: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001ef10: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =None, **< │ │ │ │ +0001ef60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>extra):. │ │ │ │ +0001efa0: 2020 2020 3c73 7061 6e20 636c 6173 733d if s │ │ │ │ +0001efd0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.arity < │ │ │ │ +0001f010: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +0001f020: 6973 3c2f 7370 616e 3e20 3c73 7061 6e20 is not None and < │ │ │ │ +0001f080: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +0001f090: 6c65 6e3c 2f73 7061 6e3e 3c73 7061 6e20 len(expressions) !=< │ │ │ │ +0001f100: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.arity │ │ │ │ +0001f150: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +0001f170: 2020 2020 2020 2020 2020 2020 3c73 7061 rais │ │ │ │ +0001f190: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e TypeEr │ │ │ │ +0001f1b0: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20 ror(. │ │ │ │ +0001f1e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 "'< │ │ │ │ +0001f200: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%s │ │ │ │ +0001f220: 3c73 7061 6e20 636c 6173 733d 2273 3222 ' takes exa │ │ │ │ +0001f240: 6374 6c79 203c 2f73 7061 6e3e 3c73 7061 ctly %s< │ │ │ │ +0001f260: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span> < │ │ │ │ +0001f280: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +0001f290: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s (%s g │ │ │ │ +0001f2e0: 6976 656e 2926 7175 6f74 3b3c 2f73 7061 iven)". │ │ │ │ +0001f300: 2020 203c 7370 616e 2063 6c61 7373 3d22 % (. │ │ │ │ +0001f340: 2020 2020 2020 2020 203c 7370 616e 2063 self.__ │ │ │ │ +0001f390: 636c 6173 735f 5f3c 2f73 7061 6e3e 3c73 class__.< │ │ │ │ +0001f3b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__name__< │ │ │ │ +0001f3d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +0001f3f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f400: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +0001f420: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001f430: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 arity,. │ │ │ │ +0001f470: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f480: 3c73 7061 6e20 636c 6173 733d 2273 3222 "argument& │ │ │ │ +0001f4a0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; if< │ │ │ │ +0001f4c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.arity │ │ │ │ +0001f510: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c == 1 else │ │ │ │ +0001f560: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "a │ │ │ │ +0001f580: 7267 756d 656e 7473 2671 756f 743b 3c2f rguments",. │ │ │ │ +0001f5b0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0001f5c0: 2020 3c73 7061 6e20 636c 6173 733d 226e len(expressions │ │ │ │ +0001f610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ), │ │ │ │ +0001f630: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0001f640: 203c 7370 616e 2063 6c61 7373 3d22 7022 ). │ │ │ │ +0001f660: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0001f680: 2020 2020 2020 203c 7370 616e 2063 6c61 super().__init__(out │ │ │ │ +0001f720: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ +0001f730: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0001f740: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =output_f │ │ │ │ +0001f760: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield). sel │ │ │ │ +0001f7a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0001f7c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001f7d0: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ +0001f7e0: 6e73 3c2f 7370 616e 3e20 3c73 7061 6e20 ns = self< │ │ │ │ +0001f820: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001f830: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 _parse_ex │ │ │ │ +0001f850: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +0001f860: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001f870: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (* │ │ │ │ +0001f890: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001f8a0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions). │ │ │ │ +0001f8d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +0001f8f0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001f900: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extra = ext │ │ │ │ +0001f950: 7261 3c2f 7370 616e 3e0a 0a20 2020 203c ra.. < │ │ │ │ +0001f960: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0001f970: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __rep │ │ │ │ +0001f990: 725f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 r__(self): │ │ │ │ +0001f9e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0001f9f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001fa00: 6172 6773 3c2f 7370 616e 3e20 3c73 7061 args = self.arg_joi │ │ │ │ +0001fa70: 6e65 723c 2f73 7061 6e3e 3c73 7061 6e20 ner.join(str │ │ │ │ +0001fae0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001faf0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (arg) for arg │ │ │ │ +0001fb60: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in sel │ │ │ │ +0001fb90: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0001fbb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0001fbc0: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ +0001fbd0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns). extra< │ │ │ │ +0001fc10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0001fc30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001fc40: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {**self.._ge │ │ │ │ -0001fcc0: 745f 7265 7072 5f6f 7074 696f 6e73 3c2f t_repr_options()}. │ │ │ │ -0001fcf0: 2020 2020 2020 2020 3c73 7061 6e20 636c if extra:< │ │ │ │ -0001fd40: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0001fd50: 2020 203c 7370 616e 2063 6c61 7373 3d22 extra │ │ │ │ -0001fd70: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001fd80: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -0001fda0: 2c20 2671 756f 743b 3c2f 7370 616e 3e3c , "< │ │ │ │ -0001fdb0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0001fdc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 join(. │ │ │ │ -0001fe00: 2020 2020 2020 2020 2020 203c 7370 616e str< │ │ │ │ -0001fe20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ke │ │ │ │ -0001fe50: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y) │ │ │ │ -0001fe70: 203c 7370 616e 2063 6c61 7373 3d22 6f22 + " │ │ │ │ -0001fea0: 3b3d 2671 756f 743b 3c2f 7370 616e 3e20 ;=" │ │ │ │ -0001feb0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0001fec0: 2b3c 2f73 7061 6e3e 203c 7370 616e 2063 + str(val< │ │ │ │ -0001ff10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ -0001ff30: 7370 616e 2063 6c61 7373 3d22 6b22 3e66 span class="k">f │ │ │ │ -0001ff40: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or key, val │ │ │ │ -0001ff90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c in sorted(extra.ite │ │ │ │ -00020030: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms()). │ │ │ │ -00020060: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00020070: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -00020080: 2020 2020 203c 7370 616e 2063 6c61 7373 return "{}({}, │ │ │ │ -00020120: 203c 2f73 7061 6e3e 3c73 7061 6e20 636c {})".format< │ │ │ │ -00020190: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000201c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.__class__.__na │ │ │ │ -00020230: 6d65 5f5f 3c2f 7370 616e 3e3c 7370 616e me__, args< │ │ │ │ -00020270: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00020280: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c extra). │ │ │ │ -000202c0: 2020 2020 203c 7370 616e 2063 6c61 7373 return "{}({}) │ │ │ │ -00020360: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ".extra, **self< │ │ │ │ +0001fd00: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0001fd10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 _get_repr │ │ │ │ +0001fd30: 5f6f 7074 696f 6e73 3c2f 7370 616e 3e3c _options< │ │ │ │ +0001fd40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0001fd50: 297d 3c2f 7370 616e 3e0a 2020 2020 2020 )}. │ │ │ │ +0001fd60: 2020 3c73 7061 6e20 636c 6173 733d 226b if extr │ │ │ │ +0001fd90: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a: │ │ │ │ +0001fdb0: 0a20 2020 2020 2020 2020 2020 203c 7370 . ext │ │ │ │ +0001fdd0: 7261 3c2f 7370 616e 3e20 3c73 7061 6e20 ra = ", &quo │ │ │ │ +0001fe10: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;.join(. │ │ │ │ +0001fe70: 2020 2020 203c 7370 616e 2063 6c61 7373 str │ │ │ │ +0001fe90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001fea0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (key) + "=&quo │ │ │ │ +0001ff10: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; + str(< │ │ │ │ +0001ff60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>val │ │ │ │ +0001ff80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0001ff90: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) for key,< │ │ │ │ +0001ffe0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val in so │ │ │ │ +00020030: 7274 6564 3c2f 7370 616e 3e3c 7370 616e rted(extra< │ │ │ │ +00020070: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00020080: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 items()). │ │ │ │ +000200c0: 2020 2020 2020 2020 2020 3c73 7061 6e20 ). < │ │ │ │ +000200f0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00020100: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ +00020120: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;{}({ │ │ │ │ +00020170: 7d3c 2f73 7061 6e3e 3c73 7061 6e20 636c }, {})&q │ │ │ │ +000201c0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;.format │ │ │ │ +00020200: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00020210: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.__c │ │ │ │ +00020260: 6c61 7373 5f5f 3c2f 7370 616e 3e3c 7370 lass__.__name__, ar │ │ │ │ +000202d0: 6773 3c2f 7370 616e 3e3c 7370 616e 2063 gs, extra)< │ │ │ │ +00020320: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00020330: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00020340: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ +00020360: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;{}format(self< │ │ │ │ -000203d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -00020400: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ -00020410: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00020420: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __name__ │ │ │ │ -00020440: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00020460: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00020470: 6172 6773 3c2f 7370 616e 3e3c 7370 616e args).. def _get_repr_o │ │ │ │ -000204d0: 7074 696f 6e73 3c2f 7370 616e 3e3c 7370 ptions(self):. │ │ │ │ -00020540: 2020 203c 2f73 7061 6e3e 3c73 7061 6e20 " │ │ │ │ -00020560: 3b26 7175 6f74 3b26 7175 6f74 3b52 6574 ;""Ret │ │ │ │ -00020570: 7572 6e20 6120 6469 6374 206f 6620 6578 urn a dict of ex │ │ │ │ -00020580: 7472 6120 5f5f 696e 6974 5f5f 2829 206f tra __init__() o │ │ │ │ -00020590: 7074 696f 6e73 2074 6f20 696e 636c 7564 ptions to includ │ │ │ │ -000205a0: 6520 696e 2074 6865 2072 6570 722e 2671 e in the repr.&q │ │ │ │ -000205b0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ -000205c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000205d0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000205e0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return {} │ │ │ │ -00020600: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -00020620: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_sou │ │ │ │ -00020640: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ -00020650: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00020680: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -000206c0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ -000206e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.so │ │ │ │ -00020710: 7572 6365 5f65 7870 7265 7373 696f 6e73 urce_expressions │ │ │ │ -00020720: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -00020740: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c set_sou │ │ │ │ -00020760: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ -00020770: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000207a0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, exprs< │ │ │ │ -000207e0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -000207f0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00020800: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.source_expr │ │ │ │ -00020850: 6573 7369 6f6e 733c 2f73 7061 6e3e 203c essions < │ │ │ │ -00020860: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00020870: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c exprs.. def resolve_ex │ │ │ │ -000208d0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -000208e0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000208f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00020900: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, query=None, al │ │ │ │ -000209b0: 6c6f 775f 6a6f 696e 733c 2f73 7061 6e3e low_joins │ │ │ │ -000209c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000209d0: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =True, reu │ │ │ │ -00020a20: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se=None, summarize< │ │ │ │ -00020a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=F │ │ │ │ -00020ac0: 616c 7365 3c2f 7370 616e 3e3c 7370 616e alse, for_save=Fals │ │ │ │ -00020b30: 653c 2f73 7061 6e3e 0a20 2020 203c 7370 e. ):< │ │ │ │ -00020b50: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00020b60: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00020b70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00020b90: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.copy │ │ │ │ -00020be0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00020bf0: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ -00020c00: 2020 3c73 7061 6e20 636c 6173 733d 226e c.is_summary = sum │ │ │ │ -00020c80: 6d61 7269 7a65 3c2f 7370 616e 3e0a 2020 marize. │ │ │ │ -00020c90: 2020 2020 2020 3c73 7061 6e20 636c 6173 for │ │ │ │ -00020cb0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 pos, arg < │ │ │ │ -00020d00: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -00020d10: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in enume │ │ │ │ -00020d30: 7261 7465 3c2f 7370 616e 3e3c 7370 616e rate(c.source_expres │ │ │ │ -00020da0: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions):. │ │ │ │ -00020dd0: 2020 3c73 7061 6e20 636c 6173 733d 226e c.source_express │ │ │ │ -00020e20: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions[pos] = < │ │ │ │ -00020e90: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -00020ea0: 7267 3c2f 7370 616e 3e3c 7370 616e 2063 rg.resolve_express │ │ │ │ -00020ee0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion(. │ │ │ │ -00020f10: 2020 203c 7370 616e 2063 6c61 7373 3d22 query< │ │ │ │ -00020f30: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00020f40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c allow_jo │ │ │ │ -00020f60: 696e 733c 2f73 7061 6e3e 3c73 7061 6e20 ins, reuse< │ │ │ │ -00020fa0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00020fb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c summariz │ │ │ │ -00020fd0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -00020ff0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 for_save │ │ │ │ -00021010: 0a20 2020 2020 2020 2020 2020 203c 7370 . ). re │ │ │ │ -00021050: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn c..
    .[docs]. │ │ │ │ -00021120: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -00021140: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -00021150: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(. s │ │ │ │ -00021190: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf,. compi │ │ │ │ -000211d0: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler,. conne │ │ │ │ -00021210: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction,. fun │ │ │ │ -00021250: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction=None │ │ │ │ -00021290: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000212a0: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -000212b0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -000212d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000212e0: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =None,. │ │ │ │ -00021320: 2020 2020 203c 7370 616e 2063 6c61 7373 arg_joiner< │ │ │ │ -00021340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ -00021370: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one,. **extra_contex │ │ │ │ -000213d0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ -000213f0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . ):. │ │ │ │ -00021410: 2020 2020 2020 203c 7370 616e 2063 6c61 connectio │ │ │ │ -00021430: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ -00021450: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00021460: 6f70 733c 2f73 7061 6e3e 3c73 7061 6e20 ops.check_expressi │ │ │ │ -000214a0: 6f6e 5f73 7570 706f 7274 3c2f 7370 616e on_support(self). │ │ │ │ -00021500: 2020 2020 2020 3c73 7061 6e20 636c 6173 sql_parts< │ │ │ │ -00021520: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00021540: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00021550: 5b5d 3c2f 7370 616e 3e0a 2020 2020 2020 []. │ │ │ │ -00021560: 2020 3c73 7061 6e20 636c 6173 733d 226e params │ │ │ │ -00021580: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00021590: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = []. for arg │ │ │ │ -000215f0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in sel │ │ │ │ -00021620: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00021640: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00021650: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ -00021660: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns:. tr │ │ │ │ -000216a0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y: │ │ │ │ -000216c0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -000216d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arg_sql< │ │ │ │ -000216f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00021700: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c arg_para │ │ │ │ -00021720: 6d73 3c2f 7370 616e 3e20 3c73 7061 6e20 ms = compiler.compil │ │ │ │ -00021790: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -000217b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000217c0: 6172 673c 2f73 7061 6e3e 3c73 7061 6e20 arg). < │ │ │ │ -000217f0: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ -00021800: 7863 6570 743c 2f73 7061 6e3e 203c 7370 xcept Emp │ │ │ │ -00021820: 7479 5265 7375 6c74 5365 743c 2f73 7061 tyResultSet:. │ │ │ │ -00021850: 2020 2020 2020 2020 2020 203c 7370 616e empty │ │ │ │ -00021870: 5f72 6573 756c 745f 7365 745f 7661 6c75 _result_set_valu │ │ │ │ -00021880: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = getattr(. │ │ │ │ -000218e0: 2020 2020 2020 2020 2020 2020 2020 3c73 ar │ │ │ │ -00021900: 673c 2f73 7061 6e3e 3c73 7061 6e20 636c g, │ │ │ │ -00021920: 203c 7370 616e 2063 6c61 7373 3d22 7332 "empty_re │ │ │ │ -00021940: 7375 6c74 5f73 6574 5f76 616c 7565 2671 sult_set_value&q │ │ │ │ -00021950: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;, NotImplemen │ │ │ │ -00021990: 7465 643c 2f73 7061 6e3e 0a20 2020 2020 ted. │ │ │ │ -000219a0: 2020 2020 2020 2020 2020 203c 7370 616e ). │ │ │ │ -000219d0: 2020 2020 3c73 7061 6e20 636c 6173 733d if em │ │ │ │ -00021a00: 7074 795f 7265 7375 6c74 5f73 6574 5f76 pty_result_set_v │ │ │ │ -00021a10: 616c 7565 3c2f 7370 616e 3e20 3c73 7061 alue is< │ │ │ │ -00021a30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> NotImple │ │ │ │ -00021a50: 6d65 6e74 6564 3c2f 7370 616e 3e3c 7370 mented:. │ │ │ │ -00021a80: 2020 2020 2020 2020 2020 3c73 7061 6e20 raise< │ │ │ │ -00021aa0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00021ab0: 2020 2020 2020 203c 7370 616e 2063 6c61 arg_sql, ar │ │ │ │ -00021b00: 675f 7061 7261 6d73 3c2f 7370 616e 3e20 g_params │ │ │ │ -00021b10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00021b20: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = compile │ │ │ │ -00021b40: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r. │ │ │ │ +00020390: 3d22 7332 223e 283c 2f73 7061 6e3e 3c73 ="s2">({ │ │ │ │ +000203b0: 7d3c 2f73 7061 6e3e 3c73 7061 6e20 636c })" │ │ │ │ +000203d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000203f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00020400: 6f72 6d61 743c 2f73 7061 6e3e 3c73 7061 ormat(self │ │ │ │ +00020440: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00020450: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__class │ │ │ │ +00020470: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __.__name__, args).. │ │ │ │ +00020500: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ +00020530: 6765 745f 7265 7072 5f6f 7074 696f 6e73 get_repr_options │ │ │ │ +00020540: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00020560: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00020570: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. "" │ │ │ │ +000205d0: 3b26 7175 6f74 3b52 6574 7572 6e20 6120 ;"Return a │ │ │ │ +000205e0: 6469 6374 206f 6620 6578 7472 6120 5f5f dict of extra __ │ │ │ │ +000205f0: 696e 6974 5f5f 2829 206f 7074 696f 6e73 init__() options │ │ │ │ +00020600: 2074 6f20 696e 636c 7564 6520 696e 2074 to include in t │ │ │ │ +00020610: 6865 2072 6570 722e 2671 756f 743b 2671 he repr."&q │ │ │ │ +00020620: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;". return │ │ │ │ +00020650: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c {}.. def get_source_ex │ │ │ │ +000206b0: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +000206c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000206d0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +00020710: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ +00020750: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00020760: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .source_e │ │ │ │ +00020780: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions.. def set_source_ex │ │ │ │ +000207d0: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +000207e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000207f0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, exp │ │ │ │ +00020840: 7273 3c2f 7370 616e 3e3c 7370 616e 2063 rs):. self │ │ │ │ +00020880: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000208a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +000208b0: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +000208c0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = exprs.. │ │ │ │ +00020900: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00020920: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00020930: 7265 736f 6c76 655f 6578 7072 6573 7369 resolve_expressi │ │ │ │ +00020940: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(. self< │ │ │ │ +00020980: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +000209a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ +000209b0: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery=None< │ │ │ │ +000209f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00020a00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c allow_jo │ │ │ │ +00020a20: 696e 733c 2f73 7061 6e3e 3c73 7061 6e20 ins=True,< │ │ │ │ +00020a70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> reuse=None │ │ │ │ +00020ac0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00020ae0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00020af0: 7375 6d6d 6172 697a 653c 2f73 7061 6e3e summarize │ │ │ │ +00020b00: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00020b10: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =False, fo │ │ │ │ +00020b60: 725f 7361 7665 3c2f 7370 616e 3e3c 7370 r_save=False. ): │ │ │ │ +00020bc0: 0a20 2020 2020 2020 203c 7370 616e 2063 . c = self │ │ │ │ +00020c10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00020c30: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00020c40: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy(). c.is_s │ │ │ │ +00020cb0: 756d 6d61 7279 3c2f 7370 616e 3e20 3c73 ummary =< │ │ │ │ +00020cd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ +00020cf0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00020d00: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00020d10: 666f 723c 2f73 7061 6e3e 203c 7370 616e for pos, ar │ │ │ │ +00020d60: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g in enumerate(c.sou │ │ │ │ +00020e00: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ +00020e10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00020e30: 2020 2020 2020 2020 2020 2020 3c73 7061 c.sour │ │ │ │ +00020e80: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions[pos │ │ │ │ +00020ec0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ] │ │ │ │ +00020ee0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00020ef0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = arg.resol │ │ │ │ +00020f40: 7665 5f65 7870 7265 7373 696f 6e3c 2f73 ve_expression(. │ │ │ │ +00020f70: 2020 2020 2020 2020 2020 2020 203c 7370 que │ │ │ │ +00020f90: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry, allow_joins, reu │ │ │ │ +00021000: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, summarize, for_s │ │ │ │ +00021070: 6176 653c 2f73 7061 6e3e 0a20 2020 2020 ave. │ │ │ │ +00021080: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ +000210a0: 2020 2020 2020 2020 3c73 7061 6e20 636c return c.. │ │ │ │ +000210e0: 3c64 6976 2063 6c61 7373 3d22 7669 6577
    .[ │ │ │ │ +00021180: 646f 6375 6d65 6e74 6174 6965 5d3c 2f61 documentatie]. def │ │ │ │ +000211b0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sql< │ │ │ │ +000211d0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000211e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000211f0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self,. com │ │ │ │ +00021240: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler,. con │ │ │ │ +00021280: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection,< │ │ │ │ +000212a0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +000212b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +000212c0: 756e 6374 696f 6e3c 2f73 7061 6e3e 3c73 unction=< │ │ │ │ +000212e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>None,. │ │ │ │ +00021320: 2020 203c 7370 616e 2063 6c61 7373 3d22 template=None< │ │ │ │ +00021370: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00021390: 2020 2020 2020 203c 7370 616e 2063 6c61 arg_joine │ │ │ │ +000213b0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r= │ │ │ │ +000213d0: 3c73 7061 6e20 636c 6173 733d 226b 6322 None,. **< │ │ │ │ +00021420: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>extra_cont │ │ │ │ +00021440: 6578 743c 2f73 7061 6e3e 3c73 7061 6e20 ext,. ): │ │ │ │ +00021480: 0a20 2020 2020 2020 203c 7370 616e 2063 . connect │ │ │ │ +000214a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.ops.check_expres │ │ │ │ +00021510: 7369 6f6e 5f73 7570 706f 7274 3c2f 7370 sion_support(self │ │ │ │ +00021550: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00021570: 2020 2020 2020 2020 3c73 7061 6e20 636c sql_part │ │ │ │ +00021590: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = []. │ │ │ │ +000215d0: 2020 2020 3c73 7061 6e20 636c 6173 733d params = []. for │ │ │ │ +00021640: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c arg in s │ │ │ │ +00021690: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.source_express │ │ │ │ +000216d0: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions:. │ │ │ │ +00021700: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00021710: 7472 793c 2f73 7061 6e3e 3c73 7061 6e20 try:. │ │ │ │ +00021740: 2020 203c 7370 616e 2063 6c61 7373 3d22 arg_sql, arg_pa │ │ │ │ +00021790: 7261 6d73 3c2f 7370 616e 3e20 3c73 7061 rams = compiler.comp │ │ │ │ +00021800: 696c 653c 2f73 7061 6e3e 3c73 7061 6e20 ile(arg). │ │ │ │ +00021860: 203c 7370 616e 2063 6c61 7373 3d22 6b22 except < │ │ │ │ +00021880: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ +00021890: 6d70 7479 5265 7375 6c74 5365 743c 2f73 mptyResultSet:. │ │ │ │ +000218c0: 2020 2020 2020 2020 2020 2020 203c 7370 emp │ │ │ │ +000218e0: 7479 5f72 6573 756c 745f 7365 745f 7661 ty_result_set_va │ │ │ │ +000218f0: 6c75 653c 2f73 7061 6e3e 203c 7370 616e lue = getattr(. │ │ │ │ +00021950: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00021960: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00021970: 6172 673c 2f73 7061 6e3e 3c73 7061 6e20 arg, "empty_ │ │ │ │ +000219b0: 7265 7375 6c74 5f73 6574 5f76 616c 7565 result_set_value │ │ │ │ +000219c0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ", NotImplem │ │ │ │ +00021a00: 656e 7465 643c 2f73 7061 6e3e 0a20 2020 ented. │ │ │ │ +00021a10: 2020 2020 2020 2020 2020 2020 203c 7370 ). │ │ │ │ +00021a40: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ +00021a60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00021a70: 656d 7074 795f 7265 7375 6c74 5f73 6574 empty_result_set │ │ │ │ +00021a80: 5f76 616c 7565 3c2f 7370 616e 3e20 3c73 _value i │ │ │ │ +00021aa0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s NotImp │ │ │ │ +00021ac0: 6c65 6d65 6e74 6564 3c2f 7370 616e 3e3c lemented< │ │ │ │ +00021ad0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00021ae0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00021af0: 2020 2020 2020 2020 2020 2020 3c73 7061 rais │ │ │ │ +00021b10: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ +00021b20: 2020 2020 2020 2020 203c 7370 616e 2063 arg_sql │ │ │ │ +00021b40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ 00021b60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00021b70: 636f 6d70 696c 653c 2f73 7061 6e3e 3c73 compile(< │ │ │ │ -00021b90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>Value(empty_ │ │ │ │ -00021be0: 7265 7375 6c74 5f73 6574 5f76 616c 7565 result_set_value │ │ │ │ -00021bf0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )) │ │ │ │ -00021c10: 0a20 2020 2020 2020 2020 2020 203c 7370 . exc │ │ │ │ -00021c30: 6570 743c 2f73 7061 6e3e 203c 7370 616e ept FullR │ │ │ │ -00021c50: 6573 756c 7453 6574 3c2f 7370 616e 3e3c esultSet< │ │ │ │ -00021c60: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -00021c70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00021c80: 2020 2020 2020 2020 3c73 7061 6e20 636c arg_sql< │ │ │ │ -00021ca0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00021cc0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -00021cd0: 7267 5f70 6172 616d 733c 2f73 7061 6e3e rg_params │ │ │ │ -00021ce0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = compil │ │ │ │ -00021d10: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.compile< │ │ │ │ -00021d50: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00021d60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 Value(True │ │ │ │ -00021db0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )) │ │ │ │ -00021dd0: 0a20 2020 2020 2020 2020 2020 203c 7370 . sql │ │ │ │ -00021df0: 5f70 6172 7473 3c2f 7370 616e 3e3c 7370 _parts.append(arg_sq │ │ │ │ -00021e60: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l) │ │ │ │ -00021e80: 0a20 2020 2020 2020 2020 2020 203c 7370 . par │ │ │ │ -00021ea0: 616d 733c 2f73 7061 6e3e 3c73 7061 6e20 ams.extend< │ │ │ │ -00021ee0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00021ef0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 arg_param │ │ │ │ -00021f10: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ -00021f30: 0a20 2020 2020 2020 203c 7370 616e 2063 . data = {< │ │ │ │ -00021f80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>**< │ │ │ │ -00021fa0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00021fb0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.extra< │ │ │ │ -00021ff0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00022000: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **extra_context = compi │ │ │ │ +00021bb0: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler.compile │ │ │ │ +00021bf0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00021c00: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (Value(empt │ │ │ │ +00021c50: 795f 7265 7375 6c74 5f73 6574 5f76 616c y_result_set_val │ │ │ │ +00021c60: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue)). < │ │ │ │ +00021c90: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ +00021ca0: 7863 6570 743c 2f73 7061 6e3e 203c 7370 xcept Ful │ │ │ │ +00021cc0: 6c52 6573 756c 7453 6574 3c2f 7370 616e lResultSet:. │ │ │ │ +00021cf0: 2020 2020 2020 2020 2020 3c73 7061 6e20 arg_sq │ │ │ │ +00021d10: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ +00021d30: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arg_params = comp │ │ │ │ +00021d80: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(Value(Tr │ │ │ │ +00021e20: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue)). < │ │ │ │ +00021e50: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00021e60: 716c 5f70 6172 7473 3c2f 7370 616e 3e3c ql_parts< │ │ │ │ +00021e70: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00021e80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 append(arg_ │ │ │ │ +00021ed0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql). < │ │ │ │ +00021f00: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ +00021f10: 6172 616d 733c 2f73 7061 6e3e 3c73 7061 arams.extend(arg_par │ │ │ │ +00021f80: 616d 733c 2f73 7061 6e3e 3c73 7061 6e20 ams). data< │ │ │ │ +00021fc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00021fe0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00021ff0: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {**self.}. │ │ │ │ -00022060: 2020 2020 2020 3c73 7061 6e20 636c 6173 # Use the │ │ │ │ -00022080: 2066 6972 7374 2073 7570 706c 6965 6420 first supplied │ │ │ │ -00022090: 7661 6c75 6520 696e 2074 6869 7320 6f72 value in this or │ │ │ │ -000220a0: 6465 723a 2074 6865 2070 6172 616d 6574 der: the paramet │ │ │ │ -000220b0: 6572 2074 6f20 7468 6973 3c2f 7370 616e er to this. # met │ │ │ │ -000220e0: 686f 642c 2061 2076 616c 7565 2073 7570 hod, a value sup │ │ │ │ -000220f0: 706c 6965 6420 696e 205f 5f69 6e69 745f plied in __init_ │ │ │ │ -00022100: 5f28 2926 2333 393b 7320 2a2a 6578 7472 _()'s **extr │ │ │ │ -00022110: 6120 2874 6865 2076 616c 7565 2069 6e3c a (the value in< │ │ │ │ -00022120: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00022130: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ -00022140: 2320 6064 6174 6160 292c 206f 7220 7468 # `data`), or th │ │ │ │ -00022150: 6520 7661 6c75 6520 6465 6669 6e65 6420 e value defined │ │ │ │ -00022160: 6f6e 2074 6865 2063 6c61 7373 2e3c 2f73 on the class.. if< │ │ │ │ -00022190: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> function< │ │ │ │ -000221b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> is not N │ │ │ │ -00022200: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one:. < │ │ │ │ -00022230: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ -00022240: 6174 613c 2f73 7061 6e3e 3c73 7061 6e20 ata["functio │ │ │ │ -00022280: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 3c73 n"]< │ │ │ │ -000222a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -000222c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000222d0: 6675 6e63 7469 6f6e 3c2f 7370 616e 3e0a function. │ │ │ │ -000222e0: 2020 2020 2020 2020 3c73 7061 6e20 636c else:. │ │ │ │ -00022320: 2020 2020 2020 2020 3c73 7061 6e20 636c data.setde │ │ │ │ -00022370: 6661 756c 743c 2f73 7061 6e3e 3c73 7061 fault("funct │ │ │ │ -000223b0: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion" │ │ │ │ -000223c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000223d0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.fun │ │ │ │ -00022420: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction). tem │ │ │ │ -00022460: 706c 6174 653c 2f73 7061 6e3e 203c 7370 plate = template or │ │ │ │ -000224c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 data.get(< │ │ │ │ -00022520: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"tem │ │ │ │ -00022540: 706c 6174 6526 7175 6f74 3b3c 2f73 7061 plate", self │ │ │ │ -00022580: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000225a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ -000225b0: 656d 706c 6174 653c 2f73 7061 6e3e 3c73 emplate)< │ │ │ │ -000225d0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -000225e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -000225f0: 7267 5f6a 6f69 6e65 723c 2f73 7061 6e3e rg_joiner │ │ │ │ -00022600: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = arg_jo │ │ │ │ -00022630: 696e 6572 3c2f 7370 616e 3e20 3c73 7061 iner or< │ │ │ │ -00022650: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> data.get(&qu │ │ │ │ -000226d0: 6f74 3b61 7267 5f6a 6f69 6e65 7226 7175 ot;arg_joiner&qu │ │ │ │ -000226e0: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;, self< │ │ │ │ -00022720: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00022730: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 arg_joine │ │ │ │ -00022750: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r) │ │ │ │ -00022770: 0a20 2020 2020 2020 203c 7370 616e 2063 . data[&qu │ │ │ │ -000227c0: 6f74 3b65 7870 7265 7373 696f 6e73 2671 ot;expressions&q │ │ │ │ -000227d0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;] = dat │ │ │ │ -00022820: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a[ │ │ │ │ -00022840: 3c73 7061 6e20 636c 6173 733d 2273 3222 "field&quo │ │ │ │ -00022860: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;] = arg_j │ │ │ │ -000228b0: 6f69 6e65 723c 2f73 7061 6e3e 3c73 7061 oiner.join< │ │ │ │ -000228f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00022900: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 sql_parts │ │ │ │ -00022920: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00022940: 2020 2020 2020 2020 3c73 7061 6e20 636c return template % < │ │ │ │ -000229a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ -000229b0: 6174 613c 2f73 7061 6e3e 3c73 7061 6e20 ata, params │ │ │ │ -000229f0: 3c2f 6469 763e 0a0a 0a20 2020 203c 7370
    ... def │ │ │ │ -00022a10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c copy
    (sel │ │ │ │ -00022a60: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. copy = < │ │ │ │ -00022ac0: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00022ad0: 7375 7065 723c 2f73 7061 6e3e 3c73 7061 super().cop │ │ │ │ -00022b20: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y(). copy.sou │ │ │ │ -00022b90: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ -00022ba0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00022bc0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.
    source_expre │ │ │ │ -00022c10: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions[:] │ │ │ │ -00022c30: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00022c40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00022c50: 636f 7079 3c2f 7370 616e 3e3c 7370 616e copy.extra │ │ │ │ -00022c90: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00022ca0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.ext │ │ │ │ -00022cf0: 7261 3c2f 7370 616e 3e3c 7370 616e 2063 ra.copy(). re │ │ │ │ -00022d60: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn copy │ │ │ │ -00022d80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 0a0a
    ... │ │ │ │ -00022d90: 0a3c 6469 7620 636c 6173 733d 2276 6965 .
    .[docs].< │ │ │ │ -00022e30: 7370 616e 2063 6c61 7373 3d22 6e64 223e span class="nd"> │ │ │ │ -00022e40: 4064 6563 6f6e 7374 7275 6374 6962 6c65 @deconstructible │ │ │ │ -00022e50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00022e70: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00022e80: 6174 683c 2f73 7061 6e3e 3c73 7061 6e20 ath="django. │ │ │ │ -00022ec0: 6462 2e6d 6f64 656c 732e 5661 6c75 6526 db.models.Value& │ │ │ │ -00022ed0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;).class Value< │ │ │ │ -00022f30: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00022f40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 SQLiteNum │ │ │ │ -00022f60: 6572 6963 4d69 7869 6e3c 2f73 7061 6e3e ericMixin │ │ │ │ -00022f70: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00022f80: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , Express │ │ │ │ -00022fa0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. < │ │ │ │ -00022fe0: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ -00022ff0: 2671 756f 743b 2671 756f 743b 2671 756f ""&quo │ │ │ │ -00023000: 743b 5265 7072 6573 656e 7420 6120 7772 t;Represent a wr │ │ │ │ -00023010: 6170 7065 6420 7661 6c75 6520 6173 2061 apped value as a │ │ │ │ -00023020: 206e 6f64 6520 7769 7468 696e 2061 6e20 node within an │ │ │ │ -00023030: 6578 7072 6573 7369 6f6e 2e26 7175 6f74 expression." │ │ │ │ -00023040: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"".. # Pro │ │ │ │ -00023070: 7669 6465 2061 2064 6566 6175 6c74 2076 vide a default v │ │ │ │ -00023080: 616c 7565 2066 6f72 2060 666f 725f 7361 alue for `for_sa │ │ │ │ -00023090: 7665 6020 696e 206f 7264 6572 2074 6f20 ve` in order to │ │ │ │ -000230a0: 616c 6c6f 7720 756e 7265 736f 6c76 6564 allow unresolved │ │ │ │ -000230b0: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . # i │ │ │ │ -000230d0: 6e73 7461 6e63 6573 2074 6f20 6265 2063 nstances to be c │ │ │ │ -000230e0: 6f6d 7069 6c65 6420 756e 7469 6c20 6120 ompiled until a │ │ │ │ -000230f0: 6465 6369 7369 6f6e 2069 7320 7461 6b65 decision is take │ │ │ │ -00023100: 6e20 696e 2023 3235 3432 352e 3c2f 7370 n in #25425.. for_save │ │ │ │ -00023130: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00023150: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False.. │ │ │ │ -00023170: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -00023190: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -000231a0: 5f5f 696e 6974 5f5f 3c2f 7370 616e 3e3c __init__< │ │ │ │ -000231b0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000231c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, valu │ │ │ │ -00023210: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -00023230: 203c 7370 616e 2063 6c61 7373 3d22 6e22 output_field=Non │ │ │ │ -00023280: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e):. ""&q │ │ │ │ -000232e0: 756f 743b 3c2f 7370 616e 3e0a 3c73 7061 uot;. │ │ │ │ -00023300: 2020 2020 2041 7267 756d 656e 7473 3a3c Arguments:< │ │ │ │ -00023310: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ -00023330: 202a 2076 616c 7565 3a20 7468 6520 7661 * value: the va │ │ │ │ -00023340: 6c75 6520 7468 6973 2065 7870 7265 7373 lue this express │ │ │ │ -00023350: 696f 6e20 7265 7072 6573 656e 7473 2e20 ion represents. │ │ │ │ -00023360: 5468 6520 7661 6c75 6520 7769 6c6c 2062 The value will b │ │ │ │ -00023370: 653c 2f73 7061 6e3e 0a3c 7370 616e 2063 e. │ │ │ │ -00023390: 2020 2020 2061 6464 6564 2069 6e74 6f20 added into │ │ │ │ -000233a0: 7468 6520 7371 6c20 7061 7261 6d65 7465 the sql paramete │ │ │ │ -000233b0: 7220 6c69 7374 2061 6e64 2070 726f 7065 r list and prope │ │ │ │ -000233c0: 726c 7920 7175 6f74 6564 2e3c 2f73 7061 rly quoted... * │ │ │ │ -000233f0: 6f75 7470 7574 5f66 6965 6c64 3a20 616e output_field: an │ │ │ │ -00023400: 2069 6e73 7461 6e63 6520 6f66 2074 6865 instance of the │ │ │ │ -00023410: 206d 6f64 656c 2066 6965 6c64 2074 7970 model field typ │ │ │ │ -00023420: 6520 7468 6174 2074 6869 733c 2f73 7061 e that this. e │ │ │ │ -00023450: 7870 7265 7373 696f 6e20 7769 6c6c 2072 xpression will r │ │ │ │ -00023460: 6574 7572 6e2c 2073 7563 6820 6173 2049 eturn, such as I │ │ │ │ -00023470: 6e74 6567 6572 4669 656c 6428 2920 6f72 ntegerField() or │ │ │ │ -00023480: 2043 6861 7246 6965 6c64 2829 2e3c 2f73 CharField().. &q │ │ │ │ -000234b0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ -000234c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000234d0: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ -00023500: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -00023530: 5f69 6e69 745f 5f3c 2f73 7061 6e3e 3c73 _init__(< │ │ │ │ -00023550: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ -00023570: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld=output_field). │ │ │ │ -000235d0: 2020 2020 203c 7370 616e 2063 6c61 7373 self.value = < │ │ │ │ -00023640: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ -00023650: 616c 7565 3c2f 7370 616e 3e0a 0a20 2020 alue.. │ │ │ │ -00023660: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __r │ │ │ │ -00023690: 6570 725f 5f3c 2f73 7061 6e3e 3c73 7061 epr__(self │ │ │ │ -000236d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000236e0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -000236f0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -00023710: 3c73 7061 6e20 636c 6173 733d 2273 6122 f" │ │ │ │ -00023740: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 { │ │ │ │ -00023760: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.__class__.__ │ │ │ │ -000237e0: 6e61 6d65 5f5f 3c2f 7370 616e 3e3c 7370 name__}< │ │ │ │ -00023800: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(< │ │ │ │ -00023820: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -00023830: 7b3c 2f73 7061 6e3e 3c73 7061 6e20 636c {self.valu │ │ │ │ -00023880: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e!r})".. def as_sql(self, co │ │ │ │ -00023960: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler, connection │ │ │ │ -000239a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -000239c0: 0a20 2020 2020 2020 203c 7370 616e 2063 . connect │ │ │ │ -000239e0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.ops.check_expres │ │ │ │ -00023a50: 7369 6f6e 5f73 7570 706f 7274 3c2f 7370 sion_support(self │ │ │ │ -00023a90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00023ab0: 2020 2020 2020 2020 3c73 7061 6e20 636c val = sel │ │ │ │ -00023b00: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00023b20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00023b30: 7661 6c75 653c 2f73 7061 6e3e 0a20 2020 value. │ │ │ │ -00023b40: 2020 2020 203c 7370 616e 2063 6c61 7373 output_fiel │ │ │ │ -00023b60: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d = self.< │ │ │ │ -00023bb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_output_fi │ │ │ │ -00023bd0: 656c 645f 6f72 5f6e 6f6e 653c 2f73 7061 eld_or_none. if output_fiel │ │ │ │ -00023c20: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d is not │ │ │ │ -00023c60: 3c73 7061 6e20 636c 6173 733d 226b 6322 None:. │ │ │ │ -00023ca0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ -00023cd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00023cf0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00023d00: 6f72 5f73 6176 653c 2f73 7061 6e3e 3c73 or_save:< │ │ │ │ -00023d20: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00023d30: 2020 2020 2020 203c 7370 616e 2063 6c61 val = outpu │ │ │ │ -00023d80: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field.< │ │ │ │ -00023da0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_db_pre │ │ │ │ -00023dc0: 705f 7361 7665 3c2f 7370 616e 3e3c 7370 p_save(val< │ │ │ │ -00023e00: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00023e10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -00023e30: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on=connection). │ │ │ │ -00023e90: 2020 2020 2020 203c 7370 616e 2063 6c61 else:. │ │ │ │ -00023ed0: 2020 2020 2020 2020 2020 203c 7370 616e val = < │ │ │ │ -00023f10: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -00023f20: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field.get_db │ │ │ │ -00023f60: 5f70 7265 705f 7661 6c75 653c 2f73 7061 _prep_value(val, con │ │ │ │ -00023fd0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection=< │ │ │ │ -00023ff0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>connection │ │ │ │ -00024010: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00024030: 2020 2020 2020 2020 2020 2020 3c73 7061 if hasattr(out │ │ │ │ -000240a0: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -000240b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000240c0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , " │ │ │ │ -000240e0: 6765 745f 706c 6163 6568 6f6c 6465 7226 get_placeholder& │ │ │ │ -000240f0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;):. │ │ │ │ -00024120: 2020 2020 2020 3c73 7061 6e20 636c 6173 return output_field │ │ │ │ -00024160: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00024180: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ -00024190: 6574 5f70 6c61 6365 686f 6c64 6572 3c2f et_placeholder(val │ │ │ │ -000241d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000241f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00024200: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -00024210: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00024220: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -00024240: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on), [val]. │ │ │ │ -000242b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ -000242d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000242e0: 7661 6c3c 2f73 7061 6e3e 203c 7370 616e val is None:. │ │ │ │ -00024340: 2020 2020 2020 203c 7370 616e 2063 6c61 # cx_Ora │ │ │ │ -00024360: 636c 6520 646f 6573 206e 6f74 2061 6c77 cle does not alw │ │ │ │ -00024370: 6179 7320 636f 6e76 6572 7420 4e6f 6e65 ays convert None │ │ │ │ -00024380: 2074 6f20 7468 6520 6170 7072 6f70 7269 to the appropri │ │ │ │ -00024390: 6174 653c 2f73 7061 6e3e 0a20 2020 2020 ate. │ │ │ │ -000243a0: 2020 2020 2020 203c 7370 616e 2063 6c61 # NULL t │ │ │ │ -000243c0: 7970 6520 286c 696b 6520 696e 2063 6173 ype (like in cas │ │ │ │ -000243d0: 6520 6578 7072 6573 7369 6f6e 7320 7573 e expressions us │ │ │ │ -000243e0: 696e 6720 6e75 6d62 6572 7329 2c20 736f ing numbers), so │ │ │ │ -000243f0: 2077 653c 2f73 7061 6e3e 0a20 2020 2020 we. │ │ │ │ -00024400: 2020 2020 2020 203c 7370 616e 2063 6c61 # use a │ │ │ │ -00024420: 6c69 7465 7261 6c20 5351 4c20 4e55 4c4c literal SQL NULL │ │ │ │ -00024430: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00024440: 2020 2020 3c73 7061 6e20 636c 6173 733d return "NULL&qu │ │ │ │ -00024480: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;, []. │ │ │ │ -000244c0: 2020 2020 203c 7370 616e 2063 6c61 7373 return "%s&quo │ │ │ │ -00024530: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;, [val].. │ │ │ │ -000245a0: 2020 3c73 7061 6e20 636c 6173 733d 226b def re │ │ │ │ -000245d0: 736f 6c76 655f 6578 7072 6573 7369 6f6e solve_expression │ │ │ │ -000245e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (. │ │ │ │ -00024600: 2020 2020 2020 2020 3c73 7061 6e20 636c self, que │ │ │ │ -00024650: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry=None, allow_join │ │ │ │ -000246c0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s= │ │ │ │ -000246e0: 3c73 7061 6e20 636c 6173 733d 226b 6322 True, reuse=None, su │ │ │ │ -00024790: 6d6d 6172 697a 653c 2f73 7061 6e3e 3c73 mmarize=< │ │ │ │ -000247b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>False, for_ │ │ │ │ -00024800: 7361 7665 3c2f 7370 616e 3e3c 7370 616e save=False │ │ │ │ -00024840: 0a20 2020 203c 7370 616e 2063 6c61 7373 . ):. │ │ │ │ -00024860: 2020 2020 2020 203c 7370 616e 2063 6c61 c │ │ │ │ -00024880: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00024890: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = super< │ │ │ │ -000248b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>()< │ │ │ │ -000248d0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000248e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 resolve_e │ │ │ │ -00024900: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ -00024910: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00024920: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (query, all │ │ │ │ -00024970: 6f77 5f6a 6f69 6e73 3c2f 7370 616e 3e3c ow_joins< │ │ │ │ -00024980: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00024990: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c reuse, sum │ │ │ │ -000249e0: 6d61 7269 7a65 3c2f 7370 616e 3e3c 7370 marize, for_save). │ │ │ │ -00024a40: 2020 2020 2020 3c73 7061 6e20 636c 6173 c.< │ │ │ │ -00024a70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>for_save = < │ │ │ │ -00024ab0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00024ac0: 6f72 5f73 6176 653c 2f73 7061 6e3e 0a20 or_save. │ │ │ │ -00024ad0: 2020 2020 2020 203c 7370 616e 2063 6c61 return c.. │ │ │ │ -00024b10: 2020 203c 7370 616e 2063 6c61 7373 3d22 def g │ │ │ │ -00024b40: 6574 5f67 726f 7570 5f62 795f 636f 6c73 et_group_by_cols │ │ │ │ -00024b50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00024b70: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00024b80: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ -00024bc0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn [].. def _resolve_o │ │ │ │ -00024c20: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field(self< │ │ │ │ -00024c60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00024c80: 2020 2020 2020 2020 3c73 7061 6e20 636c if isinstanceextra, **extra_context │ │ │ │ +000220b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 }. │ │ │ │ +000220d0: 2020 2020 2020 2020 3c73 7061 6e20 636c # Use t │ │ │ │ +000220f0: 6865 2066 6972 7374 2073 7570 706c 6965 he first supplie │ │ │ │ +00022100: 6420 7661 6c75 6520 696e 2074 6869 7320 d value in this │ │ │ │ +00022110: 6f72 6465 723a 2074 6865 2070 6172 616d order: the param │ │ │ │ +00022120: 6574 6572 2074 6f20 7468 6973 3c2f 7370 eter to this. # m │ │ │ │ +00022150: 6574 686f 642c 2061 2076 616c 7565 2073 ethod, a value s │ │ │ │ +00022160: 7570 706c 6965 6420 696e 205f 5f69 6e69 upplied in __ini │ │ │ │ +00022170: 745f 5f28 2926 2333 393b 7320 2a2a 6578 t__()'s **ex │ │ │ │ +00022180: 7472 6120 2874 6865 2076 616c 7565 2069 tra (the value i │ │ │ │ +00022190: 6e3c 2f73 7061 6e3e 0a20 2020 2020 2020 n. │ │ │ │ +000221a0: 203c 7370 616e 2063 6c61 7373 3d22 6331 # `data`), or │ │ │ │ +000221c0: 7468 6520 7661 6c75 6520 6465 6669 6e65 the value define │ │ │ │ +000221d0: 6420 6f6e 2074 6865 2063 6c61 7373 2e3c d on the class.< │ │ │ │ +000221e0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +000221f0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ +00022200: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f functio │ │ │ │ +00022220: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n is not │ │ │ │ +00022260: 3c73 7061 6e20 636c 6173 733d 226b 6322 None:. │ │ │ │ +000222a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 data["funct │ │ │ │ +000222f0: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion" │ │ │ │ +00022300: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00022310: 5d3c 2f73 7061 6e3e 203c 7370 616e 2063 ] = function. else:. │ │ │ │ +00022390: 2020 2020 2020 2020 2020 3c73 7061 6e20 data.set │ │ │ │ +000223e0: 6465 6661 756c 743c 2f73 7061 6e3e 3c73 default(< │ │ │ │ +00022400: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"fun │ │ │ │ +00022420: 6374 696f 6e26 7175 6f74 3b3c 2f73 7061 ction", self │ │ │ │ +00022460: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00022480: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00022490: 756e 6374 696f 6e3c 2f73 7061 6e3e 3c73 unction)< │ │ │ │ +000224b0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +000224c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +000224d0: 656d 706c 6174 653c 2f73 7061 6e3e 203c emplate < │ │ │ │ +000224e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +000224f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ +00022510: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c or data.< │ │ │ │ +00022560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get │ │ │ │ +00022580: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00022590: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c ("t │ │ │ │ +000225b0: 656d 706c 6174 6526 7175 6f74 3b3c 2f73 emplate", se │ │ │ │ +000225f0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.template │ │ │ │ +00022630: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00022640: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00022650: 203c 7370 616e 2063 6c61 7373 3d22 6e22 arg_joiner = arg_ │ │ │ │ +000226a0: 6a6f 696e 6572 3c2f 7370 616e 3e20 3c73 joiner o │ │ │ │ +000226c0: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r data.get< │ │ │ │ +00022710: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(& │ │ │ │ +00022740: 7175 6f74 3b61 7267 5f6a 6f69 6e65 7226 quot;arg_joiner& │ │ │ │ +00022750: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;, self.arg_joi │ │ │ │ +000227c0: 6e65 723c 2f73 7061 6e3e 3c73 7061 6e20 ner). data< │ │ │ │ +00022800: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>[& │ │ │ │ +00022830: 7175 6f74 3b65 7870 7265 7373 696f 6e73 quot;expressions │ │ │ │ +00022840: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "] = < │ │ │ │ +00022880: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ +00022890: 6174 613c 2f73 7061 6e3e 3c73 7061 6e20 ata["field&q │ │ │ │ +000228d0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;] = arg │ │ │ │ +00022920: 5f6a 6f69 6e65 723c 2f73 7061 6e3e 3c73 _joiner.< │ │ │ │ +00022940: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>join(sql_par │ │ │ │ +00022990: 7473 3c2f 7370 616e 3e3c 7370 616e 2063 ts). return │ │ │ │ +000229d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ +000229f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c % │ │ │ │ +00022a10: 203c 7370 616e 2063 6c61 7373 3d22 6e22 data, params
    ... < │ │ │ │ +00022a70: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +00022a80: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef copy< │ │ │ │ +00022aa0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00022ad0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. copy │ │ │ │ +00022b10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +00022b30: 203c 7370 616e 2063 6c61 7373 3d22 6e62 super() │ │ │ │ +00022b60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00022b80: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00022b90: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy(). copy │ │ │ │ +00022bd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00022bf0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00022c00: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +00022c10: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = self.< │ │ │ │ +00022c60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>source_exp │ │ │ │ +00022c80: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ +00022c90: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ +00022ca0: 3a5d 3c2f 7370 616e 3e0a 2020 2020 2020 :]. │ │ │ │ +00022cb0: 2020 3c73 7061 6e20 636c 6173 733d 226e copy.extra = self │ │ │ │ +00022d30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00022d50: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00022d60: 7874 7261 3c2f 7370 616e 3e3c 7370 616e xtra.copy() │ │ │ │ +00022db0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00022dc0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00022dd0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return co │ │ │ │ +00022df0: 7079 3c2f 7370 616e 3e3c 2f64 6976 3e0a py
    . │ │ │ │ +00022e00: 0a0a 0a3c 6469 7620 636c 6173 733d 2276 ...
    .[documenta │ │ │ │ +00022ea0: 7469 655d 3c2f 613e 0a3c 7370 616e 2063 tie].@decon │ │ │ │ +00022ec0: 7374 7275 6374 6962 6c65 3c2f 7370 616e structible(path=&qu │ │ │ │ +00022f30: 6f74 3b64 6a61 6e67 6f2e 6462 2e6d 6f64 ot;django.db.mod │ │ │ │ +00022f40: 656c 732e 5661 6c75 6526 7175 6f74 3b3c els.Value"< │ │ │ │ +00022f50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).< │ │ │ │ +00022f70: 7370 616e 2063 6c61 7373 3d22 6b22 3e63 span class="k">c │ │ │ │ +00022f80: 6c61 7373 3c2f 7370 616e 3e20 3c73 7061 lass Val │ │ │ │ +00022fa0: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue(SQLiteNumericMi │ │ │ │ +00022fe0: 7869 6e3c 2f73 7061 6e3e 3c73 7061 6e20 xin, Expression):. │ │ │ │ +00023050: 2020 3c2f 7370 616e 3e3c 7370 616e 2063 " │ │ │ │ +00023070: 2671 756f 743b 2671 756f 743b 5265 7072 ""Repr │ │ │ │ +00023080: 6573 656e 7420 6120 7772 6170 7065 6420 esent a wrapped │ │ │ │ +00023090: 7661 6c75 6520 6173 2061 206e 6f64 6520 value as a node │ │ │ │ +000230a0: 7769 7468 696e 2061 6e20 6578 7072 6573 within an expres │ │ │ │ +000230b0: 7369 6f6e 2e26 7175 6f74 3b26 7175 6f74 sion."" │ │ │ │ +000230c0: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 0a0a ;".. │ │ │ │ +000230d0: 2020 2020 3c73 7061 6e20 636c 6173 733d # Provide a │ │ │ │ +000230f0: 2064 6566 6175 6c74 2076 616c 7565 2066 default value f │ │ │ │ +00023100: 6f72 2060 666f 725f 7361 7665 6020 696e or `for_save` in │ │ │ │ +00023110: 206f 7264 6572 2074 6f20 616c 6c6f 7720 order to allow │ │ │ │ +00023120: 756e 7265 736f 6c76 6564 3c2f 7370 616e unresolved. # instanc │ │ │ │ +00023150: 6573 2074 6f20 6265 2063 6f6d 7069 6c65 es to be compile │ │ │ │ +00023160: 6420 756e 7469 6c20 6120 6465 6369 7369 d until a decisi │ │ │ │ +00023170: 6f6e 2069 7320 7461 6b65 6e20 696e 2023 on is taken in # │ │ │ │ +00023180: 3235 3432 352e 3c2f 7370 616e 3e0a 2020 25425.. │ │ │ │ +00023190: 2020 3c73 7061 6e20 636c 6173 733d 226e for_save = Fals │ │ │ │ +000231e0: 653c 2f73 7061 6e3e 0a0a 2020 2020 3c73 e.. de │ │ │ │ +00023200: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __init │ │ │ │ +00023220: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self, value, outpu │ │ │ │ +000232c0: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field=< │ │ │ │ +000232e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>None):. │ │ │ │ +00023330: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +00023350: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". A │ │ │ │ +00023380: 7267 756d 656e 7473 3a3c 2f73 7061 6e3e rguments: │ │ │ │ +00023390: 0a3c 7370 616e 2063 6c61 7373 3d22 7364 . * val │ │ │ │ +000233b0: 7565 3a20 7468 6520 7661 6c75 6520 7468 ue: the value th │ │ │ │ +000233c0: 6973 2065 7870 7265 7373 696f 6e20 7265 is expression re │ │ │ │ +000233d0: 7072 6573 656e 7473 2e20 5468 6520 7661 presents. The va │ │ │ │ +000233e0: 6c75 6520 7769 6c6c 2062 653c 2f73 7061 lue will be. a │ │ │ │ +00023410: 6464 6564 2069 6e74 6f20 7468 6520 7371 dded into the sq │ │ │ │ +00023420: 6c20 7061 7261 6d65 7465 7220 6c69 7374 l parameter list │ │ │ │ +00023430: 2061 6e64 2070 726f 7065 726c 7920 7175 and properly qu │ │ │ │ +00023440: 6f74 6564 2e3c 2f73 7061 6e3e 0a0a 3c73 oted... │ │ │ │ +00023460: 2020 2020 2020 2020 2a20 6f75 7470 7574 * output │ │ │ │ +00023470: 5f66 6965 6c64 3a20 616e 2069 6e73 7461 _field: an insta │ │ │ │ +00023480: 6e63 6520 6f66 2074 6865 206d 6f64 656c nce of the model │ │ │ │ +00023490: 2066 6965 6c64 2074 7970 6520 7468 6174 field type that │ │ │ │ +000234a0: 2074 6869 733c 2f73 7061 6e3e 0a3c 7370 this. │ │ │ │ +000234c0: 2020 2020 2020 2020 2065 7870 7265 7373 express │ │ │ │ +000234d0: 696f 6e20 7769 6c6c 2072 6574 7572 6e2c ion will return, │ │ │ │ +000234e0: 2073 7563 6820 6173 2049 6e74 6567 6572 such as Integer │ │ │ │ +000234f0: 4669 656c 6428 2920 6f72 2043 6861 7246 Field() or CharF │ │ │ │ +00023500: 6965 6c64 2829 2e3c 2f73 7061 6e3e 0a3c ield()..< │ │ │ │ +00023510: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00023520: 2020 2020 2020 2020 2671 756f 743b 2671 "&q │ │ │ │ +00023530: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;". super │ │ │ │ +00023560: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +00023580: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00023590: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__init_ │ │ │ │ +000235b0: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +000235d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000235e0: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_field=outpu │ │ │ │ +00023620: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field)< │ │ │ │ +00023640: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00023650: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00023660: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.value │ │ │ │ +000236a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000236b0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = value.. def __repr__< │ │ │ │ +00023710: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00023740: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ +00023780: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn f"{self< │ │ │ │ +000237f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ +00023820: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ +00023830: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00023840: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __name__ │ │ │ │ +00023860: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 } │ │ │ │ +00023880: 3c73 7061 6e20 636c 6173 733d 2273 3222 ({self.< │ │ │ │ +000238e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value!r})& │ │ │ │ +00023930: 7175 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 quot;.. │ │ │ │ +00023940: 2020 3c73 7061 6e20 636c 6173 733d 226b def as │ │ │ │ +00023970: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(self< │ │ │ │ +000239b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000239c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ +000239e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00023a00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00023a10: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection):. │ │ │ │ +00023a40: 2020 203c 7370 616e 2063 6c61 7373 3d22 connection.ops< │ │ │ │ +00023a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ch │ │ │ │ +00023ac0: 6563 6b5f 6578 7072 6573 7369 6f6e 5f73 eck_expression_s │ │ │ │ +00023ad0: 7570 706f 7274 3c2f 7370 616e 3e3c 7370 upport(self). │ │ │ │ +00023b30: 2020 3c73 7061 6e20 636c 6173 733d 226e val = self.value< │ │ │ │ +00023bb0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00023bc0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00023bd0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field = sel │ │ │ │ +00023c10: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00023c30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00023c40: 5f6f 7574 7075 745f 6669 656c 645f 6f72 _output_field_or │ │ │ │ +00023c50: 5f6e 6f6e 653c 2f73 7061 6e3e 0a20 2020 _none. │ │ │ │ +00023c60: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +00023c80: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00023c90: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field is n │ │ │ │ +00023cd0: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot None< │ │ │ │ +00023cf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:. │ │ │ │ +00023d10: 2020 2020 2020 2020 2020 203c 7370 616e if self.for_sav │ │ │ │ +00023d80: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e: │ │ │ │ +00023da0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +00023db0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 val = output_fiel │ │ │ │ +00023e00: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d. │ │ │ │ +00023e20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00023e30: 6765 745f 6462 5f70 7265 705f 7361 7665 get_db_prep_save │ │ │ │ +00023e40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00023e60: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ +00023e70: 616c 3c2f 7370 616e 3e3c 7370 616e 2063 al, connection=conne │ │ │ │ +00023ee0: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction). │ │ │ │ +00023f10: 203c 7370 616e 2063 6c61 7373 3d22 6b22 else:. │ │ │ │ +00023f50: 2020 2020 203c 7370 616e 2063 6c61 7373 val │ │ │ │ +00023f70: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00023f80: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = output_ │ │ │ │ +00023fa0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.get_db_prep_ │ │ │ │ +00023fe0: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value(val,< │ │ │ │ +00024030: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ +00024050: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n= │ │ │ │ +00024070: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00024080: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection). │ │ │ │ +000240b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ +000240d0: 3c73 7061 6e20 636c 6173 733d 226e 6222 hasattr< │ │ │ │ +000240f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00024100: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ +00024120: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, "get_pl │ │ │ │ +00024160: 6163 6568 6f6c 6465 7226 7175 6f74 3b3c aceholder"< │ │ │ │ +00024170: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00024190: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000241a0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000241b0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return ou │ │ │ │ +000241d0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field.get_pla │ │ │ │ +00024210: 6365 686f 6c64 6572 3c2f 7370 616e 3e3c ceholder< │ │ │ │ +00024220: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00024230: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 val, compil │ │ │ │ +00024280: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection), [val< │ │ │ │ +00024310: 7370 616e 2063 6c61 7373 3d22 7022 3e5d span class="p">] │ │ │ │ +00024320: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00024330: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00024340: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if val is │ │ │ │ +00024380: 3c73 7061 6e20 636c 6173 733d 226b 6322 None:. │ │ │ │ +000243c0: 203c 7370 616e 2063 6c61 7373 3d22 6331 # cx_Oracle do │ │ │ │ +000243e0: 6573 206e 6f74 2061 6c77 6179 7320 636f es not always co │ │ │ │ +000243f0: 6e76 6572 7420 4e6f 6e65 2074 6f20 7468 nvert None to th │ │ │ │ +00024400: 6520 6170 7072 6f70 7269 6174 653c 2f73 e appropriate. │ │ │ │ +00024420: 203c 7370 616e 2063 6c61 7373 3d22 6331 # NULL type (l │ │ │ │ +00024440: 696b 6520 696e 2063 6173 6520 6578 7072 ike in case expr │ │ │ │ +00024450: 6573 7369 6f6e 7320 7573 696e 6720 6e75 essions using nu │ │ │ │ +00024460: 6d62 6572 7329 2c20 736f 2077 653c 2f73 mbers), so we. │ │ │ │ +00024480: 203c 7370 616e 2063 6c61 7373 3d22 6331 # use a litera │ │ │ │ +000244a0: 6c20 5351 4c20 4e55 4c4c 3c2f 7370 616e l SQL NULL. re │ │ │ │ +000244d0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn &qu │ │ │ │ +000244f0: 6f74 3b4e 554c 4c26 7175 6f74 3b3c 2f73 ot;NULL", []< │ │ │ │ +00024530: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00024540: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00024550: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ +00024570: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;%s", [val]< │ │ │ │ +00024610: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +00024630: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> resolve_ │ │ │ │ +00024650: 6578 7072 6573 7369 6f6e 3c2f 7370 616e expression(. │ │ │ │ +00024680: 2020 3c73 7061 6e20 636c 6173 733d 2262 self,< │ │ │ │ +000246b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> query=None │ │ │ │ +00024700: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00024720: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00024730: 616c 6c6f 775f 6a6f 696e 733c 2f73 7061 allow_joins=True< │ │ │ │ +00024770: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00024790: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +000247a0: 6575 7365 3c2f 7370 616e 3e3c 7370 616e euse=None< │ │ │ │ +000247e0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000247f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c summariz │ │ │ │ +00024810: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e= │ │ │ │ +00024830: 3c73 7061 6e20 636c 6173 733d 226b 6322 False, for_save=Fa │ │ │ │ +000248b0: 6c73 653c 2f73 7061 6e3e 0a20 2020 203c lse. < │ │ │ │ +000248c0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +000248d0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +000248e0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 c = super │ │ │ │ +00024930: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00024940: 2829 3c2f 7370 616e 3e3c 7370 616e 2063 ().resolve_express │ │ │ │ +00024980: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion(query,< │ │ │ │ +000249d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> allow_joi │ │ │ │ +000249f0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns, reuse,< │ │ │ │ +00024a40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ +00024a60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00024a80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00024a90: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ +00024aa0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00024ab0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00024ac0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00024ad0: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c. │ │ │ │ +00024af0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00024b00: 666f 725f 7361 7665 3c2f 7370 616e 3e20 for_save │ │ │ │ +00024b10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00024b20: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = for_sav │ │ │ │ +00024b40: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ +00024b50: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00024b70: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00024b80: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00024ba0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_gro │ │ │ │ +00024bc0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols(self):. │ │ │ │ +00024c20: 2020 2020 2020 203c 7370 616e 2063 6c61 return [].. │ │ │ │ +00024c60: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00024c80: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00024c90: 5f72 6573 6f6c 7665 5f6f 7574 7075 745f _resolve_output_ │ │ │ │ +00024ca0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field((sel │ │ │ │ -00024cf0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00024d10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00024d20: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value, str │ │ │ │ -00024d60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00024d70: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -00024d80: 2020 2020 2020 3c73 7061 6e20 636c 6173 return fields.CharFie │ │ │ │ -00024df0: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld(). if isinstance │ │ │ │ -00024e50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00024e70: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00024e80: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.value< │ │ │ │ -00024ec0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00024ed0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c bool):. │ │ │ │ -00024f10: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ -00024f30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Boo │ │ │ │ -00024f80: 6c65 616e 4669 656c 643c 2f73 7061 6e3e leanField │ │ │ │ -00024f90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00024fa0: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ -00024fb0: 2020 3c73 7061 6e20 636c 6173 733d 226b if isi │ │ │ │ -00024fe0: 6e73 7461 6e63 653c 2f73 7061 6e3e 3c73 nstance(< │ │ │ │ -00025000: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.value< │ │ │ │ -00025050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00025070: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00025080: 696e 743c 2f73 7061 6e3e 3c73 7061 6e20 int):. │ │ │ │ -000250b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000250c0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return fi │ │ │ │ -000250e0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.IntegerField< │ │ │ │ -00025120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(). │ │ │ │ -00025140: 2020 2020 2020 2020 3c73 7061 6e20 636c if isinstance(sel │ │ │ │ -000251b0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -000251d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000251e0: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value, float):. │ │ │ │ -00025240: 2020 2020 2020 2020 3c73 7061 6e20 636c return fields.Float │ │ │ │ -000252b0: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field(). if │ │ │ │ -000252f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ -00025310: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(self.< │ │ │ │ -00025360: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value, datet │ │ │ │ -000253b0: 696d 653c 2f73 7061 6e3e 3c73 7061 6e20 ime.datetime):. │ │ │ │ -00025410: 2020 2020 2020 203c 7370 616e 2063 6c61 return fields.DateTi │ │ │ │ -00025480: 6d65 4669 656c 643c 2f73 7061 6e3e 3c73 meField() │ │ │ │ -000254a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000254b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000254c0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if isins │ │ │ │ -000254e0: 7461 6e63 653c 2f73 7061 6e3e 3c73 7061 tance(self │ │ │ │ -00025520: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00025530: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .value, dat │ │ │ │ -00025580: 6574 696d 653c 2f73 7061 6e3e 3c73 7061 etime.date< │ │ │ │ -000255c0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -000255d0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -000255e0: 2020 2020 203c 7370 616e 2063 6c61 7373 return fields │ │ │ │ -00025620: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00025630: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DateFiel │ │ │ │ -00025650: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d(). if isinstance< │ │ │ │ -000256b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000256e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.value,< │ │ │ │ -00025730: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> datetime< │ │ │ │ -00025750: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ti │ │ │ │ -00025780: 6d65 3c2f 7370 616e 3e3c 7370 616e 2063 me):. < │ │ │ │ -000257b0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -000257c0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn fie │ │ │ │ -000257e0: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.TimeField(). │ │ │ │ -00025840: 2020 2020 3c73 7061 6e20 636c 6173 733d if i │ │ │ │ -00025870: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ -00025880: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00025890: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.valu │ │ │ │ -000258e0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -00025900: 203c 7370 616e 2063 6c61 7373 3d22 6e22 datetime │ │ │ │ -00025920: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00025930: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .timedelt │ │ │ │ -00025950: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a):. re │ │ │ │ -00025990: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn fiel │ │ │ │ -000259b0: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.DurationField(). │ │ │ │ -00025a10: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -00025a30: 203c 7370 616e 2063 6c61 7373 3d22 6e62 isinstance(self │ │ │ │ -00025a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00025aa0: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ -00025ab0: 616c 7565 3c2f 7370 616e 3e3c 7370 616e alue, Decimal):. │ │ │ │ -00025b10: 2020 2020 2020 2020 3c73 7061 6e20 636c return fields.Decim │ │ │ │ -00025b80: 616c 4669 656c 643c 2f73 7061 6e3e 3c73 alField() │ │ │ │ -00025ba0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00025bb0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00025bc0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if isins │ │ │ │ -00025be0: 7461 6e63 653c 2f73 7061 6e3e 3c73 7061 tance(self │ │ │ │ -00025c20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00025c30: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .value, by │ │ │ │ -00025c80: 7465 733c 2f73 7061 6e3e 3c73 7061 6e20 tes):. │ │ │ │ -00025cb0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00025cc0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return fi │ │ │ │ -00025ce0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.BinaryField(). │ │ │ │ -00025d40: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -00025d60: 203c 7370 616e 2063 6c61 7373 3d22 6e62 isinstance(self │ │ │ │ -00025db0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00025dd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ -00025de0: 616c 7565 3c2f 7370 616e 3e3c 7370 616e alue, UUID< │ │ │ │ -00025e20: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00025e30: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00025e40: 2020 2020 203c 7370 616e 2063 6c61 7373 return fields │ │ │ │ -00025e80: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00025e90: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .UUIDFiel │ │ │ │ -00025eb0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d().. @propert │ │ │ │ -00025ef0: 793c 2f73 7061 6e3e 0a20 2020 203c 7370 y. def │ │ │ │ -00025f10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c empty_r │ │ │ │ -00025f30: 6573 756c 745f 7365 745f 7661 6c75 653c esult_set_value< │ │ │ │ -00025f40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00025f70: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -00025fb0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ -00025fd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.va │ │ │ │ -00026000: 6c75 653c 2f73 7061 6e3e 3c2f 6469 763e lue
    │ │ │ │ -00026010: 0a0a 0a0a 3c64 6976 2063 6c61 7373 3d22 ....
    .[docs]< │ │ │ │ -000260b0: 2f61 3e0a 3c73 7061 6e20 636c 6173 733d /a>.class │ │ │ │ -000260d0: 203c 7370 616e 2063 6c61 7373 3d22 6e63 RawSQL< │ │ │ │ -000260f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00026100: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 Expressio │ │ │ │ -00026120: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n):. def │ │ │ │ -00026160: 203c 7370 616e 2063 6c61 7373 3d22 666d __init__(self, sq │ │ │ │ -000261e0: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ -00026200: 203c 7370 616e 2063 6c61 7373 3d22 6e22 params,< │ │ │ │ -00026230: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> output_fi │ │ │ │ -00026250: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld=None): │ │ │ │ -000262a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000262b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000262c0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if output │ │ │ │ -000262e0: 5f66 6965 6c64 3c2f 7370 616e 3e20 3c73 _field i │ │ │ │ -00026300: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s None:. │ │ │ │ -00026340: 2020 2020 2020 2020 2020 3c73 7061 6e20 output │ │ │ │ -00026360: 5f66 6965 6c64 3c2f 7370 616e 3e20 3c73 _field =< │ │ │ │ -00026380: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Fiel │ │ │ │ -000263d0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d(). self< │ │ │ │ -00026410: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.sq │ │ │ │ -00026440: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ -00026460: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.params = sql< │ │ │ │ -000264e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00026500: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00026510: 6172 616d 733c 2f73 7061 6e3e 0a20 2020 arams. │ │ │ │ -00026520: 2020 2020 203c 7370 616e 2063 6c61 7373 super().__init__(outpu │ │ │ │ -000265c0: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field=< │ │ │ │ -000265e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ -00026600: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld).. def __repr__(self< │ │ │ │ -00026690: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -000266b0: 2020 2020 2020 2020 3c73 7061 6e20 636c return "{}( │ │ │ │ -00026720: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 {}, {})".form │ │ │ │ -000267c0: 6174 3c2f 7370 616e 3e3c 7370 616e 2063 at(self.__class__< │ │ │ │ -00026830: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -00026860: 5f6e 616d 655f 5f3c 2f73 7061 6e3e 3c73 _name__,< │ │ │ │ -00026880: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.sql, s │ │ │ │ -00026900: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.params< │ │ │ │ -00026940: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00026950: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -00026970: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c as_sql< │ │ │ │ -00026990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000269c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, compiler, conne │ │ │ │ -00026a30: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction):. re │ │ │ │ -00026a70: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn &qu │ │ │ │ -00026a90: 6f74 3b28 3c2f 7370 616e 3e3c 7370 616e ot;(%s)" % s │ │ │ │ -00026b00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.sql, self.params< │ │ │ │ -00026ba0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -00026bc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_grou │ │ │ │ -00026be0: 705f 6279 5f63 6f6c 733c 2f73 7061 6e3e p_by_cols │ │ │ │ -00026bf0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00026c00: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -00026c40: 2020 2020 2020 3c73 7061 6e20 636c 6173 return [sel │ │ │ │ -00026c90: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f] │ │ │ │ -00026cb0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00026cd0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 resolve_expres │ │ │ │ -00026cf0: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(. sel │ │ │ │ -00026d30: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -00026d50: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query=None, allow_ │ │ │ │ -00026dd0: 6a6f 696e 733c 2f73 7061 6e3e 3c73 7061 joins=True │ │ │ │ -00026e10: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00026e20: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , reuse=No │ │ │ │ -00026e70: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, summarize=False │ │ │ │ -00026ee0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00026f00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00026f10: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ -00026f20: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00026f30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 False. ):. # Re │ │ │ │ -00026f90: 736f 6c76 6520 7061 7265 6e74 7320 6669 solve parents fi │ │ │ │ -00026fa0: 656c 6473 2075 7365 6420 696e 2072 6177 elds used in raw │ │ │ │ -00026fb0: 2053 514c 2e3c 2f73 7061 6e3e 0a20 2020 SQL.. │ │ │ │ -00026fc0: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ -00026fe0: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ -00026ff0: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery.model< │ │ │ │ -00027030: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -00027040: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00027050: 2020 2020 3c73 7061 6e20 636c 6173 733d for < │ │ │ │ -00027070: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00027080: 6172 656e 743c 2f73 7061 6e3e 203c 7370 arent in │ │ │ │ -000270a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c query.mode │ │ │ │ -000270f0: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l. │ │ │ │ -00027110: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00027120: 5f6d 6574 613c 2f73 7061 6e3e 3c73 7061 _meta.get_parent_l │ │ │ │ -00027160: 6973 743c 2f73 7061 6e3e 3c73 7061 6e20 ist():. │ │ │ │ -00027190: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ -000271b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000271c0: 7061 7265 6e74 5f66 6965 6c64 3c2f 7370 parent_field in < │ │ │ │ -000271f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00027200: 6172 656e 743c 2f73 7061 6e3e 3c73 7061 arent._meta │ │ │ │ -00027240: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00027250: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .local_fi │ │ │ │ -00027270: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds:. │ │ │ │ -000272a0: 2020 2020 2020 2020 3c73 7061 6e20 636c _ │ │ │ │ -000272c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000272d0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , column_ │ │ │ │ -000272f0: 6e61 6d65 3c2f 7370 616e 3e20 3c73 7061 name = parent_fiel │ │ │ │ -00027330: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d. │ │ │ │ -00027350: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00027360: 6765 745f 6174 746e 616d 655f 636f 6c75 get_attname_colu │ │ │ │ -00027370: 6d6e 3c2f 7370 616e 3e3c 7370 616e 2063 mn(). │ │ │ │ -000273a0: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -000273c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 column_name.lower │ │ │ │ -00027410: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ -00027430: 203c 7370 616e 2063 6c61 7373 3d22 6f77 in sel │ │ │ │ -00027460: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00027480: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00027490: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql.lower() │ │ │ │ -000274e0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -000274f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00027500: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query.resolve_ref │ │ │ │ -00027550: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (. │ │ │ │ +00024cd0: 2262 7022 3e73 656c 663c 2f73 7061 6e3e "bp">self │ │ │ │ +00024ce0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00024cf0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00024d00: 2020 3c73 7061 6e20 636c 6173 733d 226b if isi │ │ │ │ +00024d30: 6e73 7461 6e63 653c 2f73 7061 6e3e 3c73 nstance(< │ │ │ │ +00024d50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.value< │ │ │ │ +00024da0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00024dc0: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00024dd0: 7374 723c 2f73 7061 6e3e 3c73 7061 6e20 str):. │ │ │ │ +00024e00: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00024e10: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return fi │ │ │ │ +00024e30: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.CharField(). │ │ │ │ +00024e90: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +00024eb0: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00024ec0: 6973 696e 7374 616e 6365 3c2f 7370 616e isinstance(self.val │ │ │ │ +00024f30: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue, bool): │ │ │ │ +00024f80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00024f90: 2020 2020 3c73 7061 6e20 636c 6173 733d return fields< │ │ │ │ +00024fd0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00024fe0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 BooleanFi │ │ │ │ +00025000: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld(). if isinstanc │ │ │ │ +00025060: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +00025080: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.value │ │ │ │ +000250d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000250e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , int):. │ │ │ │ +00025120: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ +00025140: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Int │ │ │ │ +00025190: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ +000251a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000251b0: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ +000251c0: 2020 3c73 7061 6e20 636c 6173 733d 226b if isi │ │ │ │ +000251f0: 6e73 7461 6e63 653c 2f73 7061 6e3e 3c73 nstance(< │ │ │ │ +00025210: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.value< │ │ │ │ +00025260: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00025280: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00025290: 666c 6f61 743c 2f73 7061 6e3e 3c73 7061 float):. │ │ │ │ +000252c0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +000252e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000252f0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.FloatField< │ │ │ │ +00025330: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(). │ │ │ │ +00025350: 2020 2020 2020 2020 3c73 7061 6e20 636c if isinstance(sel │ │ │ │ +000253c0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000253e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000253f0: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value, datetime.date │ │ │ │ +00025460: 7469 6d65 3c2f 7370 616e 3e3c 7370 616e time):. │ │ │ │ +00025490: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +000254b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +000254c0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateTimeFiel │ │ │ │ +00025500: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d(). if isinstance< │ │ │ │ +00025560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00025590: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.value,< │ │ │ │ +000255e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> datetime< │ │ │ │ +00025600: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.da │ │ │ │ +00025630: 7465 3c2f 7370 616e 3e3c 7370 616e 2063 te):. < │ │ │ │ +00025660: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00025670: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn fie │ │ │ │ +00025690: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DateField(). │ │ │ │ +000256f0: 2020 2020 3c73 7061 6e20 636c 6173 733d if i │ │ │ │ +00025720: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ +00025730: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00025740: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.valu │ │ │ │ +00025790: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +000257b0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 datetime │ │ │ │ +000257d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000257e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .time):. │ │ │ │ +00025820: 2020 2020 2020 2020 203c 7370 616e 2063 return< │ │ │ │ +00025840: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Time │ │ │ │ +00025890: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field(). if │ │ │ │ +000258d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ +000258f0: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(self.< │ │ │ │ +00025940: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value, datet │ │ │ │ +00025990: 696d 653c 2f73 7061 6e3e 3c73 7061 6e20 ime.timedelta):. │ │ │ │ +000259f0: 2020 2020 2020 2020 3c73 7061 6e20 636c return fields.Durat │ │ │ │ +00025a60: 696f 6e46 6965 6c64 3c2f 7370 616e 3e3c ionField< │ │ │ │ +00025a70: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00025a80: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00025a90: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if isin │ │ │ │ +00025ac0: 7374 616e 6365 3c2f 7370 616e 3e3c 7370 stance(self.value, De │ │ │ │ +00025b60: 6369 6d61 6c3c 2f73 7061 6e3e 3c73 7061 cimal):. │ │ │ │ +00025b90: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00025bb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00025bc0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DecimalFiel │ │ │ │ +00025c00: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d(). if isinstance< │ │ │ │ +00025c60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00025c90: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.value,< │ │ │ │ +00025ce0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bytes):. │ │ │ │ +00025d20: 2020 2020 2020 2020 2020 3c73 7061 6e20 return │ │ │ │ +00025d40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Bin │ │ │ │ +00025d90: 6172 7946 6965 6c64 3c2f 7370 616e 3e3c aryField< │ │ │ │ +00025da0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00025db0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00025dc0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if isin │ │ │ │ +00025df0: 7374 616e 6365 3c2f 7370 616e 3e3c 7370 stance(self.value, UU │ │ │ │ +00025e90: 4944 3c2f 7370 616e 3e3c 7370 616e 2063 ID):. < │ │ │ │ +00025ec0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00025ed0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn fie │ │ │ │ +00025ef0: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.UUIDField().. │ │ │ │ +00025f50: 203c 7370 616e 2063 6c61 7373 3d22 6e64 @property. def empty_result_ │ │ │ │ +00025fb0: 7365 745f 7661 6c75 653c 2f73 7061 6e3e set_value │ │ │ │ +00025fc0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00025fd0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +00026010: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ +00026050: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00026060: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .value
    .....[documentatie │ │ │ │ +00026130: 5d3c 2f61 3e0a 3c73 7061 6e20 636c 6173 ].class RawSQL(Express │ │ │ │ +000261a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. def __init__(self │ │ │ │ +00026230: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00026250: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00026260: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ +000262a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000262b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , output_ │ │ │ │ +000262d0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field=None │ │ │ │ +00026310: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00026320: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00026330: 2020 3c73 7061 6e20 636c 6173 733d 226b if outp │ │ │ │ +00026360: 7574 5f66 6965 6c64 3c2f 7370 616e 3e20 ut_field │ │ │ │ +00026370: 3c73 7061 6e20 636c 6173 733d 226f 7722 is None │ │ │ │ +000263a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +000263c0: 2020 2020 2020 2020 2020 2020 3c73 7061 outp │ │ │ │ +000263e0: 7574 5f66 6965 6c64 3c2f 7370 616e 3e20 ut_field │ │ │ │ +000263f0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00026400: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = fields< │ │ │ │ +00026420: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Fi │ │ │ │ +00026450: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld(). sel │ │ │ │ +00026490: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000264b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000264c0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, self< │ │ │ │ +00026500: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00026510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 params = sq │ │ │ │ +00026560: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ +00026580: 203c 7370 616e 2063 6c61 7373 3d22 6e22 params. │ │ │ │ +000265a0: 2020 2020 2020 203c 7370 616e 2063 6c61 super().__init__(out │ │ │ │ +00026640: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ +00026650: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00026660: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =output_f │ │ │ │ +00026680: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield).. def __repr__(sel │ │ │ │ +00026710: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ +00026750: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "< │ │ │ │ +00026770: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>{} │ │ │ │ +00026790: 3c73 7061 6e20 636c 6173 733d 2273 3222 ({}, {} │ │ │ │ +000267f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )"< │ │ │ │ +00026810: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.fo │ │ │ │ +00026840: 726d 6174 3c2f 7370 616e 3e3c 7370 616e rmat(self< │ │ │ │ +00026880: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00026890: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ +000268b0: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _. │ │ │ │ +000268d0: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __name__ │ │ │ │ +000268f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00026900: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.sql │ │ │ │ +00026950: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00026970: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.params).. < │ │ │ │ +000269e0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +000269f0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef as_sq │ │ │ │ +00026a10: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l( │ │ │ │ +00026a30: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, compiler, con │ │ │ │ +00026ab0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection): │ │ │ │ +00026ad0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00026ae0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00026af0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return & │ │ │ │ +00026b10: 7175 6f74 3b28 3c2f 7370 616e 3e3c 7370 quot;(%s │ │ │ │ +00026b30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )"< │ │ │ │ +00026b50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> % │ │ │ │ +00026b70: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.sql,< │ │ │ │ +00026bd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.param │ │ │ │ +00026c20: 733c 2f73 7061 6e3e 0a0a 2020 2020 3c73 s.. de │ │ │ │ +00026c40: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f get_gr │ │ │ │ +00026c60: 6f75 705f 6279 5f63 6f6c 733c 2f73 7061 oup_by_cols(self< │ │ │ │ +00026ca0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00026cc0: 2020 2020 2020 2020 3c73 7061 6e20 636c return [s │ │ │ │ +00026d10: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf].. def resolve_expr │ │ │ │ +00026d70: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(. s │ │ │ │ +00026db0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, query< │ │ │ │ +00026df0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00026e00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None, allo │ │ │ │ +00026e50: 775f 6a6f 696e 733c 2f73 7061 6e3e 3c73 w_joins=< │ │ │ │ +00026e70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>True, reuse │ │ │ │ +00026ec0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ +00026ee0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +00026ef0: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None, summarize=Fal │ │ │ │ +00026f60: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, for_save=False< │ │ │ │ +00026fd0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. ):. # │ │ │ │ +00027010: 5265 736f 6c76 6520 7061 7265 6e74 7320 Resolve parents │ │ │ │ +00027020: 6669 656c 6473 2075 7365 6420 696e 2072 fields used in r │ │ │ │ +00027030: 6177 2053 514c 2e3c 2f73 7061 6e3e 0a20 aw SQL.. │ │ │ │ +00027040: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +00027060: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query.model:. │ │ │ │ +000270d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 for │ │ │ │ +000270f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 parent < │ │ │ │ +00027110: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +00027120: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in query< │ │ │ │ +00027140: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.mo │ │ │ │ +00027170: 6465 6c3c 2f73 7061 6e3e 3c73 7061 6e20 del._meta.< │ │ │ │ +000271c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_parent │ │ │ │ +000271e0: 5f6c 6973 743c 2f73 7061 6e3e 3c73 7061 _list():< │ │ │ │ +00027200: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00027210: 2020 2020 2020 203c 7370 616e 2063 6c61 for parent_field in │ │ │ │ +00027270: 203c 7370 616e 2063 6c61 7373 3d22 6e22 parent.< │ │ │ │ +000272a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_meta.local_ │ │ │ │ +000272f0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields:. │ │ │ │ +00027320: 2020 2020 2020 2020 2020 3c73 7061 6e20 _, colum │ │ │ │ +00027370: 6e5f 6e61 6d65 3c2f 7370 616e 3e20 3c73 n_name =< │ │ │ │ +00027390: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> parent_fi │ │ │ │ +000273b0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld.get_attname_co │ │ │ │ +000273f0: 6c75 6d6e 3c2f 7370 616e 3e3c 7370 616e lumn(). │ │ │ │ +00027420: 2020 2020 2020 2020 203c 7370 616e 2063 if column_name.low │ │ │ │ +00027490: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er() in s │ │ │ │ +000274e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.sql.lower │ │ │ │ +00027550: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00027560: 2829 3a3c 2f73 7061 6e3e 0a20 2020 2020 ():. │ │ │ │ 00027570: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00027580: 2020 2020 2020 2020 2020 2020 3c73 7061 pare │ │ │ │ -000275a0: 6e74 5f66 6965 6c64 3c2f 7370 616e 3e3c nt_field< │ │ │ │ -000275b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000275c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 name, allow │ │ │ │ -00027610: 5f6a 6f69 6e73 3c2f 7370 616e 3e3c 7370 _joins, reuse, summa │ │ │ │ -00027680: 7269 7a65 3c2f 7370 616e 3e0a 2020 2020 rize. │ │ │ │ -00027690: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000276a0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ -000276c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000276d0: 2020 2020 203c 7370 616e 2063 6c61 7373 break. return │ │ │ │ -00027710: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c super().< │ │ │ │ -00027760: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>resolve_ex │ │ │ │ -00027780: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -00027790: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000277a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000277b0: 2020 2020 3c73 7061 6e20 636c 6173 733d query │ │ │ │ -000277d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000277e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , allow_j │ │ │ │ -00027800: 6f69 6e73 3c2f 7370 616e 3e3c 7370 616e oins, reuse │ │ │ │ -00027840: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00027850: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , summari │ │ │ │ -00027870: 7a65 3c2f 7370 616e 3e3c 7370 616e 2063 ze, for_save. )
    ....clas │ │ │ │ -000278f0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s Star(Exp │ │ │ │ -00027940: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression): │ │ │ │ -00027960: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . def< │ │ │ │ -00027980: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __repr__ │ │ │ │ -000279a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -000279c0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -000279d0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ -00027a10: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn &quo │ │ │ │ -00027a30: 743b 2623 3339 3b2a 2623 3339 3b26 7175 t;'*'&qu │ │ │ │ -00027a40: 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 2020 ot;.. │ │ │ │ -00027a50: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00027a60: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_s │ │ │ │ -00027a80: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql(self, compiler, co │ │ │ │ -00027b20: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -00027b30: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00027b40: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00027b50: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00027b70: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00027b80: 2671 756f 743b 2a26 7175 6f74 3b3c 2f73 "*", []< │ │ │ │ -00027bc0: 2f73 7061 6e3e 0a0a 0a3c 7370 616e 2063 /span>...class Col(Express │ │ │ │ -00027c30: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. contains │ │ │ │ -00027c70: 5f63 6f6c 756d 6e5f 7265 6665 7265 6e63 _column_referenc │ │ │ │ -00027c80: 6573 3c2f 7370 616e 3e20 3c73 7061 6e20 es = True. │ │ │ │ -00027cc0: 2020 2020 3c73 7061 6e20 636c 6173 733d possibly_mul │ │ │ │ -00027ce0: 7469 7661 6c75 6564 3c2f 7370 616e 3e20 tivalued │ │ │ │ -00027cf0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00027d00: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = False< │ │ │ │ -00027d20: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -00027d40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __init__ │ │ │ │ -00027d60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00027d80: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00027d90: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, alias │ │ │ │ -00027dd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00027de0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , target< │ │ │ │ -00027e00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00027e20: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -00027e30: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field=None< │ │ │ │ -00027e70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00027e90: 2020 2020 2020 2020 3c73 7061 6e20 636c if output_field is │ │ │ │ -00027ef0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 None:. │ │ │ │ -00027f30: 2020 3c73 7061 6e20 636c 6173 733d 226e output_field = < │ │ │ │ -00027f70: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ -00027f80: 6172 6765 743c 2f73 7061 6e3e 0a20 2020 arget. │ │ │ │ -00027f90: 2020 2020 203c 7370 616e 2063 6c61 7373 super().__init__(outpu │ │ │ │ -00028030: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field=< │ │ │ │ -00028050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ -00028070: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld). self< │ │ │ │ -000280b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.al │ │ │ │ -000280e0: 6961 733c 2f73 7061 6e3e 3c73 7061 6e20 ias, self< │ │ │ │ -00028120: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00028130: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 target = al │ │ │ │ -00028180: 6961 733c 2f73 7061 6e3e 3c73 7061 6e20 ias, target │ │ │ │ -000281c0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -000281e0: 203c 7370 616e 2063 6c61 7373 3d22 666d __repr__(self):. │ │ │ │ -00028250: 2020 2020 2020 203c 7370 616e 2063 6c61 alias, targ │ │ │ │ -000282a0: 6574 3c2f 7370 616e 3e20 3c73 7061 6e20 et = self< │ │ │ │ -000282e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000282f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 alias, sel │ │ │ │ -00028340: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00028360: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00028370: 7461 7267 6574 3c2f 7370 616e 3e0a 2020 target. │ │ │ │ -00028380: 2020 2020 2020 3c73 7061 6e20 636c 6173 identifier │ │ │ │ -000283a0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = (alias< │ │ │ │ -000283f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00028410: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00028420: 7374 723c 2f73 7061 6e3e 3c73 7061 6e20 str(target< │ │ │ │ -00028460: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00028470: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) if alias │ │ │ │ -000284b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000284c0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else (str< │ │ │ │ -00028500: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00028510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 target),). │ │ │ │ -00028550: 2020 2020 2020 203c 7370 616e 2063 6c61 return "{}(< │ │ │ │ -000285c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>{} │ │ │ │ -000285e0: 3c73 7061 6e20 636c 6173 733d 2273 3222 )"< │ │ │ │ -00028600: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00028610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 format(sel │ │ │ │ -00028660: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00028680: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __class__.__name │ │ │ │ -000286d0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __, ", " │ │ │ │ -00028710: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;. │ │ │ │ -00028730: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00028740: 6a6f 696e 3c2f 7370 616e 3e3c 7370 616e join(identifiers)).. │ │ │ │ -000287a0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -000287c0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -000287d0: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(self, compil │ │ │ │ -00028840: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection):. │ │ │ │ -000288a0: 2020 2020 203c 7370 616e 2063 6c61 7373 alias, column │ │ │ │ -000288f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00028910: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.alias, self< │ │ │ │ -00028990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ta │ │ │ │ -000289c0: 7267 6574 3c2f 7370 616e 3e3c 7370 616e rget.query< │ │ │ │ +000275a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +000275b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 resolve_r │ │ │ │ +000275d0: 6566 3c2f 7370 616e 3e3c 7370 616e 2063 ef(. │ │ │ │ +00027600: 2020 2020 2020 2020 2020 2020 2020 3c73 pa │ │ │ │ +00027620: 7265 6e74 5f66 6965 6c64 3c2f 7370 616e rent_field.name, all │ │ │ │ +00027690: 6f77 5f6a 6f69 6e73 3c2f 7370 616e 3e3c ow_joins< │ │ │ │ +000276a0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000276b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c reuse, sum │ │ │ │ +00027700: 6d61 7269 7a65 3c2f 7370 616e 3e0a 2020 marize. │ │ │ │ +00027710: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027720: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +00027740: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00027750: 2020 2020 2020 203c 7370 616e 2063 6c61 break. retu │ │ │ │ +00027790: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn super │ │ │ │ +000277b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +000277d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000277e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .resolve_ │ │ │ │ +00027800: 6578 7072 6573 7369 6f6e 3c2f 7370 616e expression(. │ │ │ │ +00027830: 2020 2020 2020 3c73 7061 6e20 636c 6173 query, allow │ │ │ │ +00027880: 5f6a 6f69 6e73 3c2f 7370 616e 3e3c 7370 _joins, reuse, summa │ │ │ │ +000278f0: 7269 7a65 3c2f 7370 616e 3e3c 7370 616e rize, for_save. )
    ....cl │ │ │ │ +00027970: 6173 733c 2f73 7061 6e3e 203c 7370 616e ass Star │ │ │ │ +00027990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000279b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ +000279c0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +000279d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000279e0: 293a 3c2f 7370 616e 3e0a 2020 2020 3c73 ):. de │ │ │ │ +00027a00: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __repr │ │ │ │ +00027a20: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self):< │ │ │ │ +00027a70: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00027a80: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00027a90: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ +00027ab0: 756f 743b 2623 3339 3b2a 2623 3339 3b26 uot;'*'& │ │ │ │ +00027ac0: 7175 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 quot;.. │ │ │ │ +00027ad0: 2020 3c73 7061 6e20 636c 6173 733d 226b def as │ │ │ │ +00027b00: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(self< │ │ │ │ +00027b40: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00027b50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ +00027b70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00027b90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00027ba0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection):. │ │ │ │ +00027bd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00027bf0: 203c 7370 616e 2063 6c61 7373 3d22 7332 "*"< │ │ │ │ +00027c10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00027c30: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ +00027c40: 5d3c 2f73 7061 6e3e 0a0a 0a3c 7370 616e ]...class │ │ │ │ +00027c60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Col(Expre │ │ │ │ +00027cb0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. contai │ │ │ │ +00027cf0: 6e73 5f63 6f6c 756d 6e5f 7265 6665 7265 ns_column_refere │ │ │ │ +00027d00: 6e63 6573 3c2f 7370 616e 3e20 3c73 7061 nces = True. possibly_m │ │ │ │ +00027d60: 756c 7469 7661 6c75 6564 3c2f 7370 616e ultivalued = Fals │ │ │ │ +00027da0: 653c 2f73 7061 6e3e 0a0a 2020 2020 3c73 e.. de │ │ │ │ +00027dc0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __init │ │ │ │ +00027de0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self, alias, targe │ │ │ │ +00027e80: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ +00027ea0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 output_field=Non │ │ │ │ +00027ef0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e):. if output_field │ │ │ │ +00027f50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c is None< │ │ │ │ +00027f90: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00027fa0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00027fb0: 2020 2020 3c73 7061 6e20 636c 6173 733d output_field │ │ │ │ +00027fd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +00027ff0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 target. │ │ │ │ +00028010: 2020 2020 2020 203c 7370 616e 2063 6c61 super().__init__(out │ │ │ │ +000280b0: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ +000280c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000280d0: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =output_f │ │ │ │ +000280f0: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield). sel │ │ │ │ +00028130: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00028150: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00028160: 616c 6961 733c 2f73 7061 6e3e 3c73 7061 alias, self.target< │ │ │ │ +000281d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +000281f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00028200: 616c 6961 733c 2f73 7061 6e3e 3c73 7061 alias, target.. def __repr__(self │ │ │ │ +000282b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +000282d0: 0a20 2020 2020 2020 203c 7370 616e 2063 . alias, ta │ │ │ │ +00028320: 7267 6574 3c2f 7370 616e 3e20 3c73 7061 rget = self.alias, s │ │ │ │ +000283c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.target. │ │ │ │ +00028400: 2020 2020 2020 2020 3c73 7061 6e20 636c identifi │ │ │ │ +00028420: 6572 733c 2f73 7061 6e3e 203c 7370 616e ers = (alia │ │ │ │ +00028470: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ +00028490: 203c 7370 616e 2063 6c61 7373 3d22 6e62 str(target)) if alias else (< │ │ │ │ +00028560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>str(target< │ │ │ │ +000285b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),) │ │ │ │ +000285d0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +000285f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "{}< │ │ │ │ +00028630: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00028640: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c ({})".format< │ │ │ │ +000286b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +000286e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.__class__.__na │ │ │ │ +00028750: 6d65 5f5f 3c2f 7370 616e 3e3c 7370 616e me__, ", &qu │ │ │ │ +00028790: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;.join(identifiers │ │ │ │ +00028800: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )) │ │ │ │ +00028820: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00028840: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sql< │ │ │ │ +00028860: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00028870: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, comp │ │ │ │ +000288c0: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler, connection):. │ │ │ │ +00028920: 2020 2020 2020 203c 7370 616e 2063 6c61 alias, colu │ │ │ │ +00028970: 6d6e 3c2f 7370 616e 3e20 3c73 7061 6e20 mn = self< │ │ │ │ +000289b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +000289c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 aliascolumn │ │ │ │ -00028a00: 0a20 2020 2020 2020 203c 7370 616e 2063 . identif │ │ │ │ -00028a20: 6965 7273 3c2f 7370 616e 3e20 3c73 7061 iers = (ali │ │ │ │ -00028a70: 6173 3c2f 7370 616e 3e3c 7370 616e 2063 as, column< │ │ │ │ -00028ab0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00028ac0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c if alias < │ │ │ │ -00028b00: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ -00028b10: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse (column │ │ │ │ -00028b50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00028b60: 2c29 3c2f 7370 616e 3e0a 2020 2020 2020 ,). │ │ │ │ -00028b70: 2020 3c73 7061 6e20 636c 6173 733d 226e sql = ".&q │ │ │ │ -00028bc0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;.join(< │ │ │ │ -00028c10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>map(compile │ │ │ │ -00028c60: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r. │ │ │ │ -00028c80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00028c90: 7175 6f74 655f 6e61 6d65 5f75 6e6c 6573 quote_name_unles │ │ │ │ -00028ca0: 735f 616c 6961 733c 2f73 7061 6e3e 3c73 s_alias,< │ │ │ │ -00028cc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> identifie │ │ │ │ -00028ce0: 7273 3c2f 7370 616e 3e3c 7370 616e 2063 rs)). retur │ │ │ │ -00028d20: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n sql, [].. def relabeled │ │ │ │ -00028db0: 5f63 6c6f 6e65 3c2f 7370 616e 3e3c 7370 _clone(self, relabe │ │ │ │ -00028e20: 6c73 3c2f 7370 616e 3e3c 7370 616e 2063 ls):. if self.alias is │ │ │ │ -00028ed0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 None:. │ │ │ │ -00028f10: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -00028f30: 3c73 7061 6e20 636c 6173 733d 2262 7022 self. │ │ │ │ -00028f50: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ -00028f90: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00028fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ -00028fc0: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ -00028fe0: 0a20 2020 2020 2020 2020 2020 203c 7370 . rel │ │ │ │ -00029000: 6162 656c 733c 2f73 7061 6e3e 3c73 7061 abels.get(< │ │ │ │ -00029050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.alias< │ │ │ │ +000289f0: 7022 3e2c 3c2f 7370 616e 3e20 3c73 7061 p">, sel │ │ │ │ +00028a10: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00028a30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00028a40: 7461 7267 6574 3c2f 7370 616e 3e3c 7370 target.column. ident │ │ │ │ +00028aa0: 6966 6965 7273 3c2f 7370 616e 3e20 3c73 ifiers =< │ │ │ │ +00028ac0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ +00028ae0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ +00028af0: 6c69 6173 3c2f 7370 616e 3e3c 7370 616e lias, column) if alias │ │ │ │ +00028b80: 203c 7370 616e 2063 6c61 7373 3d22 6b22 else (column,). │ │ │ │ +00028bf0: 2020 2020 3c73 7061 6e20 636c 6173 733d sql < │ │ │ │ +00028c10: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00028c20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ". │ │ │ │ +00028c40: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ".join │ │ │ │ +00028c80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00028c90: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (map(compi │ │ │ │ +00028ce0: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler.quote_name_unl │ │ │ │ +00028d20: 6573 735f 616c 6961 733c 2f73 7061 6e3e ess_alias │ │ │ │ +00028d30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00028d40: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , identif │ │ │ │ +00028d60: 6965 7273 3c2f 7370 616e 3e3c 7370 616e iers)). ret │ │ │ │ +00028da0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn sql, [] │ │ │ │ +00028df0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00028e10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c relabel │ │ │ │ +00028e30: 6564 5f63 6c6f 6e65 3c2f 7370 616e 3e3c ed_clone< │ │ │ │ +00028e40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00028e50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, rela │ │ │ │ +00028ea0: 6265 6c73 3c2f 7370 616e 3e3c 7370 616e bels):. if< │ │ │ │ +00028ee0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.alias │ │ │ │ +00028f30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c is None< │ │ │ │ +00028f70: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00028f80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00028f90: 2020 2020 3c73 7061 6e20 636c 6173 733d return self. │ │ │ │ +00028fd0: 2020 2020 2020 203c 7370 616e 2063 6c61 return self.__clas │ │ │ │ +00029040: 735f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 s__(. < │ │ │ │ +00029070: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +00029080: 656c 6162 656c 733c 2f73 7061 6e3e 3c73 elabels.< │ │ │ │ 000290a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000290c0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -000290d0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.alias< │ │ │ │ -00029110: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00029120: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.tar │ │ │ │ -00029170: 6765 743c 2f73 7061 6e3e 3c73 7061 6e20 get, self< │ │ │ │ -000291b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +000290b0: 733d 226e 223e 6765 743c 2f73 7061 6e3e s="n">get │ │ │ │ +000290c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000290d0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.alia │ │ │ │ +00029120: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ +00029140: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.alias), self │ │ │ │ 000291c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ -000291e0: 656c 643c 2f73 7061 6e3e 0a20 2020 2020 eld. │ │ │ │ -000291f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ).. │ │ │ │ -00029210: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ -00029240: 5f67 726f 7570 5f62 795f 636f 6c73 3c2f _group_by_cols(se │ │ │ │ -00029280: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -000292c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n [self].. def get_db_co │ │ │ │ -00029350: 6e76 6572 7465 7273 3c2f 7370 616e 3e3c nverters< │ │ │ │ -00029360: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00029370: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, conn │ │ │ │ -000293c0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection):< │ │ │ │ -000293e0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -000293f0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -00029400: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f self.tar │ │ │ │ -00029450: 6765 743c 2f73 7061 6e3e 203c 7370 616e get == self.output_ │ │ │ │ -000294c0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field:. │ │ │ │ -000294f0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00029510: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00029520: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.output_field< │ │ │ │ -00029560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ge │ │ │ │ -00029590: 745f 6462 5f63 6f6e 7665 7274 6572 733c t_db_converters< │ │ │ │ -000295a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(co │ │ │ │ -000295d0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -000295e0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -000295f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00029600: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00029610: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ -00029630: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.output_field.get │ │ │ │ -000296a0: 5f64 625f 636f 6e76 6572 7465 7273 3c2f _db_converters(. │ │ │ │ -000296d0: 2020 2020 2020 2020 2020 3c73 7061 6e20 connec │ │ │ │ -000296f0: 7469 6f6e 3c2f 7370 616e 3e0a 2020 2020 tion. │ │ │ │ -00029700: 2020 2020 3c73 7061 6e20 636c 6173 733d ) + self.target │ │ │ │ -00029780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000297a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ -000297b0: 6574 5f64 625f 636f 6e76 6572 7465 7273 et_db_converters │ │ │ │ -000297c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -000297e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -000297f0: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -00029800: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00029810: 293c 2f73 7061 6e3e 0a0a 0a3c 7370 616e )...class │ │ │ │ -00029830: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Ref(Expre │ │ │ │ -00029880: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. ""&q │ │ │ │ -000298e0: 756f 743b 3c2f 7370 616e 3e0a 3c73 7061 uot;. │ │ │ │ -00029900: 2052 6566 6572 656e 6365 2074 6f20 636f Reference to co │ │ │ │ -00029910: 6c75 6d6e 2061 6c69 6173 206f 6620 7468 lumn alias of th │ │ │ │ -00029920: 6520 7175 6572 792e 2046 6f72 2065 7861 e query. For exa │ │ │ │ -00029930: 6d70 6c65 2c20 5265 6628 2623 3339 3b73 mple, Ref('s │ │ │ │ -00029940: 756d 5f63 6f73 7426 2333 393b 2920 696e um_cost') in │ │ │ │ -00029950: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . qs. │ │ │ │ -00029970: 616e 6e6f 7461 7465 2873 756d 5f63 6f73 annotate(sum_cos │ │ │ │ -00029980: 743d 5375 6d28 2623 3339 3b63 6f73 7426 t=Sum('cost& │ │ │ │ -00029990: 2333 393b 2929 2071 7565 7279 2e3c 2f73 #39;)) query.. " │ │ │ │ -000299c0: 2671 756f 743b 2671 756f 743b 3c2f 7370 "".. def __init__(sel │ │ │ │ -00029a40: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -00029a60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 refs, source):. │ │ │ │ -00029ad0: 2020 2020 3c73 7061 6e20 636c 6173 733d super().__init__(). │ │ │ │ -00029b60: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ -00029b80: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00029b90: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .refs, sel │ │ │ │ -00029be0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00029c00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00029c10: 736f 7572 6365 3c2f 7370 616e 3e20 3c73 source =< │ │ │ │ -00029c30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> refs, sourc │ │ │ │ -00029c80: 653c 2f73 7061 6e3e 0a0a 2020 2020 3c73 e.. de │ │ │ │ -00029ca0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __repr │ │ │ │ -00029cc0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self):< │ │ │ │ -00029d10: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00029d20: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -00029d30: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ -00029d50: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;{}({ │ │ │ │ -00029da0: 7d3c 2f73 7061 6e3e 3c73 7061 6e20 636c }, {})&q │ │ │ │ -00029df0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;.format │ │ │ │ -00029e30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00029e40: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.__c │ │ │ │ -00029e90: 6c61 7373 5f5f 3c2f 7370 616e 3e3c 7370 lass__.__name__, s │ │ │ │ -00029f00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.refs, self.source │ │ │ │ -00029fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00029fc0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -00029fe0: 3c73 7061 6e20 636c 6173 733d 226e 6622 get_source_expr │ │ │ │ -0002a000: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions(< │ │ │ │ -0002a020: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ -0002a060: 2020 2020 3c73 7061 6e20 636c 6173 733d return [self< │ │ │ │ -0002a0b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.so │ │ │ │ -0002a0e0: 7572 6365 3c2f 7370 616e 3e3c 7370 616e urce].. def set_source_ │ │ │ │ -0002a140: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(self< │ │ │ │ -0002a180: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002a1a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0002a1b0: 7870 7273 3c2f 7370 616e 3e3c 7370 616e xprs):. (self.source< │ │ │ │ -0002a240: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,) │ │ │ │ -0002a260: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002a270: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = exprs.. def resolve_e │ │ │ │ -0002a2d0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ -0002a2e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002a2f0: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ -0002a300: 203c 7370 616e 2063 6c61 7373 3d22 6270 self, query=None< │ │ │ │ -0002a380: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002a3a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -0002a3b0: 6c6c 6f77 5f6a 6f69 6e73 3c2f 7370 616e llow_joins=True, re │ │ │ │ -0002a420: 7573 653c 2f73 7061 6e3e 3c73 7061 6e20 use=None,< │ │ │ │ -0002a470: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ -0002a490: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ -0002a4b0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0002a4c0: 4661 6c73 653c 2f73 7061 6e3e 3c73 7061 False, for_save=Fal │ │ │ │ -0002a530: 7365 3c2f 7370 616e 3e0a 2020 2020 3c73 se. ): │ │ │ │ -0002a550: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0002a560: 3c73 7061 6e20 636c 6173 733d 2263 3122 # The sub-expre │ │ │ │ -0002a580: 7373 696f 6e20 6073 6f75 7263 6560 2068 ssion `source` h │ │ │ │ -0002a590: 6173 2061 6c72 6561 6479 2062 6565 6e20 as already been │ │ │ │ -0002a5a0: 7265 736f 6c76 6564 2c20 6173 2074 6869 resolved, as thi │ │ │ │ -0002a5b0: 7320 6973 3c2f 7370 616e 3e0a 2020 2020 s is. │ │ │ │ -0002a5c0: 2020 2020 3c73 7061 6e20 636c 6173 733d # just a re │ │ │ │ -0002a5e0: 6665 7265 6e63 6520 746f 2074 6865 206e ference to the n │ │ │ │ -0002a5f0: 616d 6520 6f66 2060 736f 7572 6365 602e ame of `source`. │ │ │ │ -0002a600: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0002a610: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0002a620: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ -0002a640: 656c 663c 2f73 7061 6e3e 0a0a 2020 2020 elf.. │ │ │ │ -0002a650: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0002a660: 6465 663c 2f73 7061 6e3e 203c 7370 616e def get_ │ │ │ │ -0002a680: 7265 6673 3c2f 7370 616e 3e3c 7370 616e refs(self< │ │ │ │ -0002a6c0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002a6d0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0002a6e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0002a700: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ -0002a710: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.refs< │ │ │ │ -0002a760: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>}.. │ │ │ │ -0002a780: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0002a7a0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -0002a7b0: 7265 6c61 6265 6c65 645f 636c 6f6e 653c relabeled_clone< │ │ │ │ -0002a7c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0002a7f0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, relabels):. │ │ │ │ -0002a850: 2020 2020 3c73 7061 6e20 636c 6173 733d clone │ │ │ │ -0002a870: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = self< │ │ │ │ -0002a8a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ -0002a8d0: 7079 3c2f 7370 616e 3e3c 7370 616e 2063 py(). clone │ │ │ │ -0002a910: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002a930: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -0002a940: 6f75 7263 653c 2f73 7061 6e3e 203c 7370 ource = self.source │ │ │ │ -0002a9b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002a9d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -0002a9e0: 656c 6162 656c 6564 5f63 6c6f 6e65 3c2f elabeled_clone(rel │ │ │ │ -0002aa20: 6162 656c 733c 2f73 7061 6e3e 3c73 7061 abels). ret │ │ │ │ -0002aa60: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn clone │ │ │ │ -0002aa80: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0002aaa0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c as_sql< │ │ │ │ -0002aac0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0002aaf0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, compiler, conne │ │ │ │ -0002ab60: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction):. re │ │ │ │ -0002aba0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn conn │ │ │ │ -0002abc0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.ops< │ │ │ │ -0002ac00: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002ac10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 quote_nam │ │ │ │ -0002ac30: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0002ac50: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.refs< │ │ │ │ -0002aca0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002acb0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , [].. def get_group_by │ │ │ │ -0002ad10: 5f63 6f6c 733c 2f73 7061 6e3e 3c73 7061 _cols(self │ │ │ │ -0002ad50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002ad60: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -0002ad70: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0002ad90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002ada0: 5b3c 2f73 7061 6e3e 3c73 7061 6e20 636c [self]...< │ │ │ │ -0002ade0: 7370 616e 2063 6c61 7373 3d22 6b22 3e63 span class="k">c │ │ │ │ -0002adf0: 6c61 7373 3c2f 7370 616e 3e20 3c73 7061 lass Exp │ │ │ │ -0002ae10: 7265 7373 696f 6e4c 6973 743c 2f73 7061 ressionList(Func):.< │ │ │ │ -0002ae70: 7370 616e 2063 6c61 7373 3d22 7722 3e20 span class="w"> │ │ │ │ -0002ae80: 2020 203c 2f73 7061 6e3e 3c73 7061 6e20 " │ │ │ │ -0002aea0: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"". An exp │ │ │ │ -0002aed0: 7265 7373 696f 6e20 636f 6e74 6169 6e69 ression containi │ │ │ │ -0002aee0: 6e67 206d 756c 7469 706c 6520 6578 7072 ng multiple expr │ │ │ │ -0002aef0: 6573 7369 6f6e 732e 2043 616e 2062 6520 essions. Can be │ │ │ │ -0002af00: 7573 6564 2074 6f20 7072 6f76 6964 6520 used to provide │ │ │ │ -0002af10: 613c 2f73 7061 6e3e 0a3c 7370 616e 2063 a. li │ │ │ │ -0002af30: 7374 206f 6620 6578 7072 6573 7369 6f6e st of expression │ │ │ │ -0002af40: 7320 6173 2061 6e20 6172 6775 6d65 6e74 s as an argument │ │ │ │ -0002af50: 2074 6f20 616e 6f74 6865 7220 6578 7072 to another expr │ │ │ │ -0002af60: 6573 7369 6f6e 2c20 6c69 6b65 2061 2070 ession, like a p │ │ │ │ -0002af70: 6172 7469 7469 6f6e 3c2f 7370 616e 3e0a artition. │ │ │ │ -0002af80: 3c73 7061 6e20 636c 6173 733d 2273 6422 clause.. "& │ │ │ │ -0002afc0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;".. template │ │ │ │ -0002aff0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -0002b010: 203c 7370 616e 2063 6c61 7373 3d22 7332 "< │ │ │ │ -0002b030: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -0002b040: 2528 6578 7072 6573 7369 6f6e 7329 733c %(expressions)s< │ │ │ │ -0002b050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>".. def __init__(se │ │ │ │ -0002b0e0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf, *expres │ │ │ │ -0002b130: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions, **ex │ │ │ │ -0002b180: 7472 613c 2f73 7061 6e3e 3c73 7061 6e20 tra):. if not expressions:. │ │ │ │ -0002b220: 2020 2020 2020 2020 203c 7370 616e 2063 raise ValueErro │ │ │ │ -0002b260: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ -0002b280: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0002b290: 203c 7370 616e 2063 6c61 7373 3d22 7332 "< │ │ │ │ -0002b2b0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -0002b2c0: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s requi │ │ │ │ -0002b2e0: 7265 7320 6174 206c 6561 7374 206f 6e65 res at least one │ │ │ │ -0002b2f0: 2065 7870 7265 7373 696f 6e2e 2671 756f expression.&quo │ │ │ │ -0002b300: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; % self< │ │ │ │ -0002b340: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002b350: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ -0002b370: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _. │ │ │ │ -0002b390: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __name__ │ │ │ │ -0002b3b0: 0a20 2020 2020 2020 2020 2020 203c 7370 . ). s │ │ │ │ -0002b3f0: 7570 6572 3c2f 7370 616e 3e3c 7370 616e uper().__i │ │ │ │ -0002b440: 6e69 745f 5f3c 2f73 7061 6e3e 3c73 7061 nit__(*expr │ │ │ │ -0002b490: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions,< │ │ │ │ -0002b4b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ -0002b4d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002b4e0: 6578 7472 613c 2f73 7061 6e3e 3c73 7061 extra).. def __str__(sel │ │ │ │ -0002b570: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. return │ │ │ │ -0002b5b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.arg_ │ │ │ │ -0002b600: 6a6f 696e 6572 3c2f 7370 616e 3e3c 7370 joiner.join │ │ │ │ -0002b640: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002b650: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (str(arg) fo │ │ │ │ -0002b6d0: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r arg in < │ │ │ │ -0002b710: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0002b720: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.source_expres │ │ │ │ -0002b760: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions).. def as_sqlite< │ │ │ │ -0002b7c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0002b7f0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, compiler, conne │ │ │ │ -0002b860: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction, **ex │ │ │ │ -0002b8b0: 7472 615f 636f 6e74 6578 743c 2f73 7061 tra_context):. │ │ │ │ -0002b8e0: 2020 2020 3c73 7061 6e20 636c 6173 733d # Casting t │ │ │ │ -0002b900: 6f20 6e75 6d65 7269 6320 6973 2075 6e6e o numeric is unn │ │ │ │ -0002b910: 6563 6573 7361 7279 2e3c 2f73 7061 6e3e ecessary. │ │ │ │ -0002b920: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0002b940: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.as_sq │ │ │ │ -0002b990: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l( │ │ │ │ -0002b9b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002b9c0: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0002b9d0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0002b9e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -0002ba00: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, **extra │ │ │ │ -0002ba50: 5f63 6f6e 7465 7874 3c2f 7370 616e 3e3c _context< │ │ │ │ -0002ba60: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002ba70: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -0002ba90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_gro │ │ │ │ -0002bab0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols(self):. │ │ │ │ -0002bb10: 2020 2020 2020 203c 7370 616e 2063 6c61 group_by_ │ │ │ │ -0002bb30: 636f 6c73 3c2f 7370 616e 3e20 3c73 7061 cols = []. │ │ │ │ -0002bb70: 2020 2020 2020 203c 7370 616e 2063 6c61 for partition in s │ │ │ │ -0002bbe0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.get_source_exp │ │ │ │ -0002bc20: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ -0002bc30: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002bc40: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -0002bc50: 2020 2020 2020 3c73 7061 6e20 636c 6173 group_by_c │ │ │ │ -0002bc70: 6f6c 733c 2f73 7061 6e3e 3c73 7061 6e20 ols.extend< │ │ │ │ -0002bcb0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002bcc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 partition │ │ │ │ -0002bce0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002bd00: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ -0002bd10: 6574 5f67 726f 7570 5f62 795f 636f 6c73 et_group_by_cols │ │ │ │ -0002bd20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ()). return │ │ │ │ -0002bd60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c group_by │ │ │ │ -0002bd80: 5f63 6f6c 733c 2f73 7061 6e3e 0a0a 0a3c _cols...< │ │ │ │ -0002bd90: 7370 616e 2063 6c61 7373 3d22 6b22 3e63 span class="k">c │ │ │ │ -0002bda0: 6c61 7373 3c2f 7370 616e 3e20 3c73 7061 lass Ord │ │ │ │ -0002bdc0: 6572 4279 4c69 7374 3c2f 7370 616e 3e3c erByList< │ │ │ │ -0002bdd0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002bde0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 Func):. │ │ │ │ -0002be20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002be30: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -0002be40: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002be50: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -0002be70: 4f52 4445 5220 4259 203c 2f73 7061 6e3e ORDER BY │ │ │ │ -0002be80: 3c73 7061 6e20 636c 6173 733d 2273 6922 %(expressions)s │ │ │ │ -0002bea0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ".. def __init__< │ │ │ │ -0002bf00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -0002bf30: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, *expre │ │ │ │ -0002bf80: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions, **< │ │ │ │ -0002bfc0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0002bfd0: 7874 7261 3c2f 7370 616e 3e3c 7370 616e xtra):. exp │ │ │ │ -0002c010: 7265 7373 696f 6e73 3c2f 7370 616e 3e20 ressions │ │ │ │ -0002c020: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002c030: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = (. (< │ │ │ │ -0002c070: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0002c080: 2020 2020 2020 203c 7370 616e 2063 6c61 OrderBy(F(exp │ │ │ │ -0002c100: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r[ │ │ │ │ -0002c120: 3c73 7061 6e20 636c 6173 733d 226d 6922 1:]), descending< │ │ │ │ -0002c170: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=T │ │ │ │ -0002c1a0: 7275 653c 2f73 7061 6e3e 3c73 7061 6e20 rue). │ │ │ │ -0002c1d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if is │ │ │ │ -0002c200: 696e 7374 616e 6365 3c2f 7370 616e 3e3c instance< │ │ │ │ -0002c210: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002c220: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 expr, str< │ │ │ │ -0002c270: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ -0002c290: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0002c2a0: 616e 643c 2f73 7061 6e3e 203c 7370 616e and expr< │ │ │ │ -0002c2c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>[0 │ │ │ │ -0002c2f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ] │ │ │ │ -0002c310: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002c320: 3d3d 3c2f 7370 616e 3e20 3c73 7061 6e20 == " │ │ │ │ -0002c340: 3b2d 2671 756f 743b 3c2f 7370 616e 3e0a ;-". │ │ │ │ -0002c350: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0002c360: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0002c370: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else expr │ │ │ │ -0002c390: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0002c3a0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ -0002c3c0: 2020 2020 2020 2020 203c 7370 616e 2063 for expr │ │ │ │ -0002c400: 3c73 7061 6e20 636c 6173 733d 226f 7722 in expre │ │ │ │ -0002c430: 7373 696f 6e73 3c2f 7370 616e 3e0a 2020 ssions. │ │ │ │ -0002c440: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ -0002c460: 2020 2020 2020 203c 7370 616e 2063 6c61 super().__init__(*expressions │ │ │ │ -0002c520: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0002c540: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002c550: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **extra).. │ │ │ │ -0002c590: 2020 203c 7370 616e 2063 6c61 7373 3d22 def a │ │ │ │ -0002c5c0: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(self │ │ │ │ -0002c600: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002c610: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , *args, **kw │ │ │ │ -0002c690: 6172 6773 3c2f 7370 616e 3e3c 7370 616e args):. if< │ │ │ │ -0002c6d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> not self< │ │ │ │ -0002c710: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002c720: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 source_ex │ │ │ │ -0002c740: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ -0002c750: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002c760: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0002c770: 2020 2020 203c 7370 616e 2063 6c61 7373 return "" │ │ │ │ -0002c7b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0002c7d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002c7e0: 2829 3c2f 7370 616e 3e0a 2020 2020 2020 (). │ │ │ │ -0002c7f0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0002c810: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ -0002c840: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.as │ │ │ │ -0002c870: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(*args< │ │ │ │ -0002c8c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002c8e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2a span class="o">* │ │ │ │ -0002c8f0: 2a3c 2f73 7061 6e3e 3c73 7061 6e20 636c *kwargs.< │ │ │ │ +000291e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +000291f0: 6172 6765 743c 2f73 7061 6e3e 3c73 7061 arget, self.output_ │ │ │ │ +00029260: 6669 656c 643c 2f73 7061 6e3e 0a20 2020 field. │ │ │ │ +00029270: 2020 2020 203c 7370 616e 2063 6c61 7373 ).. │ │ │ │ +00029290: 2020 203c 7370 616e 2063 6c61 7373 3d22 def g │ │ │ │ +000292c0: 6574 5f67 726f 7570 5f62 795f 636f 6c73 et_group_by_cols │ │ │ │ +000292d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000292f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00029300: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ +00029340: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn [self< │ │ │ │ +00029380: 7370 616e 2063 6c61 7373 3d22 7022 3e5d span class="p">] │ │ │ │ +00029390: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +000293b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_db_ │ │ │ │ +000293d0: 636f 6e76 6572 7465 7273 3c2f 7370 616e converters(self, co │ │ │ │ +00029440: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +00029450: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00029460: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00029470: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ +000294a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000294c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +000294d0: 6172 6765 743c 2f73 7061 6e3e 203c 7370 arget ==< │ │ │ │ +000294f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.outpu │ │ │ │ +00029540: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field:< │ │ │ │ +00029560: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00029570: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00029590: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.output_fiel │ │ │ │ +000295e0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d. │ │ │ │ +00029600: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00029610: 6765 745f 6462 5f63 6f6e 7665 7274 6572 get_db_converter │ │ │ │ +00029620: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s( │ │ │ │ +00029640: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00029650: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection). │ │ │ │ +00029680: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +000296a0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.output_field │ │ │ │ +000296f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00029710: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +00029720: 6574 5f64 625f 636f 6e76 6572 7465 7273 et_db_converters │ │ │ │ +00029730: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (. │ │ │ │ +00029750: 2020 2020 2020 2020 2020 2020 3c73 7061 conn │ │ │ │ +00029770: 6563 7469 6f6e 3c2f 7370 616e 3e0a 2020 ection. │ │ │ │ +00029780: 2020 2020 2020 3c73 7061 6e20 636c 6173 ) < │ │ │ │ +000297a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2b span class="o">+ │ │ │ │ +000297b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.targ │ │ │ │ +00029800: 6574 3c2f 7370 616e 3e3c 7370 616e 2063 et.get_db_converte │ │ │ │ +00029840: 7273 3c2f 7370 616e 3e3c 7370 616e 2063 rs(connection)...cla │ │ │ │ +000298b0: 7373 3c2f 7370 616e 3e20 3c73 7061 6e20 ss Ref(Exp │ │ │ │ +00029900: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression): │ │ │ │ +00029920: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . "" │ │ │ │ +00029960: 2671 756f 743b 3c2f 7370 616e 3e0a 3c73 ". │ │ │ │ +00029980: 2020 2052 6566 6572 656e 6365 2074 6f20 Reference to │ │ │ │ +00029990: 636f 6c75 6d6e 2061 6c69 6173 206f 6620 column alias of │ │ │ │ +000299a0: 7468 6520 7175 6572 792e 2046 6f72 2065 the query. For e │ │ │ │ +000299b0: 7861 6d70 6c65 2c20 5265 6628 2623 3339 xample, Ref(' │ │ │ │ +000299c0: 3b73 756d 5f63 6f73 7426 2333 393b 2920 ;sum_cost') │ │ │ │ +000299d0: 696e 3c2f 7370 616e 3e0a 3c73 7061 6e20 in. q │ │ │ │ +000299f0: 732e 616e 6e6f 7461 7465 2873 756d 5f63 s.annotate(sum_c │ │ │ │ +00029a00: 6f73 743d 5375 6d28 2623 3339 3b63 6f73 ost=Sum('cos │ │ │ │ +00029a10: 7426 2333 393b 2929 2071 7565 7279 2e3c t')) query.< │ │ │ │ +00029a20: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. &quo │ │ │ │ +00029a40: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"".. def __init__< │ │ │ │ +00029a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00029ac0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, refs,< │ │ │ │ +00029b10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> source):. │ │ │ │ +00029b50: 2020 2020 2020 3c73 7061 6e20 636c 6173 super().__init__(). │ │ │ │ +00029be0: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.refs, s │ │ │ │ +00029c60: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.source │ │ │ │ +00029ca0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00029cb0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = refs, sou │ │ │ │ +00029d00: 7263 653c 2f73 7061 6e3e 0a0a 2020 2020 rce.. │ │ │ │ +00029d10: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00029d20: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __re │ │ │ │ +00029d40: 7072 5f5f 3c2f 7370 616e 3e3c 7370 616e pr__(self< │ │ │ │ +00029d80: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00029d90: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00029da0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00029dc0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00029dd0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "{} │ │ │ │ +00029df0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ( │ │ │ │ +00029e10: 3c73 7061 6e20 636c 6173 733d 2273 6922 {}, {}) │ │ │ │ +00029e70: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ".format(self< │ │ │ │ +00029ee0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ +00029f10: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ +00029f20: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00029f30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __name__ │ │ │ │ +00029f50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00029f70: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.refs< │ │ │ │ +00029fc0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00029fd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.sour │ │ │ │ +0002a020: 6365 3c2f 7370 616e 3e3c 7370 616e 2063 ce).. def get_source_ex │ │ │ │ +0002a080: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +0002a090: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002a0a0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +0002a0e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return [sel │ │ │ │ +0002a130: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0002a150: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002a160: 736f 7572 6365 3c2f 7370 616e 3e3c 7370 source].. def set_sourc │ │ │ │ +0002a1c0: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions(sel │ │ │ │ +0002a200: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +0002a220: 203c 7370 616e 2063 6c61 7373 3d22 6e22 exprs):< │ │ │ │ +0002a250: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002a260: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0002a270: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.sourc │ │ │ │ +0002a2c0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e,) = exprs │ │ │ │ +0002a310: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +0002a330: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c resolve │ │ │ │ +0002a350: 5f65 7870 7265 7373 696f 6e3c 2f73 7061 _expression(. │ │ │ │ +0002a380: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +0002a3a0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0002a3b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c query=Non │ │ │ │ +0002a400: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +0002a420: 203c 7370 616e 2063 6c61 7373 3d22 6e22 allow_joins=True │ │ │ │ +0002a470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0002a490: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002a4a0: 7265 7573 653c 2f73 7061 6e3e 3c73 7061 reuse=None │ │ │ │ +0002a4e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002a4f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , summari │ │ │ │ +0002a510: 7a65 3c2f 7370 616e 3e3c 7370 616e 2063 ze=False,< │ │ │ │ +0002a560: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> for_save< │ │ │ │ +0002a580: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=F │ │ │ │ +0002a5b0: 616c 7365 3c2f 7370 616e 3e0a 2020 2020 alse. │ │ │ │ +0002a5c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002a5d0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +0002a5e0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # The sub-exp │ │ │ │ +0002a600: 7265 7373 696f 6e20 6073 6f75 7263 6560 ression `source` │ │ │ │ +0002a610: 2068 6173 2061 6c72 6561 6479 2062 6565 has already bee │ │ │ │ +0002a620: 6e20 7265 736f 6c76 6564 2c20 6173 2074 n resolved, as t │ │ │ │ +0002a630: 6869 7320 6973 3c2f 7370 616e 3e0a 2020 his is. │ │ │ │ +0002a640: 2020 2020 2020 3c73 7061 6e20 636c 6173 # just a │ │ │ │ +0002a660: 7265 6665 7265 6e63 6520 746f 2074 6865 reference to the │ │ │ │ +0002a670: 206e 616d 6520 6f66 2060 736f 7572 6365 name of `source │ │ │ │ +0002a680: 602e 3c2f 7370 616e 3e0a 2020 2020 2020 `.. │ │ │ │ +0002a690: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0002a6b0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.. │ │ │ │ +0002a6d0: 2020 3c73 7061 6e20 636c 6173 733d 226b def ge │ │ │ │ +0002a700: 745f 7265 6673 3c2f 7370 616e 3e3c 7370 t_refs(self):. │ │ │ │ +0002a760: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0002a780: 203c 7370 616e 2063 6c61 7373 3d22 7022 {self.ref │ │ │ │ +0002a7e0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s} │ │ │ │ +0002a800: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +0002a820: 203c 7370 616e 2063 6c61 7373 3d22 6e66 relabeled_clon │ │ │ │ +0002a840: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +0002a860: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, relabels):. │ │ │ │ +0002a8d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 clone = sel │ │ │ │ +0002a920: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0002a940: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002a950: 636f 7079 3c2f 7370 616e 3e3c 7370 616e copy(). clo │ │ │ │ +0002a990: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne.source < │ │ │ │ +0002a9d0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0002a9e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.sour │ │ │ │ +0002aa30: 6365 3c2f 7370 616e 3e3c 7370 616e 2063 ce.relabeled_clone │ │ │ │ +0002aa70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002aa90: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +0002aaa0: 656c 6162 656c 733c 2f73 7061 6e3e 3c73 elabels)< │ │ │ │ +0002aac0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002aad0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +0002aae0: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn clo │ │ │ │ +0002ab00: 6e65 3c2f 7370 616e 3e0a 0a20 2020 203c ne.. < │ │ │ │ +0002ab10: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0002ab20: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef as_sq │ │ │ │ +0002ab40: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l( │ │ │ │ +0002ab60: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, compiler, con │ │ │ │ +0002abe0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection): │ │ │ │ +0002ac00: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002ac10: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0002ac20: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return co │ │ │ │ +0002ac40: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +0002ac50: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002ac60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ops.quote_n │ │ │ │ +0002acb0: 616d 653c 2f73 7061 6e3e 3c73 7061 6e20 ame(self.< │ │ │ │ +0002ad00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>refs), [].. def get_group_ │ │ │ │ +0002ad90: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols(< │ │ │ │ +0002adb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ +0002adf0: 2020 2020 3c73 7061 6e20 636c 6173 733d return [self< │ │ │ │ +0002ae40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>].. │ │ │ │ +0002ae60: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22 .class E │ │ │ │ +0002ae90: 7870 7265 7373 696f 6e4c 6973 743c 2f73 xpressionList(Func │ │ │ │ +0002aed0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +0002aef0: 0a3c 7370 616e 2063 6c61 7373 3d22 7722 . &qu │ │ │ │ +0002af20: 6f74 3b26 7175 6f74 3b26 7175 6f74 3b3c ot;""< │ │ │ │ +0002af30: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. An e │ │ │ │ +0002af50: 7870 7265 7373 696f 6e20 636f 6e74 6169 xpression contai │ │ │ │ +0002af60: 6e69 6e67 206d 756c 7469 706c 6520 6578 ning multiple ex │ │ │ │ +0002af70: 7072 6573 7369 6f6e 732e 2043 616e 2062 pressions. Can b │ │ │ │ +0002af80: 6520 7573 6564 2074 6f20 7072 6f76 6964 e used to provid │ │ │ │ +0002af90: 6520 613c 2f73 7061 6e3e 0a3c 7370 616e e a. │ │ │ │ +0002afb0: 6c69 7374 206f 6620 6578 7072 6573 7369 list of expressi │ │ │ │ +0002afc0: 6f6e 7320 6173 2061 6e20 6172 6775 6d65 ons as an argume │ │ │ │ +0002afd0: 6e74 2074 6f20 616e 6f74 6865 7220 6578 nt to another ex │ │ │ │ +0002afe0: 7072 6573 7369 6f6e 2c20 6c69 6b65 2061 pression, like a │ │ │ │ +0002aff0: 2070 6172 7469 7469 6f6e 3c2f 7370 616e partition. clause.. " │ │ │ │ +0002b040: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"".. templa │ │ │ │ +0002b070: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te = "%(expressions) │ │ │ │ +0002b0d0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s"< │ │ │ │ +0002b0f0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +0002b110: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __init__ │ │ │ │ +0002b130: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002b150: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0002b160: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, *expr │ │ │ │ +0002b1b0: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions,< │ │ │ │ +0002b1d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ +0002b1f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002b200: 6578 7472 613c 2f73 7061 6e3e 3c73 7061 extra):. if │ │ │ │ +0002b240: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c not expressions< │ │ │ │ +0002b280: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:. │ │ │ │ +0002b2a0: 2020 2020 2020 2020 2020 203c 7370 616e raise │ │ │ │ +0002b2c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ValueEr │ │ │ │ +0002b2e0: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20 ror(. │ │ │ │ +0002b310: 2020 203c 7370 616e 2063 6c61 7373 3d22 "%s req │ │ │ │ +0002b360: 7569 7265 7320 6174 206c 6561 7374 206f uires at least o │ │ │ │ +0002b370: 6e65 2065 7870 7265 7373 696f 6e2e 2671 ne expression.&q │ │ │ │ +0002b380: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; % self.__clas │ │ │ │ +0002b3f0: 735f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 s__.__name__. < │ │ │ │ +0002b440: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0002b450: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002b460: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ +0002b490: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ +0002b4c0: 5f69 6e69 745f 5f3c 2f73 7061 6e3e 3c73 _init__(< │ │ │ │ +0002b4e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>*ex │ │ │ │ +0002b510: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +0002b520: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002b530: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , **extra)< │ │ │ │ +0002b580: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +0002b5a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __str__< │ │ │ │ +0002b5c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +0002b5f0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ +0002b630: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ +0002b650: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ar │ │ │ │ +0002b680: 675f 6a6f 696e 6572 3c2f 7370 616e 3e3c g_joiner< │ │ │ │ +0002b690: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002b6a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 join(str(arg │ │ │ │ +0002b720: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ) │ │ │ │ +0002b740: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0002b750: 666f 723c 2f73 7061 6e3e 203c 7370 616e for arg in │ │ │ │ +0002b790: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.source_expr │ │ │ │ +0002b7e0: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions)< │ │ │ │ +0002b800: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +0002b820: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> as_sqlit │ │ │ │ +0002b840: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +0002b860: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, compiler, con │ │ │ │ +0002b8e0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection,< │ │ │ │ +0002b900: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ +0002b920: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002b930: 6578 7472 615f 636f 6e74 6578 743c 2f73 extra_context):. │ │ │ │ +0002b960: 2020 2020 2020 3c73 7061 6e20 636c 6173 # Casting │ │ │ │ +0002b980: 2074 6f20 6e75 6d65 7269 6320 6973 2075 to numeric is u │ │ │ │ +0002b990: 6e6e 6563 6573 7361 7279 2e3c 2f73 7061 nnecessary.. retur │ │ │ │ +0002b9c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self.as_ │ │ │ │ +0002ba10: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql(compiler, connec │ │ │ │ +0002ba80: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion, **ext │ │ │ │ +0002bad0: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context).. < │ │ │ │ +0002bb00: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0002bb10: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef get_g │ │ │ │ +0002bb30: 726f 7570 5f62 795f 636f 6c73 3c2f 7370 roup_by_cols(self │ │ │ │ +0002bb70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +0002bb90: 0a20 2020 2020 2020 203c 7370 616e 2063 . group_b │ │ │ │ +0002bbb0: 795f 636f 6c73 3c2f 7370 616e 3e20 3c73 y_cols =< │ │ │ │ +0002bbd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [] │ │ │ │ +0002bbf0: 0a20 2020 2020 2020 203c 7370 616e 2063 . for partition in │ │ │ │ +0002bc50: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.get_source_e │ │ │ │ +0002bca0: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions():. │ │ │ │ +0002bcd0: 2020 2020 2020 2020 3c73 7061 6e20 636c group_by │ │ │ │ +0002bcf0: 5f63 6f6c 733c 2f73 7061 6e3e 3c73 7061 _cols.extend(partiti │ │ │ │ +0002bd60: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.get_group_by_co │ │ │ │ +0002bda0: 6c73 3c2f 7370 616e 3e3c 7370 616e 2063 ls()). retu │ │ │ │ +0002bde0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn group_ │ │ │ │ +0002be00: 6279 5f63 6f6c 733c 2f73 7061 6e3e 0a0a by_cols.. │ │ │ │ +0002be10: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22 .class O │ │ │ │ +0002be40: 7264 6572 4279 4c69 7374 3c2f 7370 616e rderByList(Func):. │ │ │ │ +0002bea0: 2020 3c73 7061 6e20 636c 6173 733d 226e template = &quo │ │ │ │ +0002bef0: 743b 4f52 4445 5220 4259 203c 2f73 7061 t;ORDER BY %(expressions │ │ │ │ +0002bf20: 2973 3c2f 7370 616e 3e3c 7370 616e 2063 )s" │ │ │ │ +0002bf40: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +0002bf60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __init_ │ │ │ │ +0002bf80: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +0002bfa0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, *exp │ │ │ │ +0002c000: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ +0002c010: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0002c020: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **extra):< │ │ │ │ +0002c070: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002c080: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0002c090: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions = (. │ │ │ │ +0002c0e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002c0f0: 283c 2f73 7061 6e3e 0a20 2020 2020 2020 (. │ │ │ │ +0002c100: 2020 2020 2020 2020 203c 7370 616e 2063 OrderBy │ │ │ │ +0002c120: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002c140: 7370 616e 2063 6c61 7373 3d22 6e22 3e46 span class="n">F │ │ │ │ +0002c150: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002c170: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0002c180: 7870 723c 2f73 7061 6e3e 3c73 7061 6e20 xpr[1:]),< │ │ │ │ +0002c1d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> descendin │ │ │ │ +0002c1f0: 673c 2f73 7061 6e3e 3c73 7061 6e20 636c g= │ │ │ │ +0002c210: 3c73 7061 6e20 636c 6173 733d 226b 6322 True). │ │ │ │ +0002c250: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ +0002c270: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +0002c280: 6973 696e 7374 616e 6365 3c2f 7370 616e isinstance(expr, st │ │ │ │ +0002c2f0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r) │ │ │ │ +0002c310: 203c 7370 616e 2063 6c61 7373 3d22 6f77 and exp │ │ │ │ +0002c340: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r[ │ │ │ │ +0002c360: 3c73 7061 6e20 636c 6173 733d 226d 6922 0] == &qu │ │ │ │ +0002c3c0: 6f74 3b2d 2671 756f 743b 3c2f 7370 616e ot;-". │ │ │ │ +0002c3e0: 2020 3c73 7061 6e20 636c 6173 733d 226b else ex │ │ │ │ +0002c410: 7072 3c2f 7370 616e 3e0a 2020 2020 2020 pr. │ │ │ │ +0002c420: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ +0002c440: 2020 2020 2020 2020 2020 203c 7370 616e for expr in exp │ │ │ │ +0002c4b0: 7265 7373 696f 6e73 3c2f 7370 616e 3e0a ressions. │ │ │ │ +0002c4c0: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ +0002c4e0: 0a20 2020 2020 2020 203c 7370 616e 2063 . super< │ │ │ │ +0002c500: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>()< │ │ │ │ +0002c520: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002c530: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __init__ │ │ │ │ +0002c550: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002c570: 7370 616e 2063 6c61 7373 3d22 6f22 3e2a span class="o">* │ │ │ │ +0002c580: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 expressio │ │ │ │ +0002c5a0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns, **extra │ │ │ │ +0002c5f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0002c610: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0002c630: 3c73 7061 6e20 636c 6173 733d 226e 6622 as_sql(< │ │ │ │ +0002c660: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, *args,< │ │ │ │ +0002c6e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ +0002c700: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002c710: 6b77 6172 6773 3c2f 7370 616e 3e3c 7370 kwargs):< │ │ │ │ +0002c730: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002c740: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ +0002c750: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f not self.source_ │ │ │ │ +0002c7c0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions:. │ │ │ │ +0002c7f0: 2020 2020 2020 203c 7370 616e 2063 6c61 return "&quo │ │ │ │ +0002c830: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;, (). │ │ │ │ +0002c870: 2020 2020 3c73 7061 6e20 636c 6173 733d return super< │ │ │ │ +0002c8b0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0002c8c0: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ +0002c8e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002c8f0: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql().. │ │ │ │ -0002c930: 2020 203c 7370 616e 2063 6c61 7373 3d22 def g │ │ │ │ -0002c960: 6574 5f67 726f 7570 5f62 795f 636f 6c73 et_group_by_cols │ │ │ │ -0002c970: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0002c990: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0002c9a0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. gro │ │ │ │ -0002c9e0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols = []. for │ │ │ │ -0002ca40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c order_by │ │ │ │ -0002ca60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c in self< │ │ │ │ -0002caa0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002cab0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_sourc │ │ │ │ -0002cad0: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions():. │ │ │ │ -0002cb00: 2020 2020 2020 2020 2020 203c 7370 616e group │ │ │ │ -0002cb20: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ -0002cb30: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002cb40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extend(orde │ │ │ │ -0002cb90: 725f 6279 3c2f 7370 616e 3e3c 7370 616e r_by.get_group_by_ │ │ │ │ -0002cbd0: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols()). re │ │ │ │ -0002cc10: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn grou │ │ │ │ -0002cc30: 705f 6279 5f63 6f6c 733c 2f73 7061 6e3e p_by_cols │ │ │ │ -0002cc40: 0a0a 0a3c 6469 7620 636c 6173 733d 2276 ...
    .[d │ │ │ │ -0002ccf0: 6f63 735d 3c2f 613e 0a3c 7370 616e 2063 ocs].@decon │ │ │ │ -0002cd10: 7374 7275 6374 6962 6c65 3c2f 7370 616e structible(path=&qu │ │ │ │ -0002cd80: 6f74 3b64 6a61 6e67 6f2e 6462 2e6d 6f64 ot;django.db.mod │ │ │ │ -0002cd90: 656c 732e 4578 7072 6573 7369 6f6e 5772 els.ExpressionWr │ │ │ │ -0002cda0: 6170 7065 7226 7175 6f74 3b3c 2f73 7061 apper").class │ │ │ │ -0002cde0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Express │ │ │ │ -0002ce00: 696f 6e57 7261 7070 6572 3c2f 7370 616e ionWrapper(SQLiteN │ │ │ │ -0002ce40: 756d 6572 6963 4d69 7869 6e3c 2f73 7061 umericMixin, Expre │ │ │ │ -0002ce80: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. ""&q │ │ │ │ -0002cee0: 756f 743b 3c2f 7370 616e 3e0a 3c73 7061 uot;. │ │ │ │ -0002cf00: 2041 6e20 6578 7072 6573 7369 6f6e 2074 An expression t │ │ │ │ -0002cf10: 6861 7420 6361 6e20 7772 6170 2061 6e6f hat can wrap ano │ │ │ │ -0002cf20: 7468 6572 2065 7870 7265 7373 696f 6e20 ther expression │ │ │ │ -0002cf30: 736f 2074 6861 7420 6974 2063 616e 2070 so that it can p │ │ │ │ -0002cf40: 726f 7669 6465 3c2f 7370 616e 3e0a 3c73 rovide. │ │ │ │ -0002cf60: 2020 2065 7874 7261 2063 6f6e 7465 7874 extra context │ │ │ │ -0002cf70: 2074 6f20 7468 6520 696e 6e65 7220 6578 to the inner ex │ │ │ │ -0002cf80: 7072 6573 7369 6f6e 2c20 7375 6368 2061 pression, such a │ │ │ │ -0002cf90: 7320 7468 6520 6f75 7470 7574 5f66 6965 s the output_fie │ │ │ │ -0002cfa0: 6c64 2e3c 2f73 7061 6e3e 0a3c 7370 616e ld.. │ │ │ │ -0002cfc0: 2671 756f 743b 2671 756f 743b 2671 756f ""&quo │ │ │ │ -0002cfd0: 743b 3c2f 7370 616e 3e0a 0a20 2020 203c t;.. < │ │ │ │ -0002cfe0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0002cff0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __ini │ │ │ │ -0002d010: 745f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 t__(self,< │ │ │ │ -0002d060: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> expressio │ │ │ │ -0002d080: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ -0002d0a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 output_field):. │ │ │ │ -0002d0e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 super().__init__(outp │ │ │ │ -0002d180: 7574 5f66 6965 6c64 3c2f 7370 616e 3e3c ut_field< │ │ │ │ -0002d190: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0002d1a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ -0002d1c0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld). self │ │ │ │ -0002d200: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002d220: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -0002d230: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ -0002d240: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = expres │ │ │ │ -0002d270: 7369 6f6e 3c2f 7370 616e 3e0a 0a20 2020 sion.. │ │ │ │ -0002d280: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def set │ │ │ │ -0002d2b0: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ -0002d2c0: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(self,< │ │ │ │ -0002d310: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> exprs):. │ │ │ │ -0002d350: 2020 2020 203c 7370 616e 2063 6c61 7373 self.express │ │ │ │ -0002d3a0: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion = exprs │ │ │ │ -0002d3e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002d3f0: 5b3c 2f73 7061 6e3e 3c73 7061 6e20 636c [0].. < │ │ │ │ -0002d430: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0002d440: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef get_s │ │ │ │ -0002d460: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ -0002d470: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s( │ │ │ │ -0002d490: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. re │ │ │ │ -0002d4e0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn [self │ │ │ │ -0002d520: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002d530: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .expressi │ │ │ │ -0002d550: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on].. def get_group_by_ │ │ │ │ -0002d5b0: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols(self< │ │ │ │ -0002d5f0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002d600: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0002d610: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if isin │ │ │ │ -0002d640: 7374 616e 6365 3c2f 7370 616e 3e3c 7370 stance(self.express │ │ │ │ -0002d6b0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion, Expression):. │ │ │ │ -0002d710: 2020 2020 2020 2020 2020 3c73 7061 6e20 expres │ │ │ │ -0002d730: 7369 6f6e 3c2f 7370 616e 3e20 3c73 7061 sion = self.express │ │ │ │ -0002d7a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.copy()< │ │ │ │ -0002d7f0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0002d800: 2020 203c 7370 616e 2063 6c61 7373 3d22 expression.outp │ │ │ │ -0002d850: 7574 5f66 6965 6c64 3c2f 7370 616e 3e20 ut_field │ │ │ │ -0002d860: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0002d870: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.out │ │ │ │ -0002d8c0: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -0002d8d0: 0a20 2020 2020 2020 2020 2020 203c 7370 . ret │ │ │ │ -0002d8f0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn expre │ │ │ │ -0002d910: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion.get_group_by │ │ │ │ -0002d950: 5f63 6f6c 733c 2f73 7061 6e3e 3c73 7061 _cols(). # │ │ │ │ -0002d990: 2046 6f72 206e 6f6e 2d65 7870 7265 7373 For non-express │ │ │ │ -0002d9a0: 696f 6e73 2065 2e67 2e20 616e 2053 514c ions e.g. an SQL │ │ │ │ -0002d9b0: 2057 4845 5245 2063 6c61 7573 652c 2074 WHERE clause, t │ │ │ │ -0002d9c0: 6865 2065 6e74 6972 653c 2f73 7061 6e3e he entire │ │ │ │ -0002d9d0: 0a20 2020 2020 2020 203c 7370 616e 2063 . # `exp │ │ │ │ -0002d9f0: 7265 7373 696f 6e60 206d 7573 7420 6265 ression` must be │ │ │ │ -0002da00: 2069 6e63 6c75 6465 6420 696e 2074 6865 included in the │ │ │ │ -0002da10: 2047 524f 5550 2042 5920 636c 6175 7365 GROUP BY clause │ │ │ │ -0002da20: 2e3c 2f73 7061 6e3e 0a20 2020 2020 2020 .. │ │ │ │ -0002da30: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0002da50: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0002da60: 7375 7065 723c 2f73 7061 6e3e 3c73 7061 super().get │ │ │ │ -0002dab0: 5f67 726f 7570 5f62 795f 636f 6c73 3c2f _group_by_cols().. │ │ │ │ -0002dae0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0002db00: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -0002db10: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(self, compil │ │ │ │ -0002db80: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection):. │ │ │ │ -0002dbe0: 2020 2020 203c 7370 616e 2063 6c61 7373 return compiler.compil │ │ │ │ -0002dc50: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0002dc70: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.expression).. │ │ │ │ -0002dce0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ -0002dd10: 5f72 6570 725f 5f3c 2f73 7061 6e3e 3c73 _repr__(< │ │ │ │ -0002dd30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ -0002dd70: 2020 2020 3c73 7061 6e20 636c 6173 733d return " │ │ │ │ -0002ddb0: 3c73 7061 6e20 636c 6173 733d 2273 6922 {}({})& │ │ │ │ -0002de10: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;.format(self.__ │ │ │ │ -0002deb0: 636c 6173 735f 5f3c 2f73 7061 6e3e 3c73 class__.< │ │ │ │ -0002ded0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__name__< │ │ │ │ -0002def0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002df10: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0002df20: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.expression)....class NegatedExpre │ │ │ │ -0002dfc0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion(ExpressionWr │ │ │ │ -0002e000: 6170 7065 723c 2f73 7061 6e3e 3c73 7061 apper):. ""&q │ │ │ │ -0002e060: 756f 743b 5468 6520 6c6f 6769 6361 6c20 uot;The logical │ │ │ │ -0002e070: 6e65 6761 7469 6f6e 206f 6620 6120 636f negation of a co │ │ │ │ -0002e080: 6e64 6974 696f 6e61 6c20 6578 7072 6573 nditional expres │ │ │ │ -0002e090: 7369 6f6e 2e26 7175 6f74 3b26 7175 6f74 sion."" │ │ │ │ -0002e0a0: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 0a0a ;".. │ │ │ │ -0002e0b0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0002e0d0: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -0002e0e0: 5f5f 696e 6974 5f5f 3c2f 7370 616e 3e3c __init__< │ │ │ │ -0002e0f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002e100: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, expr │ │ │ │ -0002e150: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession):< │ │ │ │ -0002e170: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0002e180: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0002e190: 7375 7065 723c 2f73 7061 6e3e 3c73 7061 super().__ │ │ │ │ -0002e1e0: 696e 6974 5f5f 3c2f 7370 616e 3e3c 7370 init__(expression< │ │ │ │ +0002c920: 3d22 6f22 3e2a 3c2f 7370 616e 3e3c 7370 ="o">*arg │ │ │ │ +0002c940: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ +0002c960: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **kwargs │ │ │ │ +0002c990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0002c9b0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +0002c9d0: 3c73 7061 6e20 636c 6173 733d 226e 6622 get_group_by_co │ │ │ │ +0002c9f0: 6c73 3c2f 7370 616e 3e3c 7370 616e 2063 ls(self):< │ │ │ │ +0002ca40: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002ca50: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +0002ca60: 726f 7570 5f62 795f 636f 6c73 3c2f 7370 roup_by_cols = []< │ │ │ │ +0002caa0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002cab0: 7370 616e 2063 6c61 7373 3d22 6b22 3e66 span class="k">f │ │ │ │ +0002cac0: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or order_ │ │ │ │ +0002cae0: 6279 3c2f 7370 616e 3e20 3c73 7061 6e20 by in self.get_sou │ │ │ │ +0002cb50: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ +0002cb60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(): │ │ │ │ +0002cb80: 0a20 2020 2020 2020 2020 2020 203c 7370 . gro │ │ │ │ +0002cba0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols.extend< │ │ │ │ +0002cbe0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(or │ │ │ │ +0002cc10: 6465 725f 6279 3c2f 7370 616e 3e3c 7370 der_by.get_group_b │ │ │ │ +0002cc50: 795f 636f 6c73 3c2f 7370 616e 3e3c 7370 y_cols()) │ │ │ │ +0002cc70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002cc80: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0002cc90: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return gr │ │ │ │ +0002ccb0: 6f75 705f 6279 5f63 6f6c 733c 2f73 7061 oup_by_cols...
    . │ │ │ │ +0002cd70: 5b64 6f63 756d 656e 7461 7469 655d 3c2f [documentatie].@deconstruct │ │ │ │ +0002cda0: 6962 6c65 3c2f 7370 616e 3e3c 7370 616e ible(path=< │ │ │ │ +0002cdf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"dja │ │ │ │ +0002ce10: 6e67 6f2e 6462 2e6d 6f64 656c 732e 4578 ngo.db.models.Ex │ │ │ │ +0002ce20: 7072 6573 7369 6f6e 5772 6170 7065 7226 pressionWrapper& │ │ │ │ +0002ce30: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;).class ExpressionWra │ │ │ │ +0002ce90: 7070 6572 3c2f 7370 616e 3e3c 7370 616e pper(SQLiteNumeric │ │ │ │ +0002ced0: 4d69 7869 6e3c 2f73 7061 6e3e 3c73 7061 Mixin, Expression< │ │ │ │ +0002cf10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0002cf30: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ +0002cf40: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +0002cf60: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". An ex │ │ │ │ +0002cf90: 7072 6573 7369 6f6e 2074 6861 7420 6361 pression that ca │ │ │ │ +0002cfa0: 6e20 7772 6170 2061 6e6f 7468 6572 2065 n wrap another e │ │ │ │ +0002cfb0: 7870 7265 7373 696f 6e20 736f 2074 6861 xpression so tha │ │ │ │ +0002cfc0: 7420 6974 2063 616e 2070 726f 7669 6465 t it can provide │ │ │ │ +0002cfd0: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . ext │ │ │ │ +0002cff0: 7261 2063 6f6e 7465 7874 2074 6f20 7468 ra context to th │ │ │ │ +0002d000: 6520 696e 6e65 7220 6578 7072 6573 7369 e inner expressi │ │ │ │ +0002d010: 6f6e 2c20 7375 6368 2061 7320 7468 6520 on, such as the │ │ │ │ +0002d020: 6f75 7470 7574 5f66 6965 6c64 2e3c 2f73 output_field.. " │ │ │ │ +0002d050: 2671 756f 743b 2671 756f 743b 3c2f 7370 "".. def __init__(sel │ │ │ │ +0002d0d0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +0002d0f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 expression, outpu │ │ │ │ +0002d140: 745f 6669 656c 643c 2f73 7061 6e3e 3c73 t_field): │ │ │ │ +0002d160: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002d170: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ +0002d1a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ +0002d1d0: 5f69 6e69 745f 5f3c 2f73 7061 6e3e 3c73 _init__(< │ │ │ │ +0002d1f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ +0002d210: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld=output_field). │ │ │ │ +0002d270: 2020 2020 203c 7370 616e 2063 6c61 7373 self.express │ │ │ │ +0002d2c0: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion = expression.. def set_sourc │ │ │ │ +0002d340: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions(sel │ │ │ │ +0002d380: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +0002d3a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 exprs):< │ │ │ │ +0002d3d0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002d3e0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0002d3f0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.expression = ex │ │ │ │ +0002d460: 7072 733c 2f73 7061 6e3e 3c73 7061 6e20 prs[0].. def get_source_ │ │ │ │ +0002d4f0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(self< │ │ │ │ +0002d530: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0002d550: 2020 2020 2020 2020 3c73 7061 6e20 636c return [s │ │ │ │ +0002d5a0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.expression].. │ │ │ │ +0002d600: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ +0002d630: 5f67 726f 7570 5f62 795f 636f 6c73 3c2f _group_by_cols(se │ │ │ │ +0002d670: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. if isinstance │ │ │ │ +0002d6d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002d6f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0002d700: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.expression, Exp │ │ │ │ +0002d770: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression): │ │ │ │ +0002d790: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002d7a0: 2020 2020 3c73 7061 6e20 636c 6173 733d expression = < │ │ │ │ +0002d7e0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0002d7f0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.expression.copy │ │ │ │ +0002d860: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +0002d880: 0a20 2020 2020 2020 2020 2020 203c 7370 . exp │ │ │ │ +0002d8a0: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression.< │ │ │ │ +0002d8c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ +0002d8e0: 6c64 3c2f 7370 616e 3e20 3c73 7061 6e20 ld = self< │ │ │ │ +0002d920: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002d930: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ +0002d950: 656c 643c 2f73 7061 6e3e 0a20 2020 2020 eld. │ │ │ │ +0002d960: 2020 2020 2020 203c 7370 616e 2063 6c61 return expression< │ │ │ │ +0002d9a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ge │ │ │ │ +0002d9d0: 745f 6772 6f75 705f 6279 5f63 6f6c 733c t_group_by_cols< │ │ │ │ +0002d9e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(). │ │ │ │ +0002da00: 2020 2020 2020 2020 3c73 7061 6e20 636c # For n │ │ │ │ +0002da20: 6f6e 2d65 7870 7265 7373 696f 6e73 2065 on-expressions e │ │ │ │ +0002da30: 2e67 2e20 616e 2053 514c 2057 4845 5245 .g. an SQL WHERE │ │ │ │ +0002da40: 2063 6c61 7573 652c 2074 6865 2065 6e74 clause, the ent │ │ │ │ +0002da50: 6972 653c 2f73 7061 6e3e 0a20 2020 2020 ire. │ │ │ │ +0002da60: 2020 203c 7370 616e 2063 6c61 7373 3d22 # `expressio │ │ │ │ +0002da80: 6e60 206d 7573 7420 6265 2069 6e63 6c75 n` must be inclu │ │ │ │ +0002da90: 6465 6420 696e 2074 6865 2047 524f 5550 ded in the GROUP │ │ │ │ +0002daa0: 2042 5920 636c 6175 7365 2e3c 2f73 7061 BY clause.. retur │ │ │ │ +0002dad0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n super< │ │ │ │ +0002daf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>()< │ │ │ │ +0002db10: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002db20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_group │ │ │ │ +0002db40: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ +0002db50: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0002db60: 293c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ).. de │ │ │ │ +0002db80: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f as_sql │ │ │ │ +0002dba0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002dbc0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0002dbd0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, compiler, conn │ │ │ │ +0002dc40: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection):< │ │ │ │ +0002dc60: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002dc70: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +0002dc80: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn com │ │ │ │ +0002dca0: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler.compile(self< │ │ │ │ +0002dd10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ex │ │ │ │ +0002dd40: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0002dd50: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0002dd60: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +0002dd80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __repr_ │ │ │ │ +0002dda0: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +0002ddc0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. re │ │ │ │ +0002de10: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn &qu │ │ │ │ +0002de30: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;{}({} │ │ │ │ +0002de80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )"< │ │ │ │ +0002dea0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.fo │ │ │ │ +0002ded0: 726d 6174 3c2f 7370 616e 3e3c 7370 616e rmat(self< │ │ │ │ +0002df10: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002df20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ +0002df40: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _. │ │ │ │ +0002df60: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __name__ │ │ │ │ +0002df80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002df90: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.exp │ │ │ │ +0002dfe0: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression)< │ │ │ │ +0002e000: 2f73 7061 6e3e 3c2f 6469 763e 0a0a 0a0a /span>
    .... │ │ │ │ +0002e010: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0002e020: 636c 6173 733c 2f73 7061 6e3e 203c 7370 class Ne │ │ │ │ +0002e040: 6761 7465 6445 7870 7265 7373 696f 6e3c gatedExpression< │ │ │ │ +0002e050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(Ex │ │ │ │ +0002e080: 7072 6573 7369 6f6e 5772 6170 7065 723c pressionWrapper< │ │ │ │ +0002e090: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0002e0b0: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ +0002e0c0: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +0002e0e0: 743b 2671 756f 743b 2671 756f 743b 5468 t;""Th │ │ │ │ +0002e0f0: 6520 6c6f 6769 6361 6c20 6e65 6761 7469 e logical negati │ │ │ │ +0002e100: 6f6e 206f 6620 6120 636f 6e64 6974 696f on of a conditio │ │ │ │ +0002e110: 6e61 6c20 6578 7072 6573 7369 6f6e 2e26 nal expression.& │ │ │ │ +0002e120: 7175 6f74 3b26 7175 6f74 3b26 7175 6f74 quot;"" │ │ │ │ +0002e130: 3b3c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ;.. de │ │ │ │ +0002e150: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f __init │ │ │ │ +0002e170: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self, expression │ │ │ │ +0002e1e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +0002e200: 0a20 2020 2020 2020 203c 7370 616e 2063 . super< │ │ │ │ 0002e220: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002e240: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0002e250: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field
    =fields │ │ │ │ -0002e290: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002e2b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e42 span class="n">B │ │ │ │ -0002e2c0: 6f6f 6c65 616e 4669 656c 643c 2f73 7061 ooleanField()).. │ │ │ │ -0002e2f0: 2020 3c73 7061 6e20 636c 6173 733d 226b def __ │ │ │ │ -0002e320: 696e 7665 7274 5f5f 3c2f 7370 616e 3e3c invert__< │ │ │ │ -0002e330: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002e340: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -0002e380: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ -0002e3c0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0002e3d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 expressio │ │ │ │ -0002e3f0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ -0002e410: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002e420: 636f 7079 3c2f 7370 616e 3e3c 7370 616e copy().. def as_sql(self │ │ │ │ -0002e4b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0002e4d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002e4e0: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -0002e4f0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0002e500: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -0002e520: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on):. try:. │ │ │ │ -0002e580: 2020 2020 2020 2020 2020 3c73 7061 6e20 sql, par │ │ │ │ -0002e5d0: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = super().as_sql< │ │ │ │ -0002e660: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002e670: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compiler< │ │ │ │ -0002e690: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002e6b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0002e6c0: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -0002e6d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002e6e0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -0002e6f0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 except < │ │ │ │ -0002e710: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ -0002e720: 6d70 7479 5265 7375 6c74 5365 743c 2f73 mptyResultSet:. │ │ │ │ -0002e750: 2020 2020 2020 2020 203c 7370 616e 2063 feature │ │ │ │ -0002e770: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = compiler.connect │ │ │ │ -0002e7e0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.features. if │ │ │ │ -0002e840: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c not features.suppo │ │ │ │ -0002e8b0: 7274 735f 626f 6f6c 6561 6e5f 6578 7072 rts_boolean_expr │ │ │ │ -0002e8c0: 5f69 6e5f 7365 6c65 6374 5f63 6c61 7573 _in_select_claus │ │ │ │ -0002e8d0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e: │ │ │ │ -0002e8f0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0002e900: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0002e920: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -0002e930: 2671 756f 743b 313d 3126 7175 6f74 3b3c "1=1"< │ │ │ │ -0002e940: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002e960: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002e970: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -0002e980: 2020 2020 203c 7370 616e 2063 6c61 7373 return compiler.compil │ │ │ │ -0002e9f0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0002ea10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002ea20: 5661 6c75 653c 2f73 7061 6e3e 3c73 7061 Value(True │ │ │ │ -0002ea60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002ea70: 2929 3c2f 7370 616e 3e0a 2020 2020 2020 )). │ │ │ │ -0002ea80: 2020 3c73 7061 6e20 636c 6173 733d 226e ops = compiler.con │ │ │ │ -0002eb00: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -0002eb20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ops │ │ │ │ -0002eb40: 0a20 2020 2020 2020 203c 7370 616e 2063 . # Some │ │ │ │ -0002eb60: 2064 6174 6162 6173 6520 6261 636b 656e database backen │ │ │ │ -0002eb70: 6473 2028 652e 672e 204f 7261 636c 6529 ds (e.g. Oracle) │ │ │ │ -0002eb80: 2064 6f6e 2623 3339 3b74 2061 6c6c 6f77 don't allow │ │ │ │ -0002eb90: 2045 5849 5354 5328 2920 616e 6420 6669 EXISTS() and fi │ │ │ │ -0002eba0: 6c74 6572 733c 2f73 7061 6e3e 0a20 2020 lters. │ │ │ │ -0002ebb0: 2020 2020 203c 7370 616e 2063 6c61 7373 # to be co │ │ │ │ -0002ebd0: 6d70 6172 6564 2074 6f20 616e 6f74 6865 mpared to anothe │ │ │ │ -0002ebe0: 7220 6578 7072 6573 7369 6f6e 2075 6e6c r expression unl │ │ │ │ -0002ebf0: 6573 7320 7468 6579 2623 3339 3b72 6520 ess they're │ │ │ │ -0002ec00: 7772 6170 7065 6420 696e 2061 2043 4153 wrapped in a CAS │ │ │ │ -0002ec10: 453c 2f73 7061 6e3e 0a20 2020 2020 2020 E. │ │ │ │ -0002ec20: 203c 7370 616e 2063 6c61 7373 3d22 6331 # WHEN. │ │ │ │ -0002ec40: 0a20 2020 2020 2020 203c 7370 616e 2063 . if not < │ │ │ │ -0002ec80: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0002ec90: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps.conditional_exp │ │ │ │ -0002ecd0: 7265 7373 696f 6e5f 7375 7070 6f72 7465 ression_supporte │ │ │ │ -0002ece0: 645f 696e 5f77 6865 7265 5f63 6c61 7573 d_in_where_claus │ │ │ │ -0002ecf0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -0002ed10: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.expression):. │ │ │ │ -0002ed80: 2020 2020 2020 2020 2020 203c 7370 616e retur │ │ │ │ -0002eda0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n f"CASE WH │ │ │ │ -0002ede0: 454e 203c 2f73 7061 6e3e 3c73 7061 6e20 EN {sql}< │ │ │ │ -0002ee30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span> = 0 THEN │ │ │ │ -0002ee50: 2031 2045 4c53 4520 3020 454e 4426 7175 1 ELSE 0 END&qu │ │ │ │ -0002ee60: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;, params │ │ │ │ -0002eea0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0002eec0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> f │ │ │ │ -0002eee0: 3c73 7061 6e20 636c 6173 733d 2273 3222 "NOT {sql}& │ │ │ │ -0002ef60: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;, params.. def resolve_expr │ │ │ │ -0002efe0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(. s │ │ │ │ -0002f020: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, query< │ │ │ │ -0002f060: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0002e230: 733d 2270 223e 2829 3c2f 7370 616e 3e3c s="p">()< │ │ │ │ +0002e240: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002e250: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __init__ │ │ │ │ +0002e270: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0002e290: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0002e2a0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +0002e2b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002e2c0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , output_ │ │ │ │ +0002e2e0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field=fields.Boolean │ │ │ │ +0002e350: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field())< │ │ │ │ +0002e370: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +0002e390: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __invert │ │ │ │ +0002e3b0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self):< │ │ │ │ +0002e400: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002e410: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +0002e420: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn se │ │ │ │ +0002e440: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.expression.copy().. │ │ │ │ +0002e4d0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +0002e4f0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +0002e500: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(self, compil │ │ │ │ +0002e570: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection):. │ │ │ │ +0002e5d0: 2020 2020 203c 7370 616e 2063 6c61 7373 try< │ │ │ │ +0002e5f0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +0002e600: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002e610: 2020 2020 3c73 7061 6e20 636c 6173 733d sql,< │ │ │ │ +0002e640: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> params = s │ │ │ │ +0002e690: 7570 6572 3c2f 7370 616e 3e3c 7370 616e uper().as_s │ │ │ │ +0002e6e0: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql(compiler │ │ │ │ +0002e720: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002e730: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , connect │ │ │ │ +0002e750: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion). excep │ │ │ │ +0002e790: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t EmptyRe │ │ │ │ +0002e7b0: 7375 6c74 5365 743c 2f73 7061 6e3e 3c73 sultSet:< │ │ │ │ +0002e7d0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0002e7e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 features = comp │ │ │ │ +0002e830: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.connection.feat │ │ │ │ +0002e8a0: 7572 6573 3c2f 7370 616e 3e0a 2020 2020 ures. │ │ │ │ +0002e8b0: 2020 2020 2020 2020 3c73 7061 6e20 636c if not fe │ │ │ │ +0002e900: 6174 7572 6573 3c2f 7370 616e 3e3c 7370 atures.supports_bo │ │ │ │ +0002e940: 6f6c 6561 6e5f 6578 7072 5f69 6e5f 7365 olean_expr_in_se │ │ │ │ +0002e950: 6c65 6374 5f63 6c61 7573 653c 2f73 7061 lect_clause:. │ │ │ │ +0002e980: 2020 2020 2020 2020 2020 203c 7370 616e retur │ │ │ │ +0002e9a0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n " │ │ │ │ +0002e9c0: 313d 3126 7175 6f74 3b3c 2f73 7061 6e3e 1=1" │ │ │ │ +0002e9d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002e9e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , (). < │ │ │ │ +0002ea10: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +0002ea20: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn com │ │ │ │ +0002ea40: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler.compile(Value< │ │ │ │ +0002eab0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(T │ │ │ │ +0002eae0: 7275 653c 2f73 7061 6e3e 3c73 7061 6e20 rue)). ops< │ │ │ │ +0002eb20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0002eb40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002eb50: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ +0002eb60: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002eb70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 connectio │ │ │ │ +0002eb90: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ +0002ebb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002ebc0: 6f70 733c 2f73 7061 6e3e 0a20 2020 2020 ops. │ │ │ │ +0002ebd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 # Some datab │ │ │ │ +0002ebf0: 6173 6520 6261 636b 656e 6473 2028 652e ase backends (e. │ │ │ │ +0002ec00: 672e 204f 7261 636c 6529 2064 6f6e 2623 g. Oracle) don&# │ │ │ │ +0002ec10: 3339 3b74 2061 6c6c 6f77 2045 5849 5354 39;t allow EXIST │ │ │ │ +0002ec20: 5328 2920 616e 6420 6669 6c74 6572 733c S() and filters< │ │ │ │ +0002ec30: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0002ec40: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ +0002ec50: 2320 746f 2062 6520 636f 6d70 6172 6564 # to be compared │ │ │ │ +0002ec60: 2074 6f20 616e 6f74 6865 7220 6578 7072 to another expr │ │ │ │ +0002ec70: 6573 7369 6f6e 2075 6e6c 6573 7320 7468 ession unless th │ │ │ │ +0002ec80: 6579 2623 3339 3b72 6520 7772 6170 7065 ey're wrappe │ │ │ │ +0002ec90: 6420 696e 2061 2043 4153 453c 2f73 7061 d in a CASE. # WH │ │ │ │ +0002ecc0: 454e 2e3c 2f73 7061 6e3e 0a20 2020 2020 EN.. │ │ │ │ +0002ecd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if no │ │ │ │ +0002ed00: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t ops.condi │ │ │ │ +0002ed50: 7469 6f6e 616c 5f65 7870 7265 7373 696f tional_expressio │ │ │ │ +0002ed60: 6e5f 7375 7070 6f72 7465 645f 696e 5f77 n_supported_in_w │ │ │ │ +0002ed70: 6865 7265 5f63 6c61 7573 653c 2f73 7061 here_clause(self< │ │ │ │ +0002edb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ex │ │ │ │ +0002ede0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0002edf0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0002ee00: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +0002ee10: 2020 2020 203c 7370 616e 2063 6c61 7373 return f&qu │ │ │ │ +0002ee60: 6f74 3b43 4153 4520 5748 454e 203c 2f73 ot;CASE WHEN {sql │ │ │ │ +0002eea0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 } │ │ │ │ +0002eec0: 3c73 7061 6e20 636c 6173 733d 2273 3222 = 0 THEN 1 ELS │ │ │ │ +0002eee0: 4520 3020 454e 4426 7175 6f74 3b3c 2f73 E 0 END", par │ │ │ │ +0002ef20: 616d 733c 2f73 7061 6e3e 0a20 2020 2020 ams. │ │ │ │ +0002ef30: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0002ef50: 203c 7370 616e 2063 6c61 7373 3d22 7361 f" │ │ │ │ +0002ef80: 3b4e 4f54 203c 2f73 7061 6e3e 3c73 7061 ;NOT {sql< │ │ │ │ +0002efc0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +0002efd0: 7d3c 2f73 7061 6e3e 3c73 7061 6e20 636c }"< │ │ │ │ +0002eff0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0002f010: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ +0002f020: 6172 616d 733c 2f73 7061 6e3e 0a0a 2020 arams.. │ │ │ │ +0002f030: 2020 3c73 7061 6e20 636c 6173 733d 226b def re │ │ │ │ +0002f060: 736f 6c76 655f 6578 7072 6573 7369 6f6e solve_expression │ │ │ │ 0002f070: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None, allo │ │ │ │ -0002f0c0: 775f 6a6f 696e 733c 2f73 7061 6e3e 3c73 w_joins=< │ │ │ │ -0002f0e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>True, reuse │ │ │ │ -0002f130: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ -0002f150: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0002f160: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None, summarize=Fal │ │ │ │ -0002f1d0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, for_save=False< │ │ │ │ -0002f240: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. ):. res │ │ │ │ -0002f280: 6f6c 7665 643c 2f73 7061 6e3e 203c 7370 olved = super().resolve_expr │ │ │ │ -0002f310: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(. │ │ │ │ -0002f340: 2020 3c73 7061 6e20 636c 6173 733d 226e query,< │ │ │ │ -0002f370: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> allow_joi │ │ │ │ -0002f390: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns, reuse,< │ │ │ │ -0002f3e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ -0002f400: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0002f420: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002f430: 666f 725f 7361 7665 3c2f 7370 616e 3e0a for_save. │ │ │ │ -0002f440: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ -0002f460: 0a20 2020 2020 2020 203c 7370 616e 2063 . if not < │ │ │ │ -0002f4a0: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0002f4b0: 6765 7461 7474 723c 2f73 7061 6e3e 3c73 getattr(< │ │ │ │ -0002f4d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>resolved.exp │ │ │ │ -0002f520: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression,< │ │ │ │ -0002f540: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "co │ │ │ │ -0002f560: 6e64 6974 696f 6e61 6c26 7175 6f74 3b3c nditional"< │ │ │ │ -0002f570: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002f590: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0002f5a0: 4661 6c73 653c 2f73 7061 6e3e 3c73 7061 False):. │ │ │ │ -0002f5d0: 2020 3c73 7061 6e20 636c 6173 733d 226b raise < │ │ │ │ -0002f5f0: 7370 616e 2063 6c61 7373 3d22 6e65 223e span class="ne"> │ │ │ │ -0002f600: 5479 7065 4572 726f 723c 2f73 7061 6e3e TypeError │ │ │ │ -0002f610: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002f620: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c ("C │ │ │ │ -0002f640: 616e 6e6f 7420 6e65 6761 7465 206e 6f6e annot negate non │ │ │ │ -0002f650: 2d63 6f6e 6469 7469 6f6e 616c 2065 7870 -conditional exp │ │ │ │ -0002f660: 7265 7373 696f 6e73 2e26 7175 6f74 3b3c ressions."< │ │ │ │ -0002f670: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -0002f690: 2020 2020 2020 203c 7370 616e 2063 6c61 return resolved.. def select_for │ │ │ │ -0002f710: 6d61 743c 2f73 7061 6e3e 3c73 7061 6e20 mat(self,< │ │ │ │ -0002f760: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> compiler< │ │ │ │ -0002f780: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -0002f7a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -0002f7b0: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql, params< │ │ │ │ -0002f7f0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002f800: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -0002f810: 203c 7370 616e 2063 6c61 7373 3d22 6331 # Wrap boolean │ │ │ │ -0002f830: 2065 7870 7265 7373 696f 6e73 2077 6974 expressions wit │ │ │ │ -0002f840: 6820 6120 4341 5345 2057 4845 4e20 6578 h a CASE WHEN ex │ │ │ │ -0002f850: 7072 6573 7369 6f6e 2069 6620 6120 6461 pression if a da │ │ │ │ -0002f860: 7461 6261 7365 3c2f 7370 616e 3e0a 2020 tabase. │ │ │ │ -0002f870: 2020 2020 2020 3c73 7061 6e20 636c 6173 # backend │ │ │ │ -0002f890: 2028 652e 672e 204f 7261 636c 6529 2064 (e.g. Oracle) d │ │ │ │ -0002f8a0: 6f65 736e 2623 3339 3b74 2073 7570 706f oesn't suppo │ │ │ │ -0002f8b0: 7274 2062 6f6f 6c65 616e 2065 7870 7265 rt boolean expre │ │ │ │ -0002f8c0: 7373 696f 6e20 696e 2053 454c 4543 5420 ssion in SELECT │ │ │ │ -0002f8d0: 6f72 3c2f 7370 616e 3e0a 2020 2020 2020 or. │ │ │ │ -0002f8e0: 2020 3c73 7061 6e20 636c 6173 733d 2263 # GROUP BY li │ │ │ │ -0002f900: 7374 2e3c 2f73 7061 6e3e 0a20 2020 2020 st.. │ │ │ │ -0002f910: 2020 203c 7370 616e 2063 6c61 7373 3d22 expression_su │ │ │ │ -0002f930: 7070 6f72 7465 645f 696e 5f77 6865 7265 pported_in_where │ │ │ │ -0002f940: 5f63 6c61 7573 653c 2f73 7061 6e3e 203c _clause < │ │ │ │ -0002f950: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0002f960: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ( │ │ │ │ -0002f980: 0a20 2020 2020 2020 2020 2020 203c 7370 . com │ │ │ │ -0002f9a0: 7069 6c65 723c 2f73 7061 6e3e 3c73 7061 piler.connection.ops │ │ │ │ -0002fa10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0002fa30: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0002fa40: 6f6e 6469 7469 6f6e 616c 5f65 7870 7265 onditional_expre │ │ │ │ -0002fa50: 7373 696f 6e5f 7375 7070 6f72 7465 645f ssion_supported_ │ │ │ │ -0002fa60: 696e 5f77 6865 7265 5f63 6c61 7573 653c in_where_clause< │ │ │ │ -0002fa70: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0002fa80: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0002fa90: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0002faa0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0002fab0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if (. < │ │ │ │ -0002fae0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0002faf0: 6e6f 743c 2f73 7061 6e3e 203c 7370 616e not compi │ │ │ │ -0002fb10: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler.connection.featu │ │ │ │ -0002fb80: 7265 733c 2f73 7061 6e3e 3c73 7061 6e20 res.supports_boole │ │ │ │ -0002fbc0: 616e 5f65 7870 725f 696e 5f73 656c 6563 an_expr_in_selec │ │ │ │ -0002fbd0: 745f 636c 6175 7365 3c2f 7370 616e 3e0a t_clause. │ │ │ │ -0002fbe0: 2020 2020 2020 2020 2020 2020 3c73 7061 # A │ │ │ │ -0002fc00: 766f 6964 2064 6f75 626c 6520 7772 6170 void double wrap │ │ │ │ -0002fc10: 7069 6e67 2e3c 2f73 7061 6e3e 0a20 2020 ping.. │ │ │ │ -0002fc20: 2020 2020 2020 2020 203c 7370 616e 2063 and expression_ │ │ │ │ -0002fc60: 7375 7070 6f72 7465 645f 696e 5f77 6865 supported_in_whe │ │ │ │ -0002fc70: 7265 5f63 6c61 7573 653c 2f73 7061 6e3e re_clause │ │ │ │ -0002fc80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0002fc90: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.expr │ │ │ │ -0002fce0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession). ): │ │ │ │ -0002fd20: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0002fd30: 2020 2020 3c73 7061 6e20 636c 6173 733d sql < │ │ │ │ -0002fd50: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0002fd60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "C │ │ │ │ -0002fd80: 4153 4520 5748 454e 203c 2f73 7061 6e3e ASE WHEN │ │ │ │ -0002fd90: 3c73 7061 6e20 636c 6173 733d 2273 6922 {} THEN │ │ │ │ -0002fdc0: 2031 2045 4c53 4520 3020 454e 4426 7175 1 ELSE 0 END&qu │ │ │ │ -0002fdd0: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;.format< │ │ │ │ -0002fe10: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0002fe20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 sql). │ │ │ │ -0002fe60: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -0002fe80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0002fe90: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ -0002fed0: 0a0a 0a3c 6469 7620 636c 6173 733d 2276 ...
    . │ │ │ │ -0002ff70: 5b64 6f63 735d 3c2f 613e 0a3c 7370 616e [docs].@dec │ │ │ │ -0002ff90: 6f6e 7374 7275 6374 6962 6c65 3c2f 7370 onstructible(path< │ │ │ │ -0002ffd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=& │ │ │ │ -00030000: 7175 6f74 3b64 6a61 6e67 6f2e 6462 2e6d quot;django.db.m │ │ │ │ -00030010: 6f64 656c 732e 5768 656e 2671 756f 743b odels.When" │ │ │ │ -00030020: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00030040: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00030050: 636c 6173 733c 2f73 7061 6e3e 203c 7370 class Wh │ │ │ │ -00030070: 656e 3c2f 7370 616e 3e3c 7370 616e 2063 en(Expression):. │ │ │ │ -000300d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000300e0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -000300f0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00030100: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -00030120: 5748 454e 203c 2f73 7061 6e3e 3c73 7061 WHEN %(c │ │ │ │ -00030140: 6f6e 6469 7469 6f6e 2973 3c2f 7370 616e ondition)s THEN < │ │ │ │ -00030170: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -00030180: 2528 7265 7375 6c74 2973 3c2f 7370 616e %(result)s". │ │ │ │ -000301b0: 2020 2020 3c73 7061 6e20 636c 6173 733d # This isn& │ │ │ │ -000301d0: 2333 393b 7420 6120 636f 6d70 6c65 7465 #39;t a complete │ │ │ │ -000301e0: 2063 6f6e 6469 7469 6f6e 616c 2065 7870 conditional exp │ │ │ │ -000301f0: 7265 7373 696f 6e2c 206d 7573 7420 6265 ression, must be │ │ │ │ -00030200: 2075 7365 6420 696e 2043 6173 6528 292e used in Case(). │ │ │ │ -00030210: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . cond │ │ │ │ -00030230: 6974 696f 6e61 6c3c 2f73 7061 6e3e 203c itional < │ │ │ │ -00030240: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00030250: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c False.. def __init__< │ │ │ │ -000302b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000302e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, condition=None │ │ │ │ -00030350: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00030370: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00030380: 7468 656e 3c2f 7370 616e 3e3c 7370 616e then=None< │ │ │ │ -000303c0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000303d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **lookups< │ │ │ │ -00030410: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00030420: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00030430: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if looku │ │ │ │ -00030460: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps:. if │ │ │ │ -000304a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c conditio │ │ │ │ -000304c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n is None │ │ │ │ -00030500: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00030510: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00030520: 2020 2020 2020 2020 203c 7370 616e 2063 conditi │ │ │ │ -00030540: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, lookups │ │ │ │ -00030580: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = Q(**lookups), None │ │ │ │ -00030630: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00030640: 2020 2020 3c73 7061 6e20 636c 6173 733d elif │ │ │ │ -00030660: 3c73 7061 6e20 636c 6173 733d 226e 6222 getattr< │ │ │ │ -00030680: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00030690: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 condition │ │ │ │ -000306b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000306d0: 3c73 7061 6e20 636c 6173 733d 2273 3222 "condition │ │ │ │ -000306f0: 616c 2671 756f 743b 3c2f 7370 616e 3e3c al"< │ │ │ │ -00030700: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00030710: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c False):. │ │ │ │ -00030750: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -00030760: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00030770: 6f6e 6469 7469 6f6e 3c2f 7370 616e 3e3c ondition< │ │ │ │ -00030780: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00030790: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c lookups< │ │ │ │ -000307b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -000307d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000307e0: 513c 2f73 7061 6e3e 3c73 7061 6e20 636c Q( │ │ │ │ -00030800: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00030810: 636f 6e64 6974 696f 6e3c 2f73 7061 6e3e condition │ │ │ │ -00030820: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00030830: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , **lookups │ │ │ │ -00030870: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00030880: 292c 3c2f 7370 616e 3e20 3c73 7061 6e20 ), None< │ │ │ │ -000308a0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -000308b0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -000308c0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f conditi │ │ │ │ -000308e0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on is None or no │ │ │ │ -00030950: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t getatt │ │ │ │ -00030970: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ -00030990: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000309a0: 636f 6e64 6974 696f 6e3c 2f73 7061 6e3e condition │ │ │ │ -000309b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000309c0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , " │ │ │ │ -000309e0: 636f 6e64 6974 696f 6e61 6c26 7175 6f74 conditional" │ │ │ │ -000309f0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;, │ │ │ │ -00030a10: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False)< │ │ │ │ -00030a40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> or lookups │ │ │ │ -00030a80: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00030a90: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00030aa0: 2020 2020 203c 7370 616e 2063 6c61 7373 raise TypeError(. │ │ │ │ -00030b00: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ -00030b20: 6f74 3b57 6865 6e28 2920 7375 7070 6f72 ot;When() suppor │ │ │ │ -00030b30: 7473 2061 2051 206f 626a 6563 742c 2061 ts a Q object, a │ │ │ │ -00030b40: 2062 6f6f 6c65 616e 2065 7870 7265 7373 boolean express │ │ │ │ -00030b50: 696f 6e2c 206f 7220 6c6f 6f6b 7570 7320 ion, or lookups │ │ │ │ -00030b60: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ -00030b70: 2020 2020 2020 2020 2020 2020 2020 3c73 & │ │ │ │ -00030b90: 7175 6f74 3b61 7320 6120 636f 6e64 6974 quot;as a condit │ │ │ │ -00030ba0: 696f 6e2e 2671 756f 743b 3c2f 7370 616e ion.". )< │ │ │ │ -00030bd0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00030be0: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -00030bf0: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f isinst │ │ │ │ -00030c10: 616e 6365 3c2f 7370 616e 3e3c 7370 616e ance(condition, Q) an │ │ │ │ -00030cb0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d not condition:. │ │ │ │ -00030d10: 2020 2020 2020 2020 2020 3c73 7061 6e20 raise< │ │ │ │ -00030d30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ValueErr │ │ │ │ -00030d50: 6f72 3c2f 7370 616e 3e3c 7370 616e 2063 or("An empty │ │ │ │ -00030d90: 2051 2829 2063 616e 2623 3339 3b74 2062 Q() can't b │ │ │ │ -00030da0: 6520 7573 6564 2061 7320 6120 5768 656e e used as a When │ │ │ │ -00030db0: 2829 2063 6f6e 6469 7469 6f6e 2e26 7175 () condition.&qu │ │ │ │ -00030dc0: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;). supe │ │ │ │ -00030e00: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r().__init │ │ │ │ -00030e50: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(output_field=Non │ │ │ │ -00030ec0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e) │ │ │ │ -00030ee0: 0a20 2020 2020 2020 203c 7370 616e 2063 . self.con │ │ │ │ -00030f30: 6469 7469 6f6e 3c2f 7370 616e 3e20 3c73 dition =< │ │ │ │ -00030f50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> condition │ │ │ │ -00030f70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00030f80: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.result = self │ │ │ │ -00031000: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00031020: 7370 616e 2063 6c61 7373 3d22 6e22 3e5f span class="n">_ │ │ │ │ -00031030: 7061 7273 655f 6578 7072 6573 7369 6f6e parse_expression │ │ │ │ -00031040: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s( │ │ │ │ -00031060: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00031070: 7468 656e 3c2f 7370 616e 3e3c 7370 616e then)[0].. def __str__(se │ │ │ │ -00031130: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -00031170: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n " │ │ │ │ -00031190: 5748 454e 203c 2f73 7061 6e3e 3c73 7061 WHEN %r< │ │ │ │ -000311b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span> THEN %r& │ │ │ │ -00031200: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; % (s │ │ │ │ -00031250: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.condition, self │ │ │ │ -000312c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000312e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -000312f0: 6573 756c 743c 2f73 7061 6e3e 3c73 7061 esult).. def __repr__(se │ │ │ │ -00031380: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -000313c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n " │ │ │ │ -000313e0: 266c 743b 3c2f 7370 616e 3e3c 7370 616e <%s: < │ │ │ │ -00031420: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -00031430: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s>&q │ │ │ │ -00031450: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; % (se │ │ │ │ -000314a0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.__class__.__nam │ │ │ │ -00031510: 655f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 e__, self< │ │ │ │ -00031550: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00031560: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -00031580: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_sou │ │ │ │ -000315a0: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ -000315b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000315e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -00031620: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn [self.< │ │ │ │ -00031670: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>condition< │ │ │ │ -00031690: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000316b0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -000316c0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.result │ │ │ │ -00031700: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00031710: 5d3c 2f73 7061 6e3e 0a0a 2020 2020 3c73 ].. de │ │ │ │ -00031730: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f set_so │ │ │ │ -00031750: 7572 6365 5f65 7870 7265 7373 696f 6e73 urce_expressions │ │ │ │ -00031760: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00031780: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00031790: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self, exprs │ │ │ │ -000317d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000317e0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -000317f0: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -00031820: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>condition< │ │ │ │ -00031840: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00031860: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00031870: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.result │ │ │ │ -000318b0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = exprs< │ │ │ │ -000318e0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -00031900: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_sour │ │ │ │ -00031920: 6365 5f66 6965 6c64 733c 2f73 7061 6e3e ce_fields │ │ │ │ -00031930: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00031940: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -00031980: 2020 2020 2020 3c73 7061 6e20 636c 6173 # We' │ │ │ │ -000319a0: 7265 206f 6e6c 7920 696e 7465 7265 7374 re only interest │ │ │ │ -000319b0: 6564 2069 6e20 7468 6520 6669 656c 6473 ed in the fields │ │ │ │ -000319c0: 206f 6620 7468 6520 7265 7375 6c74 2065 of the result e │ │ │ │ -000319d0: 7870 7265 7373 696f 6e73 2e3c 2f73 7061 xpressions.. retur │ │ │ │ -00031a00: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n [self.result._outpu │ │ │ │ -00031aa0: 745f 6669 656c 645f 6f72 5f6e 6f6e 653c t_field_or_none< │ │ │ │ -00031ab0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>].. │ │ │ │ -00031ad0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -00031af0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -00031b00: 7265 736f 6c76 655f 6578 7072 6573 7369 resolve_expressi │ │ │ │ -00031b10: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(. self< │ │ │ │ -00031b50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00031b70: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ -00031b80: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery=None< │ │ │ │ -00031bc0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00031bd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c allow_jo │ │ │ │ -00031bf0: 696e 733c 2f73 7061 6e3e 3c73 7061 6e20 ins=True,< │ │ │ │ -00031c40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> reuse=None │ │ │ │ -00031c90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00031cb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00031cc0: 7375 6d6d 6172 697a 653c 2f73 7061 6e3e summarize │ │ │ │ -00031cd0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00031ce0: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =False, fo │ │ │ │ -00031d30: 725f 7361 7665 3c2f 7370 616e 3e3c 7370 r_save=False. ): │ │ │ │ -00031d90: 0a20 2020 2020 2020 203c 7370 616e 2063 . c = self │ │ │ │ +0002f080: 7373 3d22 7022 3e28 3c2f 7370 616e 3e0a ss="p">(. │ │ │ │ +0002f090: 2020 2020 2020 2020 3c73 7061 6e20 636c self, que │ │ │ │ +0002f0e0: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry=None, allow_join │ │ │ │ +0002f150: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s= │ │ │ │ +0002f170: 3c73 7061 6e20 636c 6173 733d 226b 6322 True, reuse=None, su │ │ │ │ +0002f220: 6d6d 6172 697a 653c 2f73 7061 6e3e 3c73 mmarize=< │ │ │ │ +0002f240: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>False, for_ │ │ │ │ +0002f290: 7361 7665 3c2f 7370 616e 3e3c 7370 616e save=False │ │ │ │ +0002f2d0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . ):. │ │ │ │ +0002f2f0: 2020 2020 2020 203c 7370 616e 2063 6c61 resolved< │ │ │ │ +0002f310: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0002f330: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ +0002f360: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.re │ │ │ │ +0002f390: 736f 6c76 655f 6578 7072 6573 7369 6f6e solve_expression │ │ │ │ +0002f3a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (. │ │ │ │ +0002f3c0: 2020 2020 2020 2020 2020 2020 3c73 7061 quer │ │ │ │ +0002f3e0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y, │ │ │ │ +0002f400: 203c 7370 616e 2063 6c61 7373 3d22 6e22 allow_joins, reus │ │ │ │ +0002f450: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +0002f470: 203c 7370 616e 2063 6c61 7373 3d22 6e22 summarize, for_sa │ │ │ │ +0002f4c0: 7665 3c2f 7370 616e 3e0a 2020 2020 2020 ve. │ │ │ │ +0002f4d0: 2020 3c73 7061 6e20 636c 6173 733d 2270 ). │ │ │ │ +0002f4f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if no │ │ │ │ +0002f520: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t getatt │ │ │ │ +0002f540: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +0002f560: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0002f570: 7265 736f 6c76 6564 3c2f 7370 616e 3e3c resolved< │ │ │ │ +0002f580: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002f590: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 expressio │ │ │ │ +0002f5b0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ +0002f5d0: 203c 7370 616e 2063 6c61 7373 3d22 7332 "conditio │ │ │ │ +0002f5f0: 6e61 6c26 7175 6f74 3b3c 2f73 7061 6e3e nal" │ │ │ │ +0002f600: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002f610: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , False< │ │ │ │ +0002f630: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0002f650: 2020 2020 2020 2020 2020 2020 3c73 7061 rais │ │ │ │ +0002f670: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e TypeEr │ │ │ │ +0002f690: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20 ror("Cannot │ │ │ │ +0002f6d0: 6e65 6761 7465 206e 6f6e 2d63 6f6e 6469 negate non-condi │ │ │ │ +0002f6e0: 7469 6f6e 616c 2065 7870 7265 7373 696f tional expressio │ │ │ │ +0002f6f0: 6e73 2e26 7175 6f74 3b3c 2f73 7061 6e3e ns." │ │ │ │ +0002f700: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002f710: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +0002f720: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +0002f740: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +0002f750: 6573 6f6c 7665 643c 2f73 7061 6e3e 0a0a esolved.. │ │ │ │ +0002f760: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +0002f780: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +0002f790: 7365 6c65 6374 5f66 6f72 6d61 743c 2f73 select_format(sel │ │ │ │ +0002f7d0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +0002f7f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 compiler │ │ │ │ +0002f810: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0002f820: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , sql, para │ │ │ │ +0002f870: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms):. # Wr │ │ │ │ +0002f8b0: 6170 2062 6f6f 6c65 616e 2065 7870 7265 ap boolean expre │ │ │ │ +0002f8c0: 7373 696f 6e73 2077 6974 6820 6120 4341 ssions with a CA │ │ │ │ +0002f8d0: 5345 2057 4845 4e20 6578 7072 6573 7369 SE WHEN expressi │ │ │ │ +0002f8e0: 6f6e 2069 6620 6120 6461 7461 6261 7365 on if a database │ │ │ │ +0002f8f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0002f900: 3c73 7061 6e20 636c 6173 733d 2263 3122 # backend (e.g. │ │ │ │ +0002f920: 204f 7261 636c 6529 2064 6f65 736e 2623 Oracle) doesn&# │ │ │ │ +0002f930: 3339 3b74 2073 7570 706f 7274 2062 6f6f 39;t support boo │ │ │ │ +0002f940: 6c65 616e 2065 7870 7265 7373 696f 6e20 lean expression │ │ │ │ +0002f950: 696e 2053 454c 4543 5420 6f72 3c2f 7370 in SELECT or. # G │ │ │ │ +0002f980: 524f 5550 2042 5920 6c69 7374 2e3c 2f73 ROUP BY list.. exp │ │ │ │ +0002f9b0: 7265 7373 696f 6e5f 7375 7070 6f72 7465 ression_supporte │ │ │ │ +0002f9c0: 645f 696e 5f77 6865 7265 5f63 6c61 7573 d_in_where_claus │ │ │ │ +0002f9d0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = (. │ │ │ │ +0002fa10: 2020 2020 2020 203c 7370 616e 2063 6c61 compiler< │ │ │ │ +0002fa30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ +0002fa60: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +0002fa70: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0002fa80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ops.conditi │ │ │ │ +0002fad0: 6f6e 616c 5f65 7870 7265 7373 696f 6e5f onal_expression_ │ │ │ │ +0002fae0: 7375 7070 6f72 7465 645f 696e 5f77 6865 supported_in_whe │ │ │ │ +0002faf0: 7265 5f63 6c61 7573 653c 2f73 7061 6e3e re_clause │ │ │ │ +0002fb00: 0a20 2020 2020 2020 203c 7370 616e 2063 . ). if (. │ │ │ │ +0002fb60: 2020 2020 2020 2020 203c 7370 616e 2063 not compiler.conn │ │ │ │ +0002fbd0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.features.supp │ │ │ │ +0002fc40: 6f72 7473 5f62 6f6f 6c65 616e 5f65 7870 orts_boolean_exp │ │ │ │ +0002fc50: 725f 696e 5f73 656c 6563 745f 636c 6175 r_in_select_clau │ │ │ │ +0002fc60: 7365 3c2f 7370 616e 3e0a 2020 2020 2020 se. │ │ │ │ +0002fc70: 2020 2020 2020 3c73 7061 6e20 636c 6173 # Avoid d │ │ │ │ +0002fc90: 6f75 626c 6520 7772 6170 7069 6e67 2e3c ouble wrapping.< │ │ │ │ +0002fca0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0002fcb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 and < │ │ │ │ +0002fcd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +0002fce0: 7870 7265 7373 696f 6e5f 7375 7070 6f72 xpression_suppor │ │ │ │ +0002fcf0: 7465 645f 696e 5f77 6865 7265 5f63 6c61 ted_in_where_cla │ │ │ │ +0002fd00: 7573 653c 2f73 7061 6e3e 3c73 7061 6e20 use(self.< │ │ │ │ +0002fd50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>expression │ │ │ │ +0002fd70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0002fd90: 2020 2020 2020 2020 3c73 7061 6e20 636c ):. sq │ │ │ │ +0002fdd0: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l = "CASE WH │ │ │ │ +0002fe10: 454e 203c 2f73 7061 6e3e 3c73 7061 6e20 EN {} THEN 1 ELS │ │ │ │ +0002fe50: 4520 3020 454e 4426 7175 6f74 3b3c 2f73 E 0 END".form │ │ │ │ +0002fe90: 6174 3c2f 7370 616e 3e3c 7370 616e 2063 at(sql). retu │ │ │ │ +0002ff00: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn sql, par │ │ │ │ +0002ff50: 616d 733c 2f73 7061 6e3e 0a0a 0a3c 6469 ams....[docum │ │ │ │ +00030000: 656e 7461 7469 655d 3c2f 613e 0a3c 7370 entatie].@d │ │ │ │ +00030020: 6563 6f6e 7374 7275 6374 6962 6c65 3c2f econstructible(pat │ │ │ │ +00030060: 683c 2f73 7061 6e3e 3c73 7061 6e20 636c h= │ │ │ │ +00030080: 3c73 7061 6e20 636c 6173 733d 2273 3222 "django.db │ │ │ │ +000300a0: 2e6d 6f64 656c 732e 5768 656e 2671 756f .models.When&quo │ │ │ │ +000300b0: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;).class < │ │ │ │ +000300f0: 7370 616e 2063 6c61 7373 3d22 6e63 223e span class="nc"> │ │ │ │ +00030100: 5768 656e 3c2f 7370 616e 3e3c 7370 616e When(Expression):. │ │ │ │ +00030160: 2020 3c73 7061 6e20 636c 6173 733d 226e template = &quo │ │ │ │ +000301b0: 743b 5748 454e 203c 2f73 7061 6e3e 3c73 t;WHEN % │ │ │ │ +000301d0: 2863 6f6e 6469 7469 6f6e 2973 3c2f 7370 (condition)s THEN %(result)s". # This is │ │ │ │ +00030260: 6e26 2333 393b 7420 6120 636f 6d70 6c65 n't a comple │ │ │ │ +00030270: 7465 2063 6f6e 6469 7469 6f6e 616c 2065 te conditional e │ │ │ │ +00030280: 7870 7265 7373 696f 6e2c 206d 7573 7420 xpression, must │ │ │ │ +00030290: 6265 2075 7365 6420 696e 2043 6173 6528 be used in Case( │ │ │ │ +000302a0: 292e 3c2f 7370 616e 3e0a 2020 2020 3c73 ).. co │ │ │ │ +000302c0: 6e64 6974 696f 6e61 6c3c 2f73 7061 6e3e nditional │ │ │ │ +000302d0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = False │ │ │ │ +00030300: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00030320: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __init_ │ │ │ │ +00030340: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _( │ │ │ │ +00030360: 3c73 7061 6e20 636c 6173 733d 2262 7022 self, condition=No │ │ │ │ +000303e0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, then=None, **lookups):. │ │ │ │ +000304c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if loo │ │ │ │ +000304f0: 6b75 7073 3c2f 7370 616e 3e3c 7370 616e kups:. │ │ │ │ +00030520: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00030530: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if condit │ │ │ │ +00030550: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion is None:. │ │ │ │ +000305b0: 2020 2020 2020 2020 2020 203c 7370 616e condi │ │ │ │ +000305d0: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion, lookups = Q(**lookups), No │ │ │ │ +000306c0: 6e65 3c2f 7370 616e 3e0a 2020 2020 2020 ne. │ │ │ │ +000306d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 elif getattr(conditi │ │ │ │ +00030740: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, "conditi │ │ │ │ +00030780: 6f6e 616c 2671 756f 743b 3c2f 7370 616e onal", False │ │ │ │ +000307c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +000307e0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +000307f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 condition, lookup │ │ │ │ +00030840: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = Q(condition, **lookups), Non │ │ │ │ +00030930: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ +00030940: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if condi │ │ │ │ +00030970: 7469 6f6e 3c2f 7370 616e 3e20 3c73 7061 tion is< │ │ │ │ +00030990: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None or < │ │ │ │ +000309d0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +000309e0: 6e6f 743c 2f73 7061 6e3e 203c 7370 616e not geta │ │ │ │ +00030a00: 7474 723c 2f73 7061 6e3e 3c73 7061 6e20 ttr(condition, &quo │ │ │ │ +00030a70: 743b 636f 6e64 6974 696f 6e61 6c26 7175 t;conditional&qu │ │ │ │ +00030a80: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;, False │ │ │ │ +00030ac0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00030ad0: 293c 2f73 7061 6e3e 203c 7370 616e 2063 ) or lookups:. │ │ │ │ +00030b30: 2020 2020 2020 203c 7370 616e 2063 6c61 raise TypeError(. │ │ │ │ +00030b90: 2020 2020 2020 2020 2020 2020 2020 3c73 & │ │ │ │ +00030bb0: 7175 6f74 3b57 6865 6e28 2920 7375 7070 quot;When() supp │ │ │ │ +00030bc0: 6f72 7473 2061 2051 206f 626a 6563 742c orts a Q object, │ │ │ │ +00030bd0: 2061 2062 6f6f 6c65 616e 2065 7870 7265 a boolean expre │ │ │ │ +00030be0: 7373 696f 6e2c 206f 7220 6c6f 6f6b 7570 ssion, or lookup │ │ │ │ +00030bf0: 7320 2671 756f 743b 3c2f 7370 616e 3e0a s ". │ │ │ │ +00030c00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00030c10: 3c73 7061 6e20 636c 6173 733d 2273 3222 "as a cond │ │ │ │ +00030c30: 6974 696f 6e2e 2671 756f 743b 3c2f 7370 ition.". │ │ │ │ +00030c50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00030c60: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00030c70: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if isin │ │ │ │ +00030ca0: 7374 616e 6365 3c2f 7370 616e 3e3c 7370 stance(condition, Q< │ │ │ │ +00030d10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>) < │ │ │ │ +00030d30: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +00030d40: 616e 643c 2f73 7061 6e3e 203c 7370 616e and not< │ │ │ │ +00030d60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> condition │ │ │ │ +00030d80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +00030da0: 2020 2020 2020 2020 2020 2020 3c73 7061 rais │ │ │ │ +00030dc0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e ValueE │ │ │ │ +00030de0: 7272 6f72 3c2f 7370 616e 3e3c 7370 616e rror("An emp │ │ │ │ +00030e20: 7479 2051 2829 2063 616e 2623 3339 3b74 ty Q() can't │ │ │ │ +00030e30: 2062 6520 7573 6564 2061 7320 6120 5768 be used as a Wh │ │ │ │ +00030e40: 656e 2829 2063 6f6e 6469 7469 6f6e 2e26 en() condition.& │ │ │ │ +00030e50: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;). su │ │ │ │ +00030e90: 7065 723c 2f73 7061 6e3e 3c73 7061 6e20 per().__in │ │ │ │ +00030ee0: 6974 5f5f 3c2f 7370 616e 3e3c 7370 616e it__(output_field< │ │ │ │ +00030f20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ +00030f50: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one). self │ │ │ │ +00030f90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00030fb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00030fc0: 6f6e 6469 7469 6f6e 3c2f 7370 616e 3e20 ondition │ │ │ │ +00030fd0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00030fe0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = conditi │ │ │ │ +00031000: 6f6e 3c2f 7370 616e 3e0a 2020 2020 2020 on. │ │ │ │ +00031010: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ +00031040: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>result = se │ │ │ │ +00031090: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf._parse_expressi │ │ │ │ +000310d0: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(then)[< │ │ │ │ +00031120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>0< │ │ │ │ +00031140: 7370 616e 2063 6c61 7373 3d22 7022 3e5d span class="p">] │ │ │ │ +00031150: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ +00031170: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c __str__ │ │ │ │ +00031190: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000311b0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +000311c0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ +00031200: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn &quo │ │ │ │ +00031220: 743b 5748 454e 203c 2f73 7061 6e3e 3c73 t;WHEN % │ │ │ │ +00031240: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r THEN < │ │ │ │ +00031260: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%r │ │ │ │ +00031280: 3c73 7061 6e20 636c 6173 733d 2273 3222 " < │ │ │ │ +000312a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e25 span class="o">% │ │ │ │ +000312b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ( │ │ │ │ +000312d0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.condition, se │ │ │ │ +00031350: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.result)< │ │ │ │ +000313a0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +000313c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __repr__ │ │ │ │ +000313e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00031400: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00031410: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ +00031450: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn &quo │ │ │ │ +00031470: 743b 266c 743b 3c2f 7370 616e 3e3c 7370 t;<%s │ │ │ │ +00031490: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 : %s> │ │ │ │ +000314e0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " %< │ │ │ │ +00031500: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ +00031520: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00031530: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.__class__.__n │ │ │ │ +000315a0: 616d 655f 5f3c 2f73 7061 6e3e 3c73 7061 ame__, self).. < │ │ │ │ +00031600: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +00031610: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef get_s │ │ │ │ +00031630: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +00031640: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s( │ │ │ │ +00031660: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. re │ │ │ │ +000316b0: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn [self │ │ │ │ +000316f0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00031700: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .conditio │ │ │ │ +00031720: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ +00031740: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.result].. │ │ │ │ +000317b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +000317c0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def set_ │ │ │ │ +000317e0: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ +000317f0: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns(self, exprs):. │ │ │ │ +00031880: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +000318a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000318b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .conditio │ │ │ │ +000318d0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ +000318f0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.result = expr │ │ │ │ +00031970: 733c 2f73 7061 6e3e 0a0a 2020 2020 3c73 s.. de │ │ │ │ +00031990: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f get_so │ │ │ │ +000319b0: 7572 6365 5f66 6965 6c64 733c 2f73 7061 urce_fields(self< │ │ │ │ +000319f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00031a10: 2020 2020 2020 2020 3c73 7061 6e20 636c # We │ │ │ │ +00031a30: 393b 7265 206f 6e6c 7920 696e 7465 7265 9;re only intere │ │ │ │ +00031a40: 7374 6564 2069 6e20 7468 6520 6669 656c sted in the fiel │ │ │ │ +00031a50: 6473 206f 6620 7468 6520 7265 7375 6c74 ds of the result │ │ │ │ +00031a60: 2065 7870 7265 7373 696f 6e73 2e3c 2f73 expressions.. ret │ │ │ │ +00031a90: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn [self< │ │ │ │ +00031ad0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00031ae0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 result._out │ │ │ │ +00031b30: 7075 745f 6669 656c 645f 6f72 5f6e 6f6e put_field_or_non │ │ │ │ +00031b40: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e] │ │ │ │ +00031b60: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00031b80: 203c 7370 616e 2063 6c61 7373 3d22 6e66 resolve_expres │ │ │ │ +00031ba0: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(. sel │ │ │ │ +00031be0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +00031c00: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query=None, allow_ │ │ │ │ +00031c80: 6a6f 696e 733c 2f73 7061 6e3e 3c73 7061 joins=True │ │ │ │ +00031cc0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00031cd0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , reuse=No │ │ │ │ +00031d20: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, summarize=False │ │ │ │ +00031d90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00031db0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00031dc0: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ +00031dd0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ 00031de0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00031e00: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00031e10: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy(). c.is_s │ │ │ │ -00031e80: 756d 6d61 7279 3c2f 7370 616e 3e20 3c73 ummary =< │ │ │ │ -00031ea0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> summarize │ │ │ │ -00031ec0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00031ed0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00031ee0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if hasat │ │ │ │ -00031f00: 7472 3c2f 7370 616e 3e3c 7370 616e 2063 tr(c.condition, " │ │ │ │ -00031fa0: 3b72 6573 6f6c 7665 5f65 7870 7265 7373 ;resolve_express │ │ │ │ -00031fb0: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion" │ │ │ │ -00031fc0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00031fd0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -00031fe0: 2020 2020 2020 3c73 7061 6e20 636c 6173 c.< │ │ │ │ -00032010: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>condition< │ │ │ │ -00032030: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00032050: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00032060: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c. │ │ │ │ -00032080: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00032090: 636f 6e64 6974 696f 6e3c 2f73 7061 6e3e condition │ │ │ │ -000320a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000320b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .resolve_ │ │ │ │ -000320d0: 6578 7072 6573 7369 6f6e 3c2f 7370 616e expression(. │ │ │ │ -00032100: 2020 2020 2020 2020 2020 3c73 7061 6e20 query< │ │ │ │ -00032120: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00032140: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -00032150: 6c6c 6f77 5f6a 6f69 6e73 3c2f 7370 616e llow_joins, reuse< │ │ │ │ -00032190: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000321b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -000321c0: 756d 6d61 7269 7a65 3c2f 7370 616e 3e3c ummarize< │ │ │ │ -000321d0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000321e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c False. │ │ │ │ -00032210: 2020 3c73 7061 6e20 636c 6173 733d 2270 ). │ │ │ │ -00032230: 2020 203c 7370 616e 2063 6c61 7373 3d22 c.result │ │ │ │ -00032280: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = c.result │ │ │ │ -000322e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00032300: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00032310: 6573 6f6c 7665 5f65 7870 7265 7373 696f esolve_expressio │ │ │ │ -00032320: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n( │ │ │ │ -00032340: 0a20 2020 2020 2020 2020 2020 203c 7370 . que │ │ │ │ -00032360: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry, allow_joins, reu │ │ │ │ -000323d0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, summarize, for_s │ │ │ │ -00032440: 6176 653c 2f73 7061 6e3e 0a20 2020 2020 ave. │ │ │ │ -00032450: 2020 203c 7370 616e 2063 6c61 7373 3d22 ). │ │ │ │ -00032470: 2020 2020 3c73 7061 6e20 636c 6173 733d return c.. │ │ │ │ -000324b0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -000324c0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_s │ │ │ │ -000324e0: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql(self, compiler, co │ │ │ │ -00032580: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -00032590: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000325a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ -000325c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ -000325e0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -000325f0: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None, **ext │ │ │ │ -00032640: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context):. │ │ │ │ -00032670: 2020 203c 7370 616e 2063 6c61 7373 3d22 connection.ops< │ │ │ │ -000326c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ch │ │ │ │ -000326f0: 6563 6b5f 6578 7072 6573 7369 6f6e 5f73 eck_expression_s │ │ │ │ -00032700: 7570 706f 7274 3c2f 7370 616e 3e3c 7370 upport(self). │ │ │ │ -00032760: 2020 3c73 7061 6e20 636c 6173 733d 226e template_param │ │ │ │ -00032780: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = extra_context< │ │ │ │ -000327c0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -000327d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -000327e0: 716c 5f70 6172 616d 733c 2f73 7061 6e3e ql_params │ │ │ │ -000327f0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = []. cond │ │ │ │ -00032840: 6974 696f 6e5f 7371 6c3c 2f73 7061 6e3e ition_sql │ │ │ │ -00032850: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00032860: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , conditi │ │ │ │ -00032880: 6f6e 5f70 6172 616d 733c 2f73 7061 6e3e on_params │ │ │ │ -00032890: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = compil │ │ │ │ -000328c0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.compile< │ │ │ │ -00032900: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00032910: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.condi │ │ │ │ -00032960: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion). temp │ │ │ │ -000329a0: 6c61 7465 5f70 6172 616d 733c 2f73 7061 late_params[" │ │ │ │ -000329e0: 3b63 6f6e 6469 7469 6f6e 2671 756f 743b ;condition" │ │ │ │ -000329f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ] │ │ │ │ -00032a10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00032a20: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = conditi │ │ │ │ -00032a40: 6f6e 5f73 716c 3c2f 7370 616e 3e0a 2020 on_sql. │ │ │ │ -00032a50: 2020 2020 2020 3c73 7061 6e20 636c 6173 result_sql │ │ │ │ -00032a70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00032a90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00032aa0: 7265 7375 6c74 5f70 6172 616d 733c 2f73 result_params = co │ │ │ │ -00032ae0: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler.compile(self │ │ │ │ -00032b50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00032b70: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00032b80: 6573 756c 743c 2f73 7061 6e3e 3c73 7061 esult). tem │ │ │ │ -00032bc0: 706c 6174 655f 7061 7261 6d73 3c2f 7370 plate_params[&quo │ │ │ │ -00032c00: 743b 7265 7375 6c74 2671 756f 743b 3c2f t;result"] =< │ │ │ │ -00032c40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> result_sq │ │ │ │ -00032c60: 6c3c 2f73 7061 6e3e 0a20 2020 2020 2020 l. │ │ │ │ -00032c70: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -00032c90: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = templa │ │ │ │ -00032cc0: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te or self.templat │ │ │ │ -00032d30: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ -00032d40: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00032d60: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ -00032d70: 656d 706c 6174 653c 2f73 7061 6e3e 203c emplate < │ │ │ │ -00032d80: 7370 616e 2063 6c61 7373 3d22 6f22 3e25 span class="o">% │ │ │ │ -00032d90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ -00032db0: 5f70 6172 616d 733c 2f73 7061 6e3e 3c73 _params,< │ │ │ │ -00032dd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (. │ │ │ │ -00032df0: 2020 2020 2020 2020 2020 2020 3c73 7061 *sql_params,. │ │ │ │ -00032e50: 2020 2020 2020 2020 2020 3c73 7061 6e20 *condition_para │ │ │ │ -00032e90: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms,. *< │ │ │ │ -00032ed0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>result_par │ │ │ │ -00032ef0: 616d 733c 2f73 7061 6e3e 3c73 7061 6e20 ams,. ).. def get_group_b │ │ │ │ -00032f70: 795f 636f 6c73 3c2f 7370 616e 3e3c 7370 y_cols(self):. │ │ │ │ -00032fd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 # This is no │ │ │ │ -00032ff0: 7420 6120 636f 6d70 6c65 7465 2065 7870 t a complete exp │ │ │ │ -00033000: 7265 7373 696f 6e20 616e 6420 6361 6e6e ression and cann │ │ │ │ -00033010: 6f74 2062 6520 7573 6564 2069 6e20 4752 ot be used in GR │ │ │ │ -00033020: 4f55 5020 4259 2e3c 2f73 7061 6e3e 0a20 OUP BY.. │ │ │ │ -00033030: 2020 2020 2020 203c 7370 616e 2063 6c61 cols = []. fo │ │ │ │ -000330a0: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r source< │ │ │ │ -000330c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in self.< │ │ │ │ -00033110: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_source │ │ │ │ -00033130: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions():. │ │ │ │ -00033160: 2020 2020 2020 2020 2020 3c73 7061 6e20 cols.ext │ │ │ │ -000331b0: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end(source< │ │ │ │ -000331f0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00033200: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_group │ │ │ │ -00033220: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ -00033230: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00033240: 2929 3c2f 7370 616e 3e0a 2020 2020 2020 )). │ │ │ │ -00033250: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -00033270: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00033280: 636f 6c73 3c2f 7370 616e 3e3c 2f64 6976 cols
    ....
    .[docs].@d │ │ │ │ -00033350: 6563 6f6e 7374 7275 6374 6962 6c65 3c2f econstructible(pat │ │ │ │ -00033390: 683c 2f73 7061 6e3e 3c73 7061 6e20 636c h= │ │ │ │ -000333b0: 3c73 7061 6e20 636c 6173 733d 2273 3222 "django.db │ │ │ │ -000333d0: 2e6d 6f64 656c 732e 4361 7365 2671 756f .models.Case&quo │ │ │ │ -000333e0: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;).class < │ │ │ │ -00033420: 7370 616e 2063 6c61 7373 3d22 6e63 223e span class="nc"> │ │ │ │ -00033430: 4361 7365 3c2f 7370 616e 3e3c 7370 616e Case(SQLiteNumeric │ │ │ │ -00033470: 4d69 7869 6e3c 2f73 7061 6e3e 3c73 7061 Mixin, Expression< │ │ │ │ -000334b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -000334d0: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ -000334e0: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ -00033500: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". An SQ │ │ │ │ -00033530: 4c20 7365 6172 6368 6564 2043 4153 4520 L searched CASE │ │ │ │ -00033540: 6578 7072 6573 7369 6f6e 3a3c 2f73 7061 expression:.. CAS │ │ │ │ -00033570: 453c 2f73 7061 6e3e 0a3c 7370 616e 2063 E. │ │ │ │ -00033590: 2020 2020 2020 5748 454e 206e 2026 6774 WHEN n > │ │ │ │ -000335a0: 3b20 303c 2f73 7061 6e3e 0a3c 7370 616e ; 0. │ │ │ │ -000335c0: 2020 2020 2020 2020 2020 2020 5448 454e THEN │ │ │ │ -000335d0: 2026 2333 393b 706f 7369 7469 7665 2623 'positive&# │ │ │ │ -000335e0: 3339 3b3c 2f73 7061 6e3e 0a3c 7370 616e 39;. │ │ │ │ -00033600: 2020 2020 2020 2020 5748 454e 206e 2026 WHEN n & │ │ │ │ -00033610: 6c74 3b20 303c 2f73 7061 6e3e 0a3c 7370 lt; 0. │ │ │ │ -00033630: 2020 2020 2020 2020 2020 2020 2020 5448 TH │ │ │ │ -00033640: 454e 2026 2333 393b 6e65 6761 7469 7665 EN 'negative │ │ │ │ -00033650: 2623 3339 3b3c 2f73 7061 6e3e 0a3c 7370 '. │ │ │ │ -00033670: 2020 2020 2020 2020 2020 454c 5345 2026 ELSE & │ │ │ │ -00033680: 2333 393b 7a65 726f 2623 3339 3b3c 2f73 #39;zero'. EN │ │ │ │ -000336b0: 443c 2f73 7061 6e3e 0a3c 7370 616e 2063 D. &q │ │ │ │ -000336d0: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ -000336e0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. tem │ │ │ │ -00033700: 706c 6174 653c 2f73 7061 6e3e 203c 7370 plate = "CAS │ │ │ │ -00033740: 4520 3c2f 7370 616e 3e3c 7370 616e 2063 E %(case │ │ │ │ -00033760: 7329 733c 2f73 7061 6e3e 3c73 7061 6e20 s)s ELSE │ │ │ │ -00033780: 203c 2f73 7061 6e3e 3c73 7061 6e20 636c %(defau │ │ │ │ -000337a0: 6c74 2973 3c2f 7370 616e 3e3c 7370 616e lt)s END │ │ │ │ -000337c0: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ -000337d0: 2020 3c73 7061 6e20 636c 6173 733d 226e case_joiner = & │ │ │ │ -00033820: 7175 6f74 3b20 2671 756f 743b 3c2f 7370 quot; ".. def __init__(sel │ │ │ │ -000338a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -000338c0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 *cases, de │ │ │ │ -00033920: 6661 756c 743c 2f73 7061 6e3e 3c73 7061 fault=None │ │ │ │ -00033960: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00033970: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , output_ │ │ │ │ -00033990: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field=None │ │ │ │ -000339d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000339e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , **extra): │ │ │ │ -00033a30: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00033a40: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00033a50: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if not all(isinst │ │ │ │ -00033ac0: 616e 6365 3c2f 7370 616e 3e3c 7370 616e ance(case,< │ │ │ │ -00033b10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> When) for case in cas │ │ │ │ -00033bb0: 6573 3c2f 7370 616e 3e3c 7370 616e 2063 es):. < │ │ │ │ -00033be0: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -00033bf0: 6169 7365 3c2f 7370 616e 3e20 3c73 7061 aise Typ │ │ │ │ -00033c10: 6545 7272 6f72 3c2f 7370 616e 3e3c 7370 eError("Posi │ │ │ │ -00033c50: 7469 6f6e 616c 2061 7267 756d 656e 7473 tional arguments │ │ │ │ -00033c60: 206d 7573 7420 616c 6c20 6265 2057 6865 must all be Whe │ │ │ │ -00033c70: 6e20 6f62 6a65 6374 732e 2671 756f 743b n objects." │ │ │ │ -00033c80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00033ca0: 2020 2020 2020 2020 3c73 7061 6e20 636c super().< │ │ │ │ -00033cf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__init__< │ │ │ │ -00033d10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ou │ │ │ │ -00033d40: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field). │ │ │ │ -00033d70: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -00033da0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>cases = lis │ │ │ │ -00033df0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ -00033e10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00033e20: 6361 7365 733c 2f73 7061 6e3e 3c73 7061 cases). se │ │ │ │ -00033e60: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.default │ │ │ │ -00033ea0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00033eb0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self._pa │ │ │ │ -00033f00: 7273 655f 6578 7072 6573 7369 6f6e 733c rse_expressions< │ │ │ │ -00033f10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(de │ │ │ │ -00033f40: 6661 756c 743c 2f73 7061 6e3e 3c73 7061 fault)[0]< │ │ │ │ -00033f90: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00033fa0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00033fb0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.extra │ │ │ │ -00033ff0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00034000: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = extra.. def __str__(se │ │ │ │ -00034090: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -000340d0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n " │ │ │ │ -000340f0: 4341 5345 203c 2f73 7061 6e3e 3c73 7061 CASE %s< │ │ │ │ -00034110: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, ELSE %r< │ │ │ │ -00034150: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00034160: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " %< │ │ │ │ -00034180: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (. │ │ │ │ -000341a0: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ -000341c0: 6f74 3b2c 2026 7175 6f74 3b3c 2f73 7061 ot;, ".join(st │ │ │ │ -00034230: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ -00034250: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00034260: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c) │ │ │ │ -00034280: 203c 7370 616e 2063 6c61 7373 3d22 6b22 for c in │ │ │ │ -000342d0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.cases │ │ │ │ -00034320: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00034330: 292c 3c2f 7370 616e 3e0a 2020 2020 2020 ),. │ │ │ │ -00034340: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.defaul │ │ │ │ -00034390: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ -000343b0: 0a20 2020 2020 2020 203c 7370 616e 2063 . ).. def __repr__(self< │ │ │ │ -00034440: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00034460: 2020 2020 2020 2020 3c73 7061 6e20 636c return "< │ │ │ │ -000344a0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;%s: %s< │ │ │ │ -000344f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>>" │ │ │ │ -00034510: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; % (self< │ │ │ │ -00034560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -00034590: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ -000345a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000345b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __name__ │ │ │ │ -000345d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000345f0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self).. def get_source │ │ │ │ -00034660: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(self │ │ │ │ -000346a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -000346c0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -000346e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.cases │ │ │ │ -00034730: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c + │ │ │ │ -00034750: 203c 7370 616e 2063 6c61 7373 3d22 7022 [self.def │ │ │ │ -000347b0: 6175 6c74 3c2f 7370 616e 3e3c 7370 616e ault].. def set_source_ │ │ │ │ -00034810: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(self< │ │ │ │ -00034850: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00034870: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -00034880: 7870 7273 3c2f 7370 616e 3e3c 7370 616e xprs):. *self.cases, s │ │ │ │ -00034940: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.default │ │ │ │ -00034980: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = exprs< │ │ │ │ -000349b0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -000349d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> resolve_ │ │ │ │ -000349f0: 6578 7072 6573 7369 6f6e 3c2f 7370 616e expression(. │ │ │ │ -00034a20: 2020 3c73 7061 6e20 636c 6173 733d 2262 self,< │ │ │ │ -00034a50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> query=None │ │ │ │ -00034aa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00034ac0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00034ad0: 616c 6c6f 775f 6a6f 696e 733c 2f73 7061 allow_joins=True< │ │ │ │ -00034b10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00034b30: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00034b40: 6575 7365 3c2f 7370 616e 3e3c 7370 616e euse=None< │ │ │ │ -00034b80: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00034b90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c summariz │ │ │ │ -00034bb0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e= │ │ │ │ -00034bd0: 3c73 7061 6e20 636c 6173 733d 226b 6322 False, for_save=Fa │ │ │ │ -00034c50: 6c73 653c 2f73 7061 6e3e 0a20 2020 203c lse. < │ │ │ │ -00034c60: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00034c70: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00034c80: 203c 7370 616e 2063 6c61 7373 3d22 6e22 c = self< │ │ │ │ -00034cd0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00034ce0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 copy(). │ │ │ │ -00034d20: 2020 2020 3c73 7061 6e20 636c 6173 733d c.is_summary = < │ │ │ │ -00034d90: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -00034da0: 756d 6d61 7269 7a65 3c2f 7370 616e 3e0a ummarize. │ │ │ │ -00034db0: 2020 2020 2020 2020 3c73 7061 6e20 636c for pos, case in en │ │ │ │ -00034e50: 756d 6572 6174 653c 2f73 7061 6e3e 3c73 umerate(< │ │ │ │ -00034e70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>c.< │ │ │ │ -00034ea0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>cases):. │ │ │ │ -00034ee0: 2020 2020 2020 2020 3c73 7061 6e20 636c c │ │ │ │ -00034f00: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00034f10: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .cases[pos< │ │ │ │ -00034f60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>] < │ │ │ │ -00034f80: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00034f90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c case.resol │ │ │ │ -00034fe0: 7665 5f65 7870 7265 7373 696f 6e3c 2f73 ve_expression(. │ │ │ │ -00035010: 2020 2020 2020 2020 2020 2020 203c 7370 que │ │ │ │ -00035030: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry, allow_joins, reu │ │ │ │ -000350a0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se, summarize, for_s │ │ │ │ -00035110: 6176 653c 2f73 7061 6e3e 0a20 2020 2020 ave. │ │ │ │ -00035120: 2020 2020 2020 203c 7370 616e 2063 6c61 ). │ │ │ │ -00035140: 2020 2020 2020 2020 3c73 7061 6e20 636c c │ │ │ │ -00035160: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00035170: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .default< │ │ │ │ -00035190: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -000351b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000351c0: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c. │ │ │ │ -000351e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000351f0: 6465 6661 756c 743c 2f73 7061 6e3e 3c73 default.< │ │ │ │ -00035210: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>resolve_ex │ │ │ │ -00035230: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -00035240: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00035250: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00035260: 2020 2020 3c73 7061 6e20 636c 6173 733d query │ │ │ │ -00035280: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00035290: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , allow_j │ │ │ │ -000352b0: 6f69 6e73 3c2f 7370 616e 3e3c 7370 616e oins, reuse │ │ │ │ -000352f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00035300: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , summari │ │ │ │ -00035320: 7a65 3c2f 7370 616e 3e3c 7370 616e 2063 ze, for_save. ). retur │ │ │ │ -000353a0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n c.. def copy(< │ │ │ │ -00035410: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ -00035450: 2020 2020 3c73 7061 6e20 636c 6173 733d c = super().copy< │ │ │ │ -000354f0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00035500: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -00035510: 203c 7370 616e 2063 6c61 7373 3d22 6e22 c.cases =< │ │ │ │ -00035570: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> c< │ │ │ │ -00035590: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000355a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 casesFalse. ):. c = se │ │ │ │ +00031e70: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.copy(). c< │ │ │ │ +00031ee0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.is │ │ │ │ +00031f10: 5f73 756d 6d61 7279 3c2f 7370 616e 3e20 _summary │ │ │ │ +00031f20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00031f30: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = summari │ │ │ │ +00031f50: 7a65 3c2f 7370 616e 3e0a 2020 2020 2020 ze. │ │ │ │ +00031f60: 2020 3c73 7061 6e20 636c 6173 733d 226b if has │ │ │ │ +00031f90: 6174 7472 3c2f 7370 616e 3e3c 7370 616e attr(c.condition, &qu │ │ │ │ +00032030: 6f74 3b72 6573 6f6c 7665 5f65 7870 7265 ot;resolve_expre │ │ │ │ +00032040: 7373 696f 6e26 7175 6f74 3b3c 2f73 7061 ssion"):. │ │ │ │ +00032070: 2020 2020 2020 2020 3c73 7061 6e20 636c c │ │ │ │ +00032090: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000320a0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .conditio │ │ │ │ +000320c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n = c.condition.resolv │ │ │ │ +00032160: 655f 6578 7072 6573 7369 6f6e 3c2f 7370 e_expression(. │ │ │ │ +00032190: 2020 2020 2020 2020 2020 2020 3c73 7061 quer │ │ │ │ +000321b0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y, │ │ │ │ +000321d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 allow_joins, reus │ │ │ │ +00032220: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +00032240: 203c 7370 616e 2063 6c61 7373 3d22 6e22 summarize, False │ │ │ │ +00032290: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +000322a0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +000322c0: 2020 2020 203c 7370 616e 2063 6c61 7373 c.result = c.resu │ │ │ │ +00032370: 6c74 3c2f 7370 616e 3e3c 7370 616e 2063 lt.resolve_express │ │ │ │ +000323b0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion(. < │ │ │ │ +000323e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ +000323f0: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery, allow_joins< │ │ │ │ +00032430: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00032450: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +00032460: 6575 7365 3c2f 7370 616e 3e3c 7370 616e euse, summarize, for │ │ │ │ +000324d0: 5f73 6176 653c 2f73 7061 6e3e 0a20 2020 _save. │ │ │ │ +000324e0: 2020 2020 203c 7370 616e 2063 6c61 7373 ). │ │ │ │ +00032500: 2020 2020 2020 3c73 7061 6e20 636c 6173 return c.. │ │ │ │ +00032540: 2020 3c73 7061 6e20 636c 6173 733d 226b def as │ │ │ │ +00032570: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(self< │ │ │ │ +000325b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000325c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ +000325e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00032600: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00032610: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection, templa │ │ │ │ +00032650: 7465 3c2f 7370 616e 3e3c 7370 616e 2063 te=None, **< │ │ │ │ +000326c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +000326d0: 7874 7261 5f63 6f6e 7465 7874 3c2f 7370 xtra_context):. │ │ │ │ +00032700: 2020 2020 203c 7370 616e 2063 6c61 7373 connection< │ │ │ │ +00032720: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.op │ │ │ │ +00032750: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00032770: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00032780: 6368 6563 6b5f 6578 7072 6573 7369 6f6e check_expression │ │ │ │ +00032790: 5f73 7570 706f 7274 3c2f 7370 616e 3e3c _support< │ │ │ │ +000327a0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000327b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self). │ │ │ │ +000327f0: 2020 2020 3c73 7061 6e20 636c 6173 733d template_par │ │ │ │ +00032810: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = extra_contex │ │ │ │ +00032850: 743c 2f73 7061 6e3e 0a20 2020 2020 2020 t. │ │ │ │ +00032860: 203c 7370 616e 2063 6c61 7373 3d22 6e22 sql_params = []. co │ │ │ │ +000328d0: 6e64 6974 696f 6e5f 7371 6c3c 2f73 7061 ndition_sql, condi │ │ │ │ +00032910: 7469 6f6e 5f70 6172 616d 733c 2f73 7061 tion_params = comp │ │ │ │ +00032950: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(self.con │ │ │ │ +000329f0: 6469 7469 6f6e 3c2f 7370 616e 3e3c 7370 dition). te │ │ │ │ +00032a30: 6d70 6c61 7465 5f70 6172 616d 733c 2f73 mplate_params[&qu │ │ │ │ +00032a70: 6f74 3b63 6f6e 6469 7469 6f6e 2671 756f ot;condition&quo │ │ │ │ +00032a80: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;] = condi │ │ │ │ +00032ad0: 7469 6f6e 5f73 716c 3c2f 7370 616e 3e0a tion_sql. │ │ │ │ +00032ae0: 2020 2020 2020 2020 3c73 7061 6e20 636c result_s │ │ │ │ +00032b00: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql, result_params< │ │ │ │ +00032b40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00032b60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00032b70: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ +00032b80: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00032b90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compile(se │ │ │ │ +00032be0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.result)< │ │ │ │ +00032c30: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00032c40: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +00032c50: 656d 706c 6174 655f 7061 7261 6d73 3c2f emplate_params[&q │ │ │ │ +00032c90: 756f 743b 7265 7375 6c74 2671 756f 743b uot;result" │ │ │ │ +00032ca0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ] │ │ │ │ +00032cc0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00032cd0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = result_ │ │ │ │ +00032cf0: 7371 6c3c 2f73 7061 6e3e 0a20 2020 2020 sql. │ │ │ │ +00032d00: 2020 203c 7370 616e 2063 6c61 7373 3d22 template = temp │ │ │ │ +00032d50: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late or< │ │ │ │ +00032d70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.templ │ │ │ │ +00032dc0: 6174 653c 2f73 7061 6e3e 0a20 2020 2020 ate. │ │ │ │ +00032dd0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00032df0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ +00032e10: 203c 7370 616e 2063 6c61 7373 3d22 6f22 % templa │ │ │ │ +00032e40: 7465 5f70 6172 616d 733c 2f73 7061 6e3e te_params │ │ │ │ +00032e50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00032e60: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , (. *< │ │ │ │ +00032ea0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>sql_params │ │ │ │ +00032ec0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ +00032ee0: 2020 2020 2020 2020 2020 2020 3c73 7061 *condition_pa │ │ │ │ +00032f20: 7261 6d73 3c2f 7370 616e 3e3c 7370 616e rams,. │ │ │ │ +00032f50: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00032f60: 2a3c 2f73 7061 6e3e 3c73 7061 6e20 636c *result_p │ │ │ │ +00032f80: 6172 616d 733c 2f73 7061 6e3e 3c73 7061 arams,. ).. def get_group │ │ │ │ +00033000: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ +00033010: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00033020: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ +00033060: 2020 2020 203c 7370 616e 2063 6c61 7373 # This is │ │ │ │ +00033080: 6e6f 7420 6120 636f 6d70 6c65 7465 2065 not a complete e │ │ │ │ +00033090: 7870 7265 7373 696f 6e20 616e 6420 6361 xpression and ca │ │ │ │ +000330a0: 6e6e 6f74 2062 6520 7573 6564 2069 6e20 nnot be used in │ │ │ │ +000330b0: 4752 4f55 5020 4259 2e3c 2f73 7061 6e3e GROUP BY. │ │ │ │ +000330c0: 0a20 2020 2020 2020 203c 7370 616e 2063 . cols = [] │ │ │ │ +00033110: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00033120: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00033130: 666f 723c 2f73 7061 6e3e 203c 7370 616e for sourc │ │ │ │ +00033150: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e in self │ │ │ │ +00033190: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000331a0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .get_sour │ │ │ │ +000331c0: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions():. │ │ │ │ +000331f0: 2020 2020 2020 2020 2020 2020 3c73 7061 cols │ │ │ │ +00033210: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00033230: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00033240: 7874 656e 643c 2f73 7061 6e3e 3c73 7061 xtend(source.get_gro │ │ │ │ +000332b0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols()). │ │ │ │ +000332e0: 2020 2020 3c73 7061 6e20 636c 6173 733d return cols....
    .[documentati │ │ │ │ +000333d0: 655d 3c2f 613e 0a3c 7370 616e 2063 6c61 e].@deconst │ │ │ │ +000333f0: 7275 6374 6962 6c65 3c2f 7370 616e 3e3c ructible< │ │ │ │ +00033400: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00033410: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 path=" │ │ │ │ +00033460: 3b64 6a61 6e67 6f2e 6462 2e6d 6f64 656c ;django.db.model │ │ │ │ +00033470: 732e 4361 7365 2671 756f 743b 3c2f 7370 s.Case").clas │ │ │ │ +000334b0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s Case(SQL │ │ │ │ +00033500: 6974 654e 756d 6572 6963 4d69 7869 6e3c iteNumericMixin< │ │ │ │ +00033510: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00033530: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ +00033540: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +00033550: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00033560: 293a 3c2f 7370 616e 3e0a 3c73 7061 6e20 ):. "&quo │ │ │ │ +000335a0: 743b 2671 756f 743b 3c2f 7370 616e 3e0a t;". │ │ │ │ +000335b0: 3c73 7061 6e20 636c 6173 733d 2273 6422 An SQL sear │ │ │ │ +000335d0: 6368 6564 2043 4153 4520 6578 7072 6573 ched CASE expres │ │ │ │ +000335e0: 7369 6f6e 3a3c 2f73 7061 6e3e 0a0a 3c73 sion:.. │ │ │ │ +00033600: 2020 2020 2020 2043 4153 453c 2f73 7061 CASE. │ │ │ │ +00033630: 5748 454e 206e 2026 6774 3b20 303c 2f73 WHEN n > 0. │ │ │ │ +00033660: 2020 2020 2020 5448 454e 2026 2333 393b THEN ' │ │ │ │ +00033670: 706f 7369 7469 7665 2623 3339 3b3c 2f73 positive'. │ │ │ │ +000336a0: 2020 5748 454e 206e 2026 6c74 3b20 303c WHEN n < 0< │ │ │ │ +000336b0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ +000336d0: 2020 2020 2020 2020 5448 454e 2026 2333 THEN  │ │ │ │ +000336e0: 393b 6e65 6761 7469 7665 2623 3339 3b3c 9;negative'< │ │ │ │ +000336f0: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. │ │ │ │ +00033710: 2020 2020 454c 5345 2026 2333 393b 7a65 ELSE 'ze │ │ │ │ +00033720: 726f 2623 3339 3b3c 2f73 7061 6e3e 0a3c ro'.< │ │ │ │ +00033730: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +00033740: 2020 2020 2020 2020 454e 443c 2f73 7061 END. "&q │ │ │ │ +00033770: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;".. template< │ │ │ │ +000337a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +000337c0: 3c73 7061 6e20 636c 6173 733d 2273 3222 "CASE %(cases)s ELSE %(default)s END" │ │ │ │ +00033860: 3c2f 7370 616e 3e0a 2020 2020 3c73 7061 . case │ │ │ │ +00033880: 5f6a 6f69 6e65 723c 2f73 7061 6e3e 203c _joiner < │ │ │ │ +00033890: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +000338a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c " │ │ │ │ +000338c0: 2671 756f 743b 3c2f 7370 616e 3e0a 0a20 ".. │ │ │ │ +000338d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ +00033900: 5f69 6e69 745f 5f3c 2f73 7061 6e3e 3c73 _init__(< │ │ │ │ +00033920: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, *cases< │ │ │ │ +00033990: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000339a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c default< │ │ │ │ +000339c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ +000339f0: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one, output_field< │ │ │ │ +00033a30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ +00033a60: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one, **extr │ │ │ │ +00033ab0: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a):. if not │ │ │ │ +00033b10: 3c73 7061 6e20 636c 6173 733d 226e 6222 all(isinstance(cas │ │ │ │ +00033b90: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +00033bb0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 When) for │ │ │ │ +00033c00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00033c10: 6361 7365 3c2f 7370 616e 3e20 3c73 7061 case in< │ │ │ │ +00033c30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> cases):. │ │ │ │ +00033c70: 2020 2020 2020 2020 203c 7370 616e 2063 raise TypeError │ │ │ │ +00033cb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00033cd0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00033ce0: 2671 756f 743b 506f 7369 7469 6f6e 616c "Positional │ │ │ │ +00033cf0: 2061 7267 756d 656e 7473 206d 7573 7420 arguments must │ │ │ │ +00033d00: 616c 6c20 6265 2057 6865 6e20 6f62 6a65 all be When obje │ │ │ │ +00033d10: 6374 732e 2671 756f 743b 3c2f 7370 616e cts."). │ │ │ │ +00033d40: 2020 3c73 7061 6e20 636c 6173 733d 226e super< │ │ │ │ +00033d60: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00033d70: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ +00033d90: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __init__ │ │ │ │ +00033db0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00033dc0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (output_f │ │ │ │ +00033de0: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield). sel │ │ │ │ +00033e20: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00033e40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00033e50: 6361 7365 733c 2f73 7061 6e3e 203c 7370 cases = list(cases< │ │ │ │ +00033ec0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +00033ee0: 2020 2020 2020 203c 7370 616e 2063 6c61 self.defau │ │ │ │ +00033f30: 6c74 3c2f 7370 616e 3e20 3c73 7061 6e20 lt = self< │ │ │ │ +00033f70: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00033f80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 _parse_ex │ │ │ │ +00033fa0: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +00033fb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00033fc0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (default< │ │ │ │ +00033fe0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>)[< │ │ │ │ +00034000: 7370 616e 2063 6c61 7373 3d22 6d69 223e span class="mi"> │ │ │ │ +00034010: 303c 2f73 7061 6e3e 3c73 7061 6e20 636c 0] │ │ │ │ +00034030: 0a20 2020 2020 2020 203c 7370 616e 2063 . self.ext │ │ │ │ +00034080: 7261 3c2f 7370 616e 3e20 3c73 7061 6e20 ra = extra. │ │ │ │ +000340c0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +000340e0: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __str__< │ │ │ │ +00034100: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00034110: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ +00034150: 2020 2020 203c 7370 616e 2063 6c61 7373 return "CASE < │ │ │ │ +00034190: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%s │ │ │ │ +000341b0: 3c73 7061 6e20 636c 6173 733d 2273 3222 , ELSE < │ │ │ │ +000341d0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +000341e0: 2572 3c2f 7370 616e 3e3c 7370 616e 2063 %r" │ │ │ │ +00034200: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c % │ │ │ │ +00034220: 203c 7370 616e 2063 6c61 7373 3d22 7022 (. │ │ │ │ +00034240: 2020 2020 2020 3c73 7061 6e20 636c 6173 ", & │ │ │ │ +00034260: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;.join< │ │ │ │ +000342a0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000342b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 str(c) for c < │ │ │ │ +00034350: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +00034360: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in self< │ │ │ │ +00034380: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ca │ │ │ │ +000343b0: 7365 733c 2f73 7061 6e3e 3c73 7061 6e20 ses),. │ │ │ │ +000343e0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.default,. │ │ │ │ +00034450: 2020 203c 7370 616e 2063 6c61 7373 3d22 ).. │ │ │ │ +00034470: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __r │ │ │ │ +000344a0: 6570 725f 5f3c 2f73 7061 6e3e 3c73 7061 epr__(self │ │ │ │ +000344e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000344f0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00034500: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00034520: 3c73 7061 6e20 636c 6173 733d 2273 3222 "<%s: < │ │ │ │ +00034570: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%s │ │ │ │ +00034590: 3c73 7061 6e20 636c 6173 733d 2273 3222 >" % (self │ │ │ │ +00034600: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00034610: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__class │ │ │ │ +00034630: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __.__name__, self< │ │ │ │ +000346a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ +000346c0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +000346e0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +000346f0: 6765 745f 736f 7572 6365 5f65 7870 7265 get_source_expre │ │ │ │ +00034700: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions(self):. │ │ │ │ +00034760: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00034780: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.cases + [self< │ │ │ │ +00034820: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00034830: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 default].. │ │ │ │ +00034870: 2020 203c 7370 616e 2063 6c61 7373 3d22 def s │ │ │ │ +000348a0: 6574 5f73 6f75 7263 655f 6578 7072 6573 et_source_expres │ │ │ │ +000348b0: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions(self │ │ │ │ +000348f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00034900: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , exprs):. │ │ │ │ +00034940: 2020 2020 2020 203c 7370 616e 2063 6c61 *< │ │ │ │ +00034960: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00034970: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.cases< │ │ │ │ +000349b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +000349c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.defa │ │ │ │ +00034a10: 756c 743c 2f73 7061 6e3e 203c 7370 616e ult = exprs │ │ │ │ +00034a50: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00034a70: 203c 7370 616e 2063 6c61 7373 3d22 6e66 resolve_expres │ │ │ │ +00034a90: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion(. sel │ │ │ │ +00034ad0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +00034af0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 query=None, allow_ │ │ │ │ +00034b70: 6a6f 696e 733c 2f73 7061 6e3e 3c73 7061 joins=True │ │ │ │ +00034bb0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00034bc0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , reuse=No │ │ │ │ +00034c10: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne, summarize=False │ │ │ │ +00034c80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00034ca0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00034cb0: 666f 725f 7361 7665 3c2f 7370 616e 3e3c for_save< │ │ │ │ +00034cc0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00034cd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 False. ):. c = se │ │ │ │ +00034d60: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.copy(). c< │ │ │ │ +00034dd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.is │ │ │ │ +00034e00: 5f73 756d 6d61 7279 3c2f 7370 616e 3e20 _summary │ │ │ │ +00034e10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00034e20: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = summari │ │ │ │ +00034e40: 7a65 3c2f 7370 616e 3e0a 2020 2020 2020 ze. │ │ │ │ +00034e50: 2020 3c73 7061 6e20 636c 6173 733d 226b for pos │ │ │ │ +00034e80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00034ea0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00034eb0: 6361 7365 3c2f 7370 616e 3e20 3c73 7061 case in< │ │ │ │ +00034ed0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> enumerat │ │ │ │ +00034ef0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +00034f10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00034f20: 633c 2f73 7061 6e3e 3c73 7061 6e20 636c c. │ │ │ │ +00034f40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00034f50: 6361 7365 733c 2f73 7061 6e3e 3c73 7061 cases):. │ │ │ │ +00034f80: 2020 3c73 7061 6e20 636c 6173 733d 226e c.cases[< │ │ │ │ +00034fe0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>pos │ │ │ │ +00035000: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00035010: 5d3c 2f73 7061 6e3e 203c 7370 616e 2063 ] = case.resolve_exp │ │ │ │ +00035080: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression(< │ │ │ │ +000350a0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +000350b0: 2020 2020 2020 203c 7370 616e 2063 6c61 query, allo │ │ │ │ +00035100: 775f 6a6f 696e 733c 2f73 7061 6e3e 3c73 w_joins,< │ │ │ │ +00035120: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> reuse, summ │ │ │ │ +00035170: 6172 697a 653c 2f73 7061 6e3e 3c73 7061 arize, for_save. │ │ │ │ +000351c0: 203c 7370 616e 2063 6c61 7373 3d22 7022 ). │ │ │ │ +000351e0: 2020 3c73 7061 6e20 636c 6173 733d 226e c.default │ │ │ │ +00035230: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = c.defaul │ │ │ │ +00035290: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t. │ │ │ │ +000352b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000352c0: 7265 736f 6c76 655f 6578 7072 6573 7369 resolve_expressi │ │ │ │ +000352d0: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on(. qu │ │ │ │ +00035310: 6572 793c 2f73 7061 6e3e 3c73 7061 6e20 ery, allow_joins, re │ │ │ │ +00035380: 7573 653c 2f73 7061 6e3e 3c73 7061 6e20 use, summarize, for_ │ │ │ │ +000353f0: 7361 7665 3c2f 7370 616e 3e0a 2020 2020 save. │ │ │ │ +00035400: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +00035420: 2020 2020 203c 7370 616e 2063 6c61 7373 return c.. │ │ │ │ +00035460: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def cop │ │ │ │ +00035490: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y( │ │ │ │ +000354b0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. c< │ │ │ │ +00035500: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00035520: 3c73 7061 6e20 636c 6173 733d 226e 6222 super()< │ │ │ │ +00035550: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ +00035580: 7079 3c2f 7370 616e 3e3c 7370 616e 2063 py(). c[:]. │ │ │ │ -000355e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return c.. │ │ │ │ -00035620: 2020 3c73 7061 6e20 636c 6173 733d 226b def as │ │ │ │ -00035650: 5f73 716c 3c2f 7370 616e 3e3c 7370 616e _sql(. sel │ │ │ │ -00035690: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ -000356b0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 compiler │ │ │ │ -000356d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000356e0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , connect │ │ │ │ -00035700: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion, template=None< │ │ │ │ -00035770: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00035790: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -000357a0: 6173 655f 6a6f 696e 6572 3c2f 7370 616e ase_joiner=None, ** │ │ │ │ -00035810: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extra_con │ │ │ │ -00035830: 7465 7874 3c2f 7370 616e 3e0a 2020 2020 text. │ │ │ │ -00035840: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00035850: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -00035860: 2020 3c73 7061 6e20 636c 6173 733d 226e connection.ops.che │ │ │ │ -000358e0: 636b 5f65 7870 7265 7373 696f 6e5f 7375 ck_expression_su │ │ │ │ -000358f0: 7070 6f72 743c 2f73 7061 6e3e 3c73 7061 pport(self │ │ │ │ -00035930: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00035940: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -00035950: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if not< │ │ │ │ -00035980: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.cases │ │ │ │ -000359d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -000359f0: 2020 2020 2020 2020 2020 2020 3c73 7061 retu │ │ │ │ -00035a10: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn compil │ │ │ │ -00035a30: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.compile< │ │ │ │ -00035a70: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00035a80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.defau │ │ │ │ -00035ad0: 6c74 3c2f 7370 616e 3e3c 7370 616e 2063 lt). templa │ │ │ │ -00035b10: 7465 5f70 6172 616d 733c 2f73 7061 6e3e te_params │ │ │ │ -00035b20: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = {**self │ │ │ │ -00035b80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00035ba0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -00035bb0: 7874 7261 3c2f 7370 616e 3e3c 7370 616e xtra,.cases │ │ │ │ +000355f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +00035610: 203c 7370 616e 2063 6c61 7373 3d22 6e22 c.cases[:] │ │ │ │ +00035670: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00035680: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00035690: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return c< │ │ │ │ +000356b0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +000356d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> as_sql(. │ │ │ │ +00035710: 2020 2020 2020 3c73 7061 6e20 636c 6173 self, compi │ │ │ │ +00035760: 6c65 723c 2f73 7061 6e3e 3c73 7061 6e20 ler, connection, tem │ │ │ │ +000357d0: 706c 6174 653c 2f73 7061 6e3e 3c73 7061 plate=None │ │ │ │ +00035810: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00035820: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , case_jo │ │ │ │ +00035840: 696e 6572 3c2f 7370 616e 3e3c 7370 616e iner=None< │ │ │ │ +00035880: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00035890: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c **extra_context. ):. conn │ │ │ │ +00035910: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.ops< │ │ │ │ +00035950: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00035960: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 check_exp │ │ │ │ +00035980: 7265 7373 696f 6e5f 7375 7070 6f72 743c ression_support< │ │ │ │ +00035990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +000359c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf). if not │ │ │ │ +00035a20: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.cases:. │ │ │ │ +00035a90: 2020 2020 2020 3c73 7061 6e20 636c 6173 return compiler.compi │ │ │ │ +00035b00: 6c65 3c2f 7370 616e 3e3c 7370 616e 2063 le(self.default). │ │ │ │ +00035b90: 2020 2020 3c73 7061 6e20 636c 6173 733d template_par │ │ │ │ +00035bb0: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = **ext │ │ │ │ -00035c00: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context}. │ │ │ │ -00035c30: 2020 3c73 7061 6e20 636c 6173 733d 226e case_parts = []< │ │ │ │ -00035c80: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00035c90: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -00035ca0: 716c 5f70 6172 616d 733c 2f73 7061 6e3e ql_params │ │ │ │ -00035cb0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = []. defa │ │ │ │ -00035d00: 756c 745f 7371 6c3c 2f73 7061 6e3e 3c73 ult_sql,< │ │ │ │ -00035d20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> default_p │ │ │ │ -00035d40: 6172 616d 733c 2f73 7061 6e3e 203c 7370 arams = compiler.com │ │ │ │ -00035db0: 7069 6c65 3c2f 7370 616e 3e3c 7370 616e pile(self< │ │ │ │ -00035df0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00035e00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 default). │ │ │ │ -00035e40: 2020 2020 2020 3c73 7061 6e20 636c 6173 for │ │ │ │ -00035e60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 case in │ │ │ │ -00035e90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.case │ │ │ │ -00035ee0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s: │ │ │ │ -00035f00: 0a20 2020 2020 2020 2020 2020 203c 7370 . try │ │ │ │ -00035f20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -00035f40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00035f50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00035f60: 6361 7365 5f73 716c 3c2f 7370 616e 3e3c case_sql< │ │ │ │ -00035f70: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00035f80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c case_par │ │ │ │ -00035fa0: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = compiler.compi │ │ │ │ -00036010: 6c65 3c2f 7370 616e 3e3c 7370 616e 2063 le(case). │ │ │ │ -00036070: 203c 7370 616e 2063 6c61 7373 3d22 6b22 except < │ │ │ │ -00036090: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ -000360a0: 6d70 7479 5265 7375 6c74 5365 743c 2f73 mptyResultSet:. │ │ │ │ -000360d0: 2020 2020 2020 2020 2020 2020 203c 7370 con │ │ │ │ -000360f0: 7469 6e75 653c 2f73 7061 6e3e 0a20 2020 tinue. │ │ │ │ -00036100: 2020 2020 2020 2020 203c 7370 616e 2063 except< │ │ │ │ -00036120: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> FullResul │ │ │ │ -00036140: 7453 6574 3c2f 7370 616e 3e3c 7370 616e tSet:. │ │ │ │ -00036170: 2020 2020 3c73 7061 6e20 636c 6173 733d default_sql< │ │ │ │ -00036190: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000361b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ -000361c0: 6566 6175 6c74 5f70 6172 616d 733c 2f73 efault_params = co │ │ │ │ -00036200: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler.compile(case< │ │ │ │ -00036270: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.re │ │ │ │ -000362a0: 7375 6c74 3c2f 7370 616e 3e3c 7370 616e sult). │ │ │ │ -000362d0: 2020 2020 3c73 7061 6e20 636c 6173 733d break │ │ │ │ -000362f0: 0a20 2020 2020 2020 2020 2020 203c 7370 . cas │ │ │ │ -00036310: 655f 7061 7274 733c 2f73 7061 6e3e 3c73 e_parts.< │ │ │ │ -00036330: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>append(case_ │ │ │ │ -00036380: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql). < │ │ │ │ -000363b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -000363c0: 716c 5f70 6172 616d 733c 2f73 7061 6e3e ql_params │ │ │ │ -000363d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000363e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .extend{**self.extra, ** │ │ │ │ +00035c80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extra_con │ │ │ │ +00035ca0: 7465 7874 3c2f 7370 616e 3e3c 7370 616e text}. case │ │ │ │ +00035ce0: 5f70 6172 7473 3c2f 7370 616e 3e20 3c73 _parts =< │ │ │ │ +00035d00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [] │ │ │ │ +00035d20: 0a20 2020 2020 2020 203c 7370 616e 2063 . sql_par │ │ │ │ +00035d40: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = []. │ │ │ │ +00035d80: 2020 2020 2020 3c73 7061 6e20 636c 6173 default_sq │ │ │ │ +00035da0: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l, │ │ │ │ +00035dc0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 default_params< │ │ │ │ +00035de0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +00035e00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00035e10: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ +00035e20: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00035e30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compile(se │ │ │ │ +00035e80: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.default< │ │ │ │ +00035ec0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00035ed0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00035ee0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00035ef0: 666f 723c 2f73 7061 6e3e 203c 7370 616e for case< │ │ │ │ +00035f10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> in self.< │ │ │ │ +00035f60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>cases:. │ │ │ │ +00035fa0: 2020 2020 2020 203c 7370 616e 2063 6c61 try:. │ │ │ │ +00035fe0: 2020 2020 2020 2020 2020 3c73 7061 6e20 case_s │ │ │ │ +00036000: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql, case_params = co │ │ │ │ +00036070: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler.compile(case< │ │ │ │ +000360e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +00036100: 2020 2020 2020 2020 2020 203c 7370 616e excep │ │ │ │ +00036120: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t EmptyRe │ │ │ │ +00036140: 7375 6c74 5365 743c 2f73 7061 6e3e 3c73 sultSet:< │ │ │ │ +00036160: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00036170: 2020 2020 2020 203c 7370 616e 2063 6c61 continue< │ │ │ │ +00036190: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +000361a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 except │ │ │ │ +000361c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 FullResultSet:. │ │ │ │ +00036200: 2020 2020 2020 2020 2020 2020 2020 3c73 de │ │ │ │ +00036220: 6661 756c 745f 7371 6c3c 2f73 7061 6e3e fault_sql │ │ │ │ +00036230: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00036240: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , default │ │ │ │ +00036260: 5f70 6172 616d 733c 2f73 7061 6e3e 203c _params < │ │ │ │ +00036270: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00036280: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c compiler │ │ │ │ +000362a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000362c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +000362d0: 6f6d 7069 6c65 3c2f 7370 616e 3e3c 7370 ompile(case │ │ │ │ +00036310: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00036320: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .result). │ │ │ │ +00036360: 2020 2020 2020 2020 2020 2020 2020 3c73 br │ │ │ │ +00036380: 6561 6b3c 2f73 7061 6e3e 0a20 2020 2020 eak. │ │ │ │ +00036390: 2020 2020 2020 203c 7370 616e 2063 6c61 case_part │ │ │ │ +000363b0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +000363d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000363e0: 6170 7065 6e64 3c2f 7370 616e 3e3c 7370 append((cas │ │ │ │ -00036430: 655f 7061 7261 6d73 3c2f 7370 616e 3e3c e_params< │ │ │ │ -00036440: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00036450: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00036460: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00036470: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if not case_parts │ │ │ │ +00036410: 3d22 6e22 3e63 6173 655f 7371 6c3c 2f73 ="n">case_sql). │ │ │ │ +00036440: 2020 2020 2020 2020 203c 7370 616e 2063 sql_par │ │ │ │ +00036460: 616d 733c 2f73 7061 6e3e 3c73 7061 6e20 ams.extend< │ │ │ │ +000364a0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ 000364b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -000364d0: 2020 2020 2020 2020 2020 2020 3c73 7061 retu │ │ │ │ -000364f0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn defaul │ │ │ │ -00036510: 745f 7371 6c3c 2f73 7061 6e3e 3c73 7061 t_sql, default_par │ │ │ │ -00036550: 616d 733c 2f73 7061 6e3e 0a20 2020 2020 ams. │ │ │ │ -00036560: 2020 203c 7370 616e 2063 6c61 7373 3d22 case_joiner = < │ │ │ │ -000365a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -000365b0: 6173 655f 6a6f 696e 6572 3c2f 7370 616e ase_joiner or se │ │ │ │ -000365f0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.case_joiner. temp │ │ │ │ -00036650: 6c61 7465 5f70 6172 616d 733c 2f73 7061 late_params[" │ │ │ │ -00036690: 3b63 6173 6573 2671 756f 743b 3c2f 7370 ;cases"] = case_joiner │ │ │ │ -000366f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00036710: 7370 616e 2063 6c61 7373 3d22 6e22 3e6a span class="n">j │ │ │ │ -00036720: 6f69 6e3c 2f73 7061 6e3e 3c73 7061 6e20 oin(case_parts). │ │ │ │ -00036780: 2020 2020 3c73 7061 6e20 636c 6173 733d template_par │ │ │ │ -000367a0: 616d 733c 2f73 7061 6e3e 3c73 7061 6e20 ams["default │ │ │ │ -000367e0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "] = < │ │ │ │ -00036820: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ -00036830: 6566 6175 6c74 5f73 716c 3c2f 7370 616e efault_sql. sql_pa │ │ │ │ -00036860: 7261 6d73 3c2f 7370 616e 3e3c 7370 616e rams.extend │ │ │ │ -000368a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000368b0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (default_ │ │ │ │ -000368d0: 7061 7261 6d73 3c2f 7370 616e 3e3c 7370 params). te │ │ │ │ -00036910: 6d70 6c61 7465 3c2f 7370 616e 3e20 3c73 mplate =< │ │ │ │ -00036930: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> template< │ │ │ │ -00036950: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> or template_param │ │ │ │ -00036990: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -000369b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000369c0: 6765 743c 2f73 7061 6e3e 3c73 7061 6e20 get("templat │ │ │ │ -00036a00: 6526 7175 6f74 3b3c 2f73 7061 6e3e 3c73 e",< │ │ │ │ -00036a20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.templ │ │ │ │ -00036a70: 6174 653c 2f73 7061 6e3e 3c73 7061 6e20 ate). sql = < │ │ │ │ -00036ad0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ -00036ae0: 656d 706c 6174 653c 2f73 7061 6e3e 203c emplate < │ │ │ │ -00036af0: 7370 616e 2063 6c61 7373 3d22 6f22 3e25 span class="o">% │ │ │ │ -00036b00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ -00036b20: 5f70 6172 616d 733c 2f73 7061 6e3e 0a20 _params. │ │ │ │ -00036b30: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -00036b50: 203c 7370 616e 2063 6c61 7373 3d22 6270 self._output_fie │ │ │ │ -00036ba0: 6c64 5f6f 725f 6e6f 6e65 3c2f 7370 616e ld_or_none is no │ │ │ │ -00036be0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t None:. │ │ │ │ -00036c20: 2020 2020 2020 2020 2020 3c73 7061 6e20 sql = co │ │ │ │ -00036c70: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -00036c80: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00036c90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ops.unifica │ │ │ │ -00036ce0: 7469 6f6e 5f63 6173 745f 7371 6c3c 2f73 tion_cast_sql(sel │ │ │ │ -00036d20: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00036d40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00036d50: 6f75 7470 7574 5f66 6965 6c64 3c2f 7370 output_fieldcase_para │ │ │ │ +000364d0: 6d73 3c2f 7370 616e 3e3c 7370 616e 2063 ms). if not │ │ │ │ +00036530: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00036540: 6361 7365 5f70 6172 7473 3c2f 7370 616e case_parts:. │ │ │ │ +00036570: 2020 2020 2020 3c73 7061 6e20 636c 6173 return default_sql< │ │ │ │ +000365b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +000365d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e64 span class="n">d │ │ │ │ +000365e0: 6566 6175 6c74 5f70 6172 616d 733c 2f73 efault_params. cas │ │ │ │ +00036610: 655f 6a6f 696e 6572 3c2f 7370 616e 3e20 e_joiner │ │ │ │ +00036620: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00036630: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = case_jo │ │ │ │ +00036650: 696e 6572 3c2f 7370 616e 3e20 3c73 7061 iner or< │ │ │ │ +00036670: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.case_ │ │ │ │ +000366c0: 6a6f 696e 6572 3c2f 7370 616e 3e0a 2020 joiner. │ │ │ │ +000366d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 template_p │ │ │ │ +000366f0: 6172 616d 733c 2f73 7061 6e3e 3c73 7061 arams["cases │ │ │ │ +00036730: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "] = < │ │ │ │ +00036770: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00036780: 6173 655f 6a6f 696e 6572 3c2f 7370 616e ase_joiner.join(case │ │ │ │ +000367f0: 5f70 6172 7473 3c2f 7370 616e 3e3c 7370 _parts). te │ │ │ │ +00036830: 6d70 6c61 7465 5f70 6172 616d 733c 2f73 mplate_params[&qu │ │ │ │ +00036870: 6f74 3b64 6566 6175 6c74 2671 756f 743b ot;default" │ │ │ │ +00036880: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ] │ │ │ │ +000368a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000368b0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = default │ │ │ │ +000368d0: 5f73 716c 3c2f 7370 616e 3e0a 2020 2020 _sql. │ │ │ │ +000368e0: 2020 2020 3c73 7061 6e20 636c 6173 733d sql_params.ext │ │ │ │ +00036930: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end(default_params │ │ │ │ +00036970: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00036990: 2020 2020 2020 2020 3c73 7061 6e20 636c template │ │ │ │ +000369b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +000369d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ +000369f0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 or temp │ │ │ │ +00036a20: 6c61 7465 5f70 6172 616d 733c 2f73 7061 late_params.get(&qu │ │ │ │ +00036a90: 6f74 3b74 656d 706c 6174 6526 7175 6f74 ot;template" │ │ │ │ +00036aa0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;, │ │ │ │ +00036ac0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.template). │ │ │ │ +00036b30: 2020 2020 203c 7370 616e 2063 6c61 7373 sql │ │ │ │ +00036b50: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00036b60: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = templat │ │ │ │ +00036b80: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e % template_param │ │ │ │ +00036bc0: 733c 2f73 7061 6e3e 0a20 2020 2020 2020 s. │ │ │ │ +00036bd0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ +00036c00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00036c20: 7370 616e 2063 6c61 7373 3d22 6e22 3e5f span class="n">_ │ │ │ │ +00036c30: 6f75 7470 7574 5f66 6965 6c64 5f6f 725f output_field_or_ │ │ │ │ +00036c40: 6e6f 6e65 3c2f 7370 616e 3e20 3c73 7061 none is< │ │ │ │ +00036c60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> not None< │ │ │ │ +00036ca0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00036cb0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00036cc0: 2020 2020 3c73 7061 6e20 636c 6173 733d sql < │ │ │ │ +00036ce0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00036cf0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ +00036d10: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.ops.) % sql. │ │ │ │ -00036db0: 2020 2020 2020 2020 3c73 7061 6e20 636c return sql │ │ │ │ -00036df0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00036e00: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , sql_par │ │ │ │ -00036e20: 616d 733c 2f73 7061 6e3e 0a0a 2020 2020 ams.. │ │ │ │ -00036e30: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00036e40: 6465 663c 2f73 7061 6e3e 203c 7370 616e def get_ │ │ │ │ -00036e60: 6772 6f75 705f 6279 5f63 6f6c 733c 2f73 group_by_cols(sel │ │ │ │ -00036ea0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f):. if not │ │ │ │ -00036f00: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.cases │ │ │ │ -00036f50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00036f60: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00036f70: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ -00036fb0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00036fc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 default.get │ │ │ │ -00037010: 5f67 726f 7570 5f62 795f 636f 6c73 3c2f _group_by_cols(). │ │ │ │ -00037040: 2020 2020 2020 203c 7370 616e 2063 6c61 return super().get_group_by_ │ │ │ │ -000370d0: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols()
    .....[docs].class < │ │ │ │ -000371c0: 7370 616e 2063 6c61 7373 3d22 6e63 223e span class="nc"> │ │ │ │ -000371d0: 5375 6271 7565 7279 3c2f 7370 616e 3e3c Subquery< │ │ │ │ -000371e0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000371f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 BaseExpre │ │ │ │ -00037210: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion, Combinable< │ │ │ │ -00037250: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00037270: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ -00037280: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ -000372a0: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". An ex │ │ │ │ -000372d0: 706c 6963 6974 2073 7562 7175 6572 792e plicit subquery. │ │ │ │ -000372e0: 2049 7420 6d61 7920 636f 6e74 6169 6e20 It may contain │ │ │ │ -000372f0: 4f75 7465 7252 6566 2829 2072 6566 6572 OuterRef() refer │ │ │ │ -00037300: 656e 6365 7320 746f 2074 6865 206f 7574 ences to the out │ │ │ │ -00037310: 6572 3c2f 7370 616e 3e0a 3c73 7061 6e20 er. q │ │ │ │ -00037330: 7565 7279 2077 6869 6368 2077 696c 6c20 uery which will │ │ │ │ -00037340: 6265 2072 6573 6f6c 7665 6420 7768 656e be resolved when │ │ │ │ -00037350: 2069 7420 6973 2061 7070 6c69 6564 2074 it is applied t │ │ │ │ -00037360: 6f20 7468 6174 2071 7565 7279 2e3c 2f73 o that query.. " │ │ │ │ -00037390: 2671 756f 743b 2671 756f 743b 3c2f 7370 "".. templat │ │ │ │ -000373c0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = "(%(subquery)s)". contain │ │ │ │ -00037460: 735f 6167 6772 6567 6174 653c 2f73 7061 s_aggregate = Fal │ │ │ │ -000374a0: 7365 3c2f 7370 616e 3e0a 2020 2020 3c73 se. em │ │ │ │ -000374c0: 7074 795f 7265 7375 6c74 5f73 6574 5f76 pty_result_set_v │ │ │ │ -000374d0: 616c 7565 3c2f 7370 616e 3e20 3c73 7061 alue = None. subquery = < │ │ │ │ -00037550: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -00037560: 5472 7565 3c2f 7370 616e 3e0a 0a20 2020 True.. │ │ │ │ -00037570: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __i │ │ │ │ -000375a0: 6e69 745f 5f3c 2f73 7061 6e3e 3c73 7061 nit__(self │ │ │ │ -000375e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000375f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , queryse │ │ │ │ -00037610: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ -00037630: 203c 7370 616e 2063 6c61 7373 3d22 6e22 output_field=Non │ │ │ │ -00037680: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -000376a0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **extra< │ │ │ │ -000376d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -000376f0: 2020 2020 2020 2020 3c73 7061 6e20 636c # Allow │ │ │ │ -00037710: 2074 6865 2075 7361 6765 206f 6620 626f the usage of bo │ │ │ │ -00037720: 7468 2051 7565 7279 5365 7420 616e 6420 th QuerySet and │ │ │ │ -00037730: 7371 6c2e 5175 6572 7920 6f62 6a65 6374 sql.Query object │ │ │ │ -00037740: 732e 3c2f 7370 616e 3e0a 2020 2020 2020 s.. │ │ │ │ -00037750: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -00037780: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>query = get │ │ │ │ -000377d0: 6174 7472 3c2f 7370 616e 3e3c 7370 616e attr(queryset, &quo │ │ │ │ -00037840: 743b 7175 6572 7926 7175 6f74 3b3c 2f73 t;query", que │ │ │ │ -00037880: 7279 7365 743c 2f73 7061 6e3e 3c73 7061 ryset).clon │ │ │ │ -000378d0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e(). self< │ │ │ │ -00037910: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.qu │ │ │ │ -00037940: 6572 793c 2f73 7061 6e3e 3c73 7061 6e20 ery.subquery = True │ │ │ │ -000379b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000379c0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.extra │ │ │ │ -00037a10: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = extra< │ │ │ │ -00037a40: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00037a50: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -00037a60: 7375 7065 723c 2f73 7061 6e3e 3c73 7061 super().__ │ │ │ │ -00037ab0: 696e 6974 5f5f 3c2f 7370 616e 3e3c 7370 init__(output_fiel │ │ │ │ -00037af0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d) │ │ │ │ -00037b10: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00037b30: 203c 7370 616e 2063 6c61 7373 3d22 6e66 get_source_exp │ │ │ │ -00037b50: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ +00036d70: 6e22 3e75 6e69 6669 6361 7469 6f6e 5f63 n">unification_c │ │ │ │ +00036d80: 6173 745f 7371 6c3c 2f73 7061 6e3e 3c73 ast_sql(< │ │ │ │ +00036da0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.output │ │ │ │ +00036df0: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field) % < │ │ │ │ +00036e30: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00036e40: 716c 3c2f 7370 616e 3e0a 2020 2020 2020 ql. │ │ │ │ +00036e50: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00036e70: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00036e80: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, sql_params.. def get_group_ │ │ │ │ +00036f00: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols(< │ │ │ │ +00036f20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ +00036f60: 2020 2020 3c73 7061 6e20 636c 6173 733d if n │ │ │ │ +00036f90: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot self< │ │ │ │ +00036fb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ca │ │ │ │ +00036fe0: 7365 733c 2f73 7061 6e3e 3c73 7061 6e20 ses:. < │ │ │ │ +00037010: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00037020: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn se │ │ │ │ +00037040: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.default< │ │ │ │ +00037080: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00037090: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_group │ │ │ │ +000370b0: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ +000370c0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +000370d0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +000370e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00037100: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +00037110: 7375 7065 723c 2f73 7061 6e3e 3c73 7061 super().get │ │ │ │ +00037160: 5f67 726f 7570 5f62 795f 636f 6c73 3c2f _group_by_cols()....
    .[documentatie]< │ │ │ │ +00037240: 2f61 3e0a 3c73 7061 6e20 636c 6173 733d /a>.class │ │ │ │ +00037260: 203c 7370 616e 2063 6c61 7373 3d22 6e63 Subquery(BaseExp │ │ │ │ +000372b0: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression,< │ │ │ │ +000372d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Combinabl │ │ │ │ +000372f0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e):. &q │ │ │ │ +00037340: 756f 743b 2671 756f 743b 2671 756f 743b uot;"" │ │ │ │ +00037350: 3c2f 7370 616e 3e0a 3c73 7061 6e20 636c . An │ │ │ │ +00037370: 6578 706c 6963 6974 2073 7562 7175 6572 explicit subquer │ │ │ │ +00037380: 792e 2049 7420 6d61 7920 636f 6e74 6169 y. It may contai │ │ │ │ +00037390: 6e20 4f75 7465 7252 6566 2829 2072 6566 n OuterRef() ref │ │ │ │ +000373a0: 6572 656e 6365 7320 746f 2074 6865 206f erences to the o │ │ │ │ +000373b0: 7574 6572 3c2f 7370 616e 3e0a 3c73 7061 uter. │ │ │ │ +000373d0: 2071 7565 7279 2077 6869 6368 2077 696c query which wil │ │ │ │ +000373e0: 6c20 6265 2072 6573 6f6c 7665 6420 7768 l be resolved wh │ │ │ │ +000373f0: 656e 2069 7420 6973 2061 7070 6c69 6564 en it is applied │ │ │ │ +00037400: 2074 6f20 7468 6174 2071 7565 7279 2e3c to that query.< │ │ │ │ +00037410: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>. &quo │ │ │ │ +00037430: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"".. templ │ │ │ │ +00037460: 6174 653c 2f73 7061 6e3e 203c 7370 616e ate = "(%(subquery)s │ │ │ │ +000374c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 )"< │ │ │ │ +000374e0: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. conta │ │ │ │ +00037500: 696e 735f 6167 6772 6567 6174 653c 2f73 ins_aggregate = F │ │ │ │ +00037540: 616c 7365 3c2f 7370 616e 3e0a 2020 2020 alse. │ │ │ │ +00037550: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00037560: 656d 7074 795f 7265 7375 6c74 5f73 6574 empty_result_set │ │ │ │ +00037570: 5f76 616c 7565 3c2f 7370 616e 3e20 3c73 _value =< │ │ │ │ +00037590: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None. subquery │ │ │ │ +000375d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +000375f0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 True.. │ │ │ │ +00037610: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ +00037640: 5f69 6e69 745f 5f3c 2f73 7061 6e3e 3c73 _init__(< │ │ │ │ +00037660: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, query │ │ │ │ +000376b0: 7365 743c 2f73 7061 6e3e 3c73 7061 6e20 set, output_field< │ │ │ │ +000376f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ +00037720: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one, **extr │ │ │ │ +00037770: 613c 2f73 7061 6e3e 3c73 7061 6e20 636c a):. # All │ │ │ │ +000377b0: 6f77 2074 6865 2075 7361 6765 206f 6620 ow the usage of │ │ │ │ +000377c0: 626f 7468 2051 7565 7279 5365 7420 616e both QuerySet an │ │ │ │ +000377d0: 6420 7371 6c2e 5175 6572 7920 6f62 6a65 d sql.Query obje │ │ │ │ +000377e0: 6374 732e 3c2f 7370 616e 3e0a 2020 2020 cts.. │ │ │ │ +000377f0: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +00037810: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00037820: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .query = g │ │ │ │ +00037870: 6574 6174 7472 3c2f 7370 616e 3e3c 7370 etattr(queryset, &q │ │ │ │ +000378e0: 756f 743b 7175 6572 7926 7175 6f74 3b3c uot;query"< │ │ │ │ +000378f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00037910: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ +00037920: 7565 7279 7365 743c 2f73 7061 6e3e 3c73 ueryset)< │ │ │ │ +00037940: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.cl │ │ │ │ +00037970: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one(). sel │ │ │ │ +000379b0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000379d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000379e0: 7175 6572 793c 2f73 7061 6e3e 3c73 7061 query.subquery = Tr │ │ │ │ +00037a50: 7565 3c2f 7370 616e 3e0a 2020 2020 2020 ue. │ │ │ │ +00037a60: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ +00037a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>extra = extr │ │ │ │ +00037ae0: 613c 2f73 7061 6e3e 0a20 2020 2020 2020 a. │ │ │ │ +00037af0: 203c 7370 616e 2063 6c61 7373 3d22 6e62 super() │ │ │ │ +00037b20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00037b40: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ +00037b50: 5f5f 696e 6974 5f5f 3c2f 7370 616e 3e3c __init__< │ │ │ │ 00037b60: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ 00037b70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -00037bb0: 2020 2020 203c 7370 616e 2063 6c61 7373 returnoutput_fi │ │ │ │ +00037b90: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld).. def [self │ │ │ │ -00037c00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00037c20: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ -00037c30: 7565 7279 3c2f 7370 616e 3e3c 7370 616e uery].. def set_source_ │ │ │ │ -00037c90: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(self< │ │ │ │ -00037cd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00037cf0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -00037d00: 7870 7273 3c2f 7370 616e 3e3c 7370 616e xprs):. se │ │ │ │ -00037d40: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.query =< │ │ │ │ -00037d90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> exprs[0].. │ │ │ │ -00037e00: 2020 3c73 7061 6e20 636c 6173 733d 226b def _r │ │ │ │ -00037e30: 6573 6f6c 7665 5f6f 7574 7075 745f 6669 esolve_output_fi │ │ │ │ -00037e40: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld(self): │ │ │ │ -00037e90: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00037ea0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00037eb0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return s │ │ │ │ -00037ed0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.query.< │ │ │ │ -00037f20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>output_fie │ │ │ │ -00037f40: 6c64 3c2f 7370 616e 3e0a 0a20 2020 203c ld.. < │ │ │ │ -00037f50: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -00037f60: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef copy< │ │ │ │ -00037f80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00037fb0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. clon │ │ │ │ -00037ff0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = super< │ │ │ │ -00038030: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00038040: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ -00038060: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00038070: 636f 7079 3c2f 7370 616e 3e3c 7370 616e copy(). clo │ │ │ │ -000380b0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne.query =< │ │ │ │ -00038100: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> clone.query │ │ │ │ -00038150: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00038170: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00038180: 6c6f 6e65 3c2f 7370 616e 3e3c 7370 616e lone(). ret │ │ │ │ -000381c0: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn clone │ │ │ │ -000381e0: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. @p │ │ │ │ -00038200: 726f 7065 7274 793c 2f73 7061 6e3e 0a20 roperty. │ │ │ │ -00038210: 2020 203c 7370 616e 2063 6c61 7373 3d22 def e │ │ │ │ -00038240: 7874 6572 6e61 6c5f 616c 6961 7365 733c xternal_aliases< │ │ │ │ -00038250: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00038280: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. retu │ │ │ │ -000382c0: 726e 3c2f 7370 616e 3e20 3c73 7061 6e20 rn self< │ │ │ │ -000382e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.qu │ │ │ │ -00038310: 6572 793c 2f73 7061 6e3e 3c73 7061 6e20 ery.external_alias │ │ │ │ -00038350: 6573 3c2f 7370 616e 3e0a 0a20 2020 203c es.. < │ │ │ │ -00038360: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -00038370: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef get_e │ │ │ │ -00038390: 7874 6572 6e61 6c5f 636f 6c73 3c2f 7370 xternal_cols(self │ │ │ │ -000383d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -000383f0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -00038410: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.query │ │ │ │ -00038460: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00038480: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ -00038490: 6574 5f65 7874 6572 6e61 6c5f 636f 6c73 et_external_cols │ │ │ │ -000384a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ -000384c0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -000384e0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sql< │ │ │ │ -00038500: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00038510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, comp │ │ │ │ -00038560: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler, connection, te │ │ │ │ -000385d0: 6d70 6c61 7465 3c2f 7370 616e 3e3c 7370 mplate=None, **extra_context │ │ │ │ -00038660: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -00038680: 0a20 2020 2020 2020 203c 7370 616e 2063 . connect │ │ │ │ -000386a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.ops.check_expres │ │ │ │ -00038710: 7369 6f6e 5f73 7570 706f 7274 3c2f 7370 sion_support(self │ │ │ │ -00038750: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00038770: 2020 2020 2020 2020 3c73 7061 6e20 636c template │ │ │ │ -00038790: 5f70 6172 616d 733c 2f73 7061 6e3e 203c _params < │ │ │ │ -000387a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -000387b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c { │ │ │ │ -000387d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000387e0: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **self.ext │ │ │ │ -00038830: 7261 3c2f 7370 616e 3e3c 7370 616e 2063 ra, **extra │ │ │ │ -00038880: 5f63 6f6e 7465 7874 3c2f 7370 616e 3e3c _context< │ │ │ │ -00038890: 7370 616e 2063 6c61 7373 3d22 7022 3e7d span class="p">} │ │ │ │ -000388a0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000388b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000388c0: 7375 6271 7565 7279 5f73 716c 3c2f 7370 subquery_sql, sql_ │ │ │ │ -00038900: 7061 7261 6d73 3c2f 7370 616e 3e20 3c73 params =< │ │ │ │ -00038920: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.query │ │ │ │ -00038970: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00038990: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -000389a0: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(compiler, conn │ │ │ │ -00038a10: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection). te │ │ │ │ -00038a50: 6d70 6c61 7465 5f70 6172 616d 733c 2f73 mplate_params[&qu │ │ │ │ -00038a90: 6f74 3b73 7562 7175 6572 7926 7175 6f74 ot;subquery" │ │ │ │ -00038aa0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;] │ │ │ │ -00038ac0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = subque │ │ │ │ -00038af0: 7279 5f73 716c 3c2f 7370 616e 3e3c 7370 ry_sql[1:< │ │ │ │ -00038b40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>-1 │ │ │ │ -00038b70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ]. │ │ │ │ -00038b90: 0a20 2020 2020 2020 203c 7370 616e 2063 . templat │ │ │ │ -00038bb0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e = template or tem │ │ │ │ -00038c20: 706c 6174 655f 7061 7261 6d73 3c2f 7370 plate_params.get(&q │ │ │ │ -00038c90: 756f 743b 7465 6d70 6c61 7465 2671 756f uot;template&quo │ │ │ │ -00038ca0: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;, self.< │ │ │ │ -00038cf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>template). │ │ │ │ -00038d30: 2020 2020 2020 3c73 7061 6e20 636c 6173 sql │ │ │ │ -00038d50: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = templa │ │ │ │ -00038d80: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te % template_para │ │ │ │ -00038dc0: 6d73 3c2f 7370 616e 3e0a 2020 2020 2020 ms. │ │ │ │ -00038dd0: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ -00038df0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00038e00: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, sql_params.. def get_group_ │ │ │ │ -00038e80: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols(< │ │ │ │ -00038ea0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ -00038ee0: 2020 2020 3c73 7061 6e20 636c 6173 733d return self.< │ │ │ │ -00038f30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>query.get_gr │ │ │ │ -00038f80: 6f75 705f 6279 5f63 6f6c 733c 2f73 7061 oup_by_cols(wrappe │ │ │ │ -00038fc0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r= │ │ │ │ -00038fe0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self)
    .....[docs].cl │ │ │ │ -000390d0: 6173 733c 2f73 7061 6e3e 203c 7370 616e ass Exis │ │ │ │ -000390f0: 7473 3c2f 7370 616e 3e3c 7370 616e 2063 ts(Subquery │ │ │ │ -00039130: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00039140: 293a 3c2f 7370 616e 3e0a 2020 2020 3c73 ):. te │ │ │ │ -00039160: 6d70 6c61 7465 3c2f 7370 616e 3e20 3c73 mplate =< │ │ │ │ -00039180: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "EX │ │ │ │ -000391a0: 4953 5453 283c 2f73 7061 6e3e 3c73 7061 ISTS(%(s │ │ │ │ -000391c0: 7562 7175 6572 7929 733c 2f73 7061 6e3e ubquery)s │ │ │ │ -000391d0: 3c73 7061 6e20 636c 6173 733d 2273 3222 )". │ │ │ │ -000391f0: 2020 2020 3c73 7061 6e20 636c 6173 733d output_field │ │ │ │ +00037be0: 6e66 223e 6765 745f 736f 7572 6365 5f65 nf">get_source_e │ │ │ │ +00037bf0: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(self):. │ │ │ │ +00037c50: 2020 2020 2020 203c 7370 616e 2063 6c61 return [se │ │ │ │ +00037ca0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.query].. def set_sourc │ │ │ │ +00037d30: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions(sel │ │ │ │ +00037d70: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +00037d90: 203c 7370 616e 2063 6c61 7373 3d22 6e22 exprs):< │ │ │ │ +00037dc0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00037dd0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00037de0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.query │ │ │ │ +00037e20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00037e30: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = exprs[0< │ │ │ │ +00037e80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>].. │ │ │ │ +00037ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00037ec0: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00037ed0: 5f72 6573 6f6c 7665 5f6f 7574 7075 745f _resolve_output_ │ │ │ │ +00037ee0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field(self │ │ │ │ +00037f20: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00037f30: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00037f40: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00037f60: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.query │ │ │ │ +00037fb0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00037fc0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .output_f │ │ │ │ +00037fe0: 6965 6c64 3c2f 7370 616e 3e0a 0a20 2020 ield.. │ │ │ │ +00037ff0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def cop │ │ │ │ +00038020: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y( │ │ │ │ +00038040: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. cl │ │ │ │ +00038090: 6f6e 653c 2f73 7061 6e3e 203c 7370 616e one =
    super().
    copy()< │ │ │ │ +00038130: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00038140: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00038150: 6c6f 6e65 3c2f 7370 616e 3e3c 7370 616e lone.query │ │ │ │ +00038190: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000381a0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = clone.que │ │ │ │ +000381f0: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry.clone()< │ │ │ │ +00038240: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00038250: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ +00038260: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn clo │ │ │ │ +00038280: 6e65 3c2f 7370 616e 3e0a 0a20 2020 203c ne.. < │ │ │ │ +00038290: 7370 616e 2063 6c61 7373 3d22 6e64 223e span class="nd"> │ │ │ │ +000382a0: 4070 726f 7065 7274 793c 2f73 7061 6e3e @property │ │ │ │ +000382b0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ +000382d0: 3c73 7061 6e20 636c 6173 733d 226e 6622 external_aliase │ │ │ │ +000382f0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s( │ │ │ │ +00038310: 3c73 7061 6e20 636c 6173 733d 2262 7022 self):. re │ │ │ │ +00038360: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ +00038380: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000383a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000383b0: 7175 6572 793c 2f73 7061 6e3e 3c73 7061 query.external_ali │ │ │ │ +000383f0: 6173 6573 3c2f 7370 616e 3e0a 0a20 2020 ases.. │ │ │ │ +00038400: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ +00038430: 5f65 7874 6572 6e61 6c5f 636f 6c73 3c2f _external_cols(se │ │ │ │ +00038470: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ +000384b0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n self.que │ │ │ │ +00038500: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry.get_external_co │ │ │ │ +00038540: 6c73 3c2f 7370 616e 3e3c 7370 616e 2063 ls().. def as_sql(self, co │ │ │ │ +00038600: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler, connection │ │ │ │ +00038640: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +00038660: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00038670: 7465 6d70 6c61 7465 3c2f 7370 616e 3e3c template< │ │ │ │ +00038680: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00038690: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None, **extra_conte │ │ │ │ +00038700: 7874 3c2f 7370 616e 3e3c 7370 616e 2063 xt):. conne │ │ │ │ +00038740: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction.ops.< │ │ │ │ +00038790: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>check_expr │ │ │ │ +000387b0: 6573 7369 6f6e 5f73 7570 706f 7274 3c2f ession_support(se │ │ │ │ +000387f0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf). templa │ │ │ │ +00038830: 7465 5f70 6172 616d 733c 2f73 7061 6e3e te_params │ │ │ │ +00038840: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = {**self │ │ │ │ +000388a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000388c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +000388d0: 7874 7261 3c2f 7370 616e 3e3c 7370 616e xtra, **ext │ │ │ │ +00038920: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context}. │ │ │ │ +00038950: 2020 3c73 7061 6e20 636c 6173 733d 226e subquery_sql, sq │ │ │ │ +000389a0: 6c5f 7061 7261 6d73 3c2f 7370 616e 3e20 l_params │ │ │ │ +000389b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000389c0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.que │ │ │ │ +00038a10: 7279 3c2f 7370 616e 3e3c 7370 616e 2063 ry.as_sql(< │ │ │ │ +00038a60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>compiler, co │ │ │ │ +00038ab0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ +00038ac0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00038ad0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00038ae0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00038af0: 7465 6d70 6c61 7465 5f70 6172 616d 733c template_params< │ │ │ │ +00038b00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>[& │ │ │ │ +00038b30: 7175 6f74 3b73 7562 7175 6572 7926 7175 quot;subquery&qu │ │ │ │ +00038b40: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;] = subq │ │ │ │ +00038b90: 7565 7279 5f73 716c 3c2f 7370 616e 3e3c uery_sql< │ │ │ │ +00038ba0: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ +00038bb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 1 │ │ │ │ +00038bd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00038be0: 3a3c 2f73 7061 6e3e 3c73 7061 6e20 636c :- │ │ │ │ +00038c00: 3c73 7061 6e20 636c 6173 733d 226d 6922 1].. templ │ │ │ │ +00038c50: 6174 653c 2f73 7061 6e3e 203c 7370 616e ate = template
    or < │ │ │ │ +00038cb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +00038cc0: 656d 706c 6174 655f 7061 7261 6d73 3c2f emplate_params.get │ │ │ │ +00038d00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00038d20: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00038d30: 2671 756f 743b 7465 6d70 6c61 7465 2671 "template&q │ │ │ │ +00038d40: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;, self │ │ │ │ +00038d80: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00038d90: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .template │ │ │ │ +00038db0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +00038dd0: 2020 2020 2020 2020 3c73 7061 6e20 636c sql = temp │ │ │ │ +00038e20: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late % template_pa │ │ │ │ +00038e60: 7261 6d73 3c2f 7370 616e 3e0a 2020 2020 rams. │ │ │ │ +00038e70: 2020 2020 3c73 7061 6e20 636c 6173 733d return sql, sql_params< │ │ │ │ +00038ee0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +00038f00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_grou │ │ │ │ +00038f20: 705f 6279 5f63 6f6c 733c 2f73 7061 6e3e p_by_cols │ │ │ │ +00038f30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00038f40: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +00038f80: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ +00038fc0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00038fd0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .query.get_ │ │ │ │ +00039020: 6772 6f75 705f 6279 5f63 6f6c 733c 2f73 group_by_cols(wrap │ │ │ │ +00039060: 7065 723c 2f73 7061 6e3e 3c73 7061 6e20 per=self)< │ │ │ │ +000390b0: 2f73 7061 6e3e 3c2f 6469 763e 0a0a 0a0a /span>
    .... │ │ │ │ +000390c0: 3c64 6976 2063 6c61 7373 3d22 7669 6577
    .[documentat │ │ │ │ +00039160: 6965 5d3c 2f61 3e0a 3c73 7061 6e20 636c ie].class Exists(Subqu │ │ │ │ +000391d0: 6572 793c 2f73 7061 6e3e 3c73 7061 6e20 ery):. template │ │ │ │ 00039210: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00039230: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ -00039260: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>BooleanFie │ │ │ │ -00039280: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld(). empty_res │ │ │ │ -000392c0: 756c 745f 7365 745f 7661 6c75 653c 2f73 ult_set_value = F │ │ │ │ -00039300: 616c 7365 3c2f 7370 616e 3e0a 0a20 2020 alse.. │ │ │ │ -00039310: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __i │ │ │ │ -00039340: 6e69 745f 5f3c 2f73 7061 6e3e 3c73 7061 nit__(self │ │ │ │ -00039380: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00039390: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , queryse │ │ │ │ -000393b0: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ -000393d0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **kwargs │ │ │ │ -00039400: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -00039420: 0a20 2020 2020 2020 203c 7370 616e 2063 . super< │ │ │ │ -00039440: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>()< │ │ │ │ -00039460: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00039470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __init__ │ │ │ │ -00039490: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -000394b0: 7370 616e 2063 6c61 7373 3d22 6e22 3e71 span class="n">q │ │ │ │ -000394c0: 7565 7279 7365 743c 2f73 7061 6e3e 3c73 ueryset,< │ │ │ │ -000394e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> ** │ │ │ │ -00039500: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00039510: 6b77 6172 6773 3c2f 7370 616e 3e3c 7370 kwargs). s │ │ │ │ -00039550: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.query < │ │ │ │ -00039590: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -000395a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.quer │ │ │ │ -000395f0: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y. │ │ │ │ -00039610: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00039620: 6578 6973 7473 3c2f 7370 616e 3e3c 7370 exists()< │ │ │ │ -00039640: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -00039660: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> select_f │ │ │ │ -00039680: 6f72 6d61 743c 2f73 7061 6e3e 3c73 7061 ormat(self │ │ │ │ -000396c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000396d0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ -000396f0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ -00039710: 203c 7370 616e 2063 6c61 7373 3d22 6e22 sql, params):. │ │ │ │ -00039780: 2020 203c 7370 616e 2063 6c61 7373 3d22 # Wrap EXIST │ │ │ │ -000397a0: 5328 2920 7769 7468 2061 2043 4153 4520 S() with a CASE │ │ │ │ -000397b0: 5748 454e 2065 7870 7265 7373 696f 6e20 WHEN expression │ │ │ │ -000397c0: 6966 2061 2064 6174 6162 6173 6520 6261 if a database ba │ │ │ │ -000397d0: 636b 656e 643c 2f73 7061 6e3e 0a20 2020 ckend. │ │ │ │ -000397e0: 2020 2020 203c 7370 616e 2063 6c61 7373 # (e.g. Or │ │ │ │ -00039800: 6163 6c65 2920 646f 6573 6e26 2333 393b acle) doesn' │ │ │ │ -00039810: 7420 7375 7070 6f72 7420 626f 6f6c 6561 t support boolea │ │ │ │ -00039820: 6e20 6578 7072 6573 7369 6f6e 2069 6e20 n expression in │ │ │ │ -00039830: 5345 4c45 4354 206f 7220 4752 4f55 503c SELECT or GROUP< │ │ │ │ -00039840: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00039850: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ -00039860: 2320 4259 206c 6973 742e 3c2f 7370 616e # BY list.. if not │ │ │ │ -000398b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000398c0: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ -000398d0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000398e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 connectio │ │ │ │ -00039900: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ -00039920: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00039930: 6665 6174 7572 6573 3c2f 7370 616e 3e3c features< │ │ │ │ -00039940: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00039950: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 supports_ │ │ │ │ -00039970: 626f 6f6c 6561 6e5f 6578 7072 5f69 6e5f boolean_expr_in_ │ │ │ │ -00039980: 7365 6c65 6374 5f63 6c61 7573 653c 2f73 select_clause:. │ │ │ │ -000399b0: 2020 2020 2020 2020 203c 7370 616e 2063 sql = &q │ │ │ │ -00039a00: 756f 743b 4341 5345 2057 4845 4e20 3c2f uot;CASE WHEN {}< │ │ │ │ -00039a30: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00039a40: 2054 4845 4e20 3120 454c 5345 2030 2045 THEN 1 ELSE 0 E │ │ │ │ -00039a50: 4e44 2671 756f 743b 3c2f 7370 616e 3e3c ND"< │ │ │ │ -00039a60: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00039a70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 format(sql< │ │ │ │ -00039ac0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -00039ae0: 2020 2020 2020 203c 7370 616e 2063 6c61 return sql< │ │ │ │ -00039b20: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00039b30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c params
    ....< │ │ │ │ -00039b60: 7370 616e 2063 6c61 7373 3d22 6e64 223e span class="nd"> │ │ │ │ -00039b70: 4064 6563 6f6e 7374 7275 6374 6962 6c65 @deconstructible │ │ │ │ -00039b80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00039ba0: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00039bb0: 6174 683c 2f73 7061 6e3e 3c73 7061 6e20 ath="django. │ │ │ │ -00039bf0: 6462 2e6d 6f64 656c 732e 4f72 6465 7242 db.models.OrderB │ │ │ │ -00039c00: 7926 7175 6f74 3b3c 2f73 7061 6e3e 3c73 y")< │ │ │ │ -00039c20: 2f73 7061 6e3e 0a3c 7370 616e 2063 6c61 /span>.class OrderBy(Expre │ │ │ │ -00039c90: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion):. templa │ │ │ │ -00039cd0: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te = "%(expression)s │ │ │ │ -00039d30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 │ │ │ │ -00039d50: 3c73 7061 6e20 636c 6173 733d 2273 6922 %(ordering)s". condition │ │ │ │ -00039db0: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20 al = False │ │ │ │ -00039df0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00039e10: 203c 7370 616e 2063 6c61 7373 3d22 666d __init__(self, ex │ │ │ │ -00039e90: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -00039ea0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00039eb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c descendi │ │ │ │ -00039ed0: 6e67 3c2f 7370 616e 3e3c 7370 616e 2063 ng=False,< │ │ │ │ -00039f20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nulls_fir │ │ │ │ -00039f40: 7374 3c2f 7370 616e 3e3c 7370 616e 2063 st=None, nulls_last │ │ │ │ -00039fb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ -00039fd0: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -00039fe0: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None):. if< │ │ │ │ -0003a020: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nulls_fir │ │ │ │ -0003a040: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st and nulls_last │ │ │ │ -0003a080: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -0003a0a0: 2020 2020 2020 2020 2020 2020 3c73 7061 rais │ │ │ │ -0003a0c0: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e ValueE │ │ │ │ -0003a0e0: 7272 6f72 3c2f 7370 616e 3e3c 7370 616e rror("nulls_ │ │ │ │ -0003a120: 6669 7273 7420 616e 6420 6e75 6c6c 735f first and nulls_ │ │ │ │ -0003a130: 6c61 7374 2061 7265 206d 7574 7561 6c6c last are mutuall │ │ │ │ -0003a140: 7920 6578 636c 7573 6976 6526 7175 6f74 y exclusive" │ │ │ │ -0003a150: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;) │ │ │ │ -0003a170: 0a20 2020 2020 2020 203c 7370 616e 2063 . if nulls_first is │ │ │ │ -0003a1d0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False < │ │ │ │ -0003a1f0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0003a200: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or nulls_ │ │ │ │ -0003a220: 6c61 7374 3c2f 7370 616e 3e20 3c73 7061 last is< │ │ │ │ -0003a240: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> False:. │ │ │ │ -0003a280: 2020 2020 2020 2020 203c 7370 616e 2063 # When │ │ │ │ -0003a2a0: 2074 6865 2064 6570 7265 6361 7469 6f6e the deprecation │ │ │ │ -0003a2b0: 2065 6e64 732c 2072 6570 6c61 6365 2077 ends, replace w │ │ │ │ -0003a2c0: 6974 683a 3c2f 7370 616e 3e0a 2020 2020 ith:. │ │ │ │ -0003a2d0: 2020 2020 2020 2020 3c73 7061 6e20 636c # raise │ │ │ │ -0003a2f0: 2056 616c 7565 4572 726f 7228 3c2f 7370 ValueError(. │ │ │ │ -0003a310: 3c73 7061 6e20 636c 6173 733d 2263 3122 # "nul │ │ │ │ -0003a330: 6c73 5f66 6972 7374 2061 6e64 206e 756c ls_first and nul │ │ │ │ -0003a340: 6c73 5f6c 6173 7420 7661 6c75 6573 206d ls_last values m │ │ │ │ -0003a350: 7573 7420 6265 2054 7275 6520 6f72 204e ust be True or N │ │ │ │ -0003a360: 6f6e 652e 2671 756f 743b 3c2f 7370 616e one.". # │ │ │ │ -0003a390: 2029 3c2f 7370 616e 3e0a 2020 2020 2020 ). │ │ │ │ -0003a3a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 warnings.war │ │ │ │ -0003a3f0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n( │ │ │ │ -0003a410: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0003a420: 203c 7370 616e 2063 6c61 7373 3d22 7332 "Passing │ │ │ │ -0003a440: 6e75 6c6c 735f 6669 7273 743d 4661 6c73 nulls_first=Fals │ │ │ │ -0003a450: 6520 6f72 206e 756c 6c73 5f6c 6173 743d e or nulls_last= │ │ │ │ -0003a460: 4661 6c73 6520 6973 2064 6570 7265 6361 False is depreca │ │ │ │ -0003a470: 7465 642c 2075 7365 204e 6f6e 6520 2671 ted, use None &q │ │ │ │ -0003a480: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ -0003a490: 2020 2020 2020 2020 2020 2020 3c73 7061 &qu │ │ │ │ -0003a4b0: 6f74 3b69 6e73 7465 6164 2e26 7175 6f74 ot;instead." │ │ │ │ -0003a4c0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;, │ │ │ │ -0003a4e0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0003a4f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 RemovedInDjango │ │ │ │ -0003a510: 3530 5761 726e 696e 673c 2f73 7061 6e3e 50Warning │ │ │ │ -0003a520: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003a530: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -0003a540: 2020 2020 2020 2020 203c 7370 616e 2063 stackle │ │ │ │ -0003a560: 7665 6c3c 2f73 7061 6e3e 3c73 7061 6e20 vel=2,. │ │ │ │ -0003a5c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003a5d0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -0003a5e0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.nulls_first │ │ │ │ -0003a630: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -0003a650: 203c 7370 616e 2063 6c61 7373 3d22 6e22 nulls_first. sel │ │ │ │ -0003a690: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003a6b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003a6c0: 6e75 6c6c 735f 6c61 7374 3c2f 7370 616e nulls_last = nulls │ │ │ │ -0003a700: 5f6c 6173 743c 2f73 7061 6e3e 0a20 2020 _last. │ │ │ │ -0003a710: 2020 2020 203c 7370 616e 2063 6c61 7373 self.descend │ │ │ │ -0003a760: 696e 673c 2f73 7061 6e3e 203c 7370 616e ing = descending. if │ │ │ │ -0003a7c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c not hasattr(expre │ │ │ │ -0003a830: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion, "reso │ │ │ │ -0003a870: 6c76 655f 6578 7072 6573 7369 6f6e 2671 lve_expression&q │ │ │ │ -0003a880: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;):. │ │ │ │ -0003a8b0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 raise V │ │ │ │ -0003a8e0: 616c 7565 4572 726f 723c 2f73 7061 6e3e alueError │ │ │ │ -0003a8f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003a900: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c ("e │ │ │ │ -0003a920: 7870 7265 7373 696f 6e20 6d75 7374 2062 xpression must b │ │ │ │ -0003a930: 6520 616e 2065 7870 7265 7373 696f 6e20 e an expression │ │ │ │ -0003a940: 7479 7065 2671 756f 743b 3c2f 7370 616e type"). │ │ │ │ -0003a970: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -0003a9a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>expression │ │ │ │ -0003a9c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -0003a9e0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 expression.. def __repr__(self │ │ │ │ -0003aa70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0003aa90: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -0003aab0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "{}< │ │ │ │ -0003aaf0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -0003ab00: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c ({}, descending= │ │ │ │ -0003ab40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 {})" │ │ │ │ -0003ab80: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003ab90: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .format(. │ │ │ │ -0003abd0: 2020 2020 2020 2020 2020 3c73 7061 6e20 self< │ │ │ │ -0003abf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -0003ac20: 5f63 6c61 7373 5f5f 3c2f 7370 616e 3e3c _class__< │ │ │ │ -0003ac30: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003ac40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __name__ │ │ │ │ -0003ac60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0003ac80: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.expression, s │ │ │ │ -0003ad00: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.descending. ).. def set_source │ │ │ │ -0003ada0: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(self │ │ │ │ -0003ade0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0003ae00: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003ae10: 6578 7072 733c 2f73 7061 6e3e 3c73 7061 exprs):. s │ │ │ │ -0003ae50: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.expression = exp │ │ │ │ -0003aec0: 7273 3c2f 7370 616e 3e3c 7370 616e 2063 rs[0].. def get_source_e │ │ │ │ -0003af50: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(self):. │ │ │ │ -0003afb0: 2020 2020 2020 203c 7370 616e 2063 6c61 return [se │ │ │ │ -0003b000: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.expression].. │ │ │ │ -0003b060: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003b070: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_s │ │ │ │ -0003b090: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql(self, compiler, co │ │ │ │ -0003b130: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -0003b140: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0003b150: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c template │ │ │ │ +00039230: 203c 7370 616e 2063 6c61 7373 3d22 7332 "EXISTS(< │ │ │ │ +00039250: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%(subquer │ │ │ │ +00039270: 7929 733c 2f73 7061 6e3e 3c73 7061 6e20 y)s)&quo │ │ │ │ +00039290: 743b 3c2f 7370 616e 3e0a 2020 2020 3c73 t;. ou │ │ │ │ +000392b0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field = field │ │ │ │ +000392f0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00039310: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00039320: 426f 6f6c 6561 6e46 6965 6c64 3c2f 7370 BooleanField(). │ │ │ │ +00039350: 203c 7370 616e 2063 6c61 7373 3d22 6e22 empty_result_se │ │ │ │ +00039370: 745f 7661 6c75 653c 2f73 7061 6e3e 203c t_value < │ │ │ │ +00039380: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00039390: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c False.. def __init__< │ │ │ │ +000393f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00039420: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, queryset, **kwargs):. │ │ │ │ +000394d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 super │ │ │ │ +000394f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00039500: 2829 3c2f 7370 616e 3e3c 7370 616e 2063 ().__init__(queryse │ │ │ │ +00039570: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ +00039590: 203c 7370 616e 2063 6c61 7373 3d22 6f22 **kwargs │ │ │ │ +000395c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +000395e0: 2020 2020 2020 2020 3c73 7061 6e20 636c self.quer │ │ │ │ +00039630: 793c 2f73 7061 6e3e 203c 7370 616e 2063 y = self.< │ │ │ │ +00039680: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>query.exists │ │ │ │ +000396d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 () │ │ │ │ +000396f0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00039710: 203c 7370 616e 2063 6c61 7373 3d22 6e66 select_format< │ │ │ │ +00039730: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +00039760: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, compiler, sql, pa │ │ │ │ +00039800: 7261 6d73 3c2f 7370 616e 3e3c 7370 616e rams):. # │ │ │ │ +00039840: 5772 6170 2045 5849 5354 5328 2920 7769 Wrap EXISTS() wi │ │ │ │ +00039850: 7468 2061 2043 4153 4520 5748 454e 2065 th a CASE WHEN e │ │ │ │ +00039860: 7870 7265 7373 696f 6e20 6966 2061 2064 xpression if a d │ │ │ │ +00039870: 6174 6162 6173 6520 6261 636b 656e 643c atabase backend< │ │ │ │ +00039880: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +00039890: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ +000398a0: 2320 2865 2e67 2e20 4f72 6163 6c65 2920 # (e.g. Oracle) │ │ │ │ +000398b0: 646f 6573 6e26 2333 393b 7420 7375 7070 doesn't supp │ │ │ │ +000398c0: 6f72 7420 626f 6f6c 6561 6e20 6578 7072 ort boolean expr │ │ │ │ +000398d0: 6573 7369 6f6e 2069 6e20 5345 4c45 4354 ession in SELECT │ │ │ │ +000398e0: 206f 7220 4752 4f55 503c 2f73 7061 6e3e or GROUP │ │ │ │ +000398f0: 0a20 2020 2020 2020 203c 7370 616e 2063 . # BY l │ │ │ │ +00039910: 6973 742e 3c2f 7370 616e 3e0a 2020 2020 ist.. │ │ │ │ +00039920: 2020 2020 3c73 7061 6e20 636c 6173 733d if n │ │ │ │ +00039950: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot compil │ │ │ │ +00039970: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.connection.featur │ │ │ │ +000399e0: 6573 3c2f 7370 616e 3e3c 7370 616e 2063 es.supports_boolea │ │ │ │ +00039a20: 6e5f 6578 7072 5f69 6e5f 7365 6c65 6374 n_expr_in_select │ │ │ │ +00039a30: 5f63 6c61 7573 653c 2f73 7061 6e3e 3c73 _clause:< │ │ │ │ +00039a50: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00039a60: 2020 203c 7370 616e 2063 6c61 7373 3d22 sql =< │ │ │ │ +00039a90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "CA │ │ │ │ +00039ab0: 5345 2057 4845 4e20 3c2f 7370 616e 3e3c SE WHEN < │ │ │ │ +00039ac0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +00039ad0: 7b7d 3c2f 7370 616e 3e3c 7370 616e 2063 {} THEN │ │ │ │ +00039af0: 3120 454c 5345 2030 2045 4e44 2671 756f 1 ELSE 0 END&quo │ │ │ │ +00039b00: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;.format(< │ │ │ │ +00039b50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>sql │ │ │ │ +00039b70: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00039b80: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +00039b90: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00039bb0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +00039bc0: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql, params< │ │ │ │ +00039c00: 2f64 6976 3e0a 0a0a 0a3c 7370 616e 2063 /div>....@decon │ │ │ │ +00039c20: 7374 7275 6374 6962 6c65 3c2f 7370 616e structible(path=&qu │ │ │ │ +00039c90: 6f74 3b64 6a61 6e67 6f2e 6462 2e6d 6f64 ot;django.db.mod │ │ │ │ +00039ca0: 656c 732e 4f72 6465 7242 7926 7175 6f74 els.OrderBy" │ │ │ │ +00039cb0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;) │ │ │ │ +00039cd0: 0a3c 7370 616e 2063 6c61 7373 3d22 6b22 .class O │ │ │ │ +00039d00: 7264 6572 4279 3c2f 7370 616e 3e3c 7370 rderBy(Expression< │ │ │ │ +00039d40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00039d60: 2020 2020 3c73 7061 6e20 636c 6173 733d template = &q │ │ │ │ +00039db0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;%(ex │ │ │ │ +00039dd0: 7072 6573 7369 6f6e 2973 3c2f 7370 616e pression)s %(ord │ │ │ │ +00039e10: 6572 696e 6729 733c 2f73 7061 6e3e 3c73 ering)s& │ │ │ │ +00039e30: 7175 6f74 3b3c 2f73 7061 6e3e 0a20 2020 quot;. │ │ │ │ +00039e40: 203c 7370 616e 2063 6c61 7373 3d22 6e22 conditional = Fa │ │ │ │ +00039e90: 6c73 653c 2f73 7061 6e3e 0a0a 2020 2020 lse.. │ │ │ │ +00039ea0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00039eb0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __in │ │ │ │ +00039ed0: 6974 5f5f 3c2f 7370 616e 3e3c 7370 616e it__(self< │ │ │ │ +00039f10: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00039f20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expressi │ │ │ │ +00039f40: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, descending=Fals │ │ │ │ +00039fb0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +00039fd0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 nulls_first=None │ │ │ │ +0003a020: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0003a040: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003a050: 6e75 6c6c 735f 6c61 7374 3c2f 7370 616e nulls_last=None):. │ │ │ │ +0003a0b0: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +0003a0d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 nulls_first and │ │ │ │ +0003a110: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003a120: 6e75 6c6c 735f 6c61 7374 3c2f 7370 616e nulls_last:. │ │ │ │ +0003a150: 2020 2020 2020 3c73 7061 6e20 636c 6173 raise ValueError(&q │ │ │ │ +0003a1c0: 756f 743b 6e75 6c6c 735f 6669 7273 7420 uot;nulls_first │ │ │ │ +0003a1d0: 616e 6420 6e75 6c6c 735f 6c61 7374 2061 and nulls_last a │ │ │ │ +0003a1e0: 7265 206d 7574 7561 6c6c 7920 6578 636c re mutually excl │ │ │ │ +0003a1f0: 7573 6976 6526 7175 6f74 3b3c 2f73 7061 usive"). │ │ │ │ +0003a220: 2020 203c 7370 616e 2063 6c61 7373 3d22 if nul │ │ │ │ +0003a250: 6c73 5f66 6972 7374 3c2f 7370 616e 3e20 ls_first │ │ │ │ +0003a260: 3c73 7061 6e20 636c 6173 733d 226f 7722 is Fals │ │ │ │ +0003a290: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e or nulls_last is │ │ │ │ +0003a2f0: 203c 7370 616e 2063 6c61 7373 3d22 6b63 False:< │ │ │ │ +0003a320: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0003a330: 2020 203c 7370 616e 2063 6c61 7373 3d22 # When the d │ │ │ │ +0003a350: 6570 7265 6361 7469 6f6e 2065 6e64 732c eprecation ends, │ │ │ │ +0003a360: 2072 6570 6c61 6365 2077 6974 683a 3c2f replace with:. │ │ │ │ +0003a380: 2020 3c73 7061 6e20 636c 6173 733d 2263 # raise Value │ │ │ │ +0003a3a0: 4572 726f 7228 3c2f 7370 616e 3e0a 2020 Error(. │ │ │ │ +0003a3b0: 2020 2020 2020 2020 2020 3c73 7061 6e20 # │ │ │ │ +0003a3d0: 2026 7175 6f74 3b6e 756c 6c73 5f66 6972 "nulls_fir │ │ │ │ +0003a3e0: 7374 2061 6e64 206e 756c 6c73 5f6c 6173 st and nulls_las │ │ │ │ +0003a3f0: 7420 7661 6c75 6573 206d 7573 7420 6265 t values must be │ │ │ │ +0003a400: 2054 7275 6520 6f72 204e 6f6e 652e 2671 True or None.&q │ │ │ │ +0003a410: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ +0003a420: 2020 2020 2020 2020 3c73 7061 6e20 636c # ). │ │ │ │ +0003a450: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003a460: 7761 726e 696e 6773 3c2f 7370 616e 3e3c warnings< │ │ │ │ +0003a470: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0003a480: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 warn(. │ │ │ │ +0003a4c0: 2020 2020 2020 2020 2020 203c 7370 616e &quo │ │ │ │ +0003a4e0: 743b 5061 7373 696e 6720 6e75 6c6c 735f t;Passing nulls_ │ │ │ │ +0003a4f0: 6669 7273 743d 4661 6c73 6520 6f72 206e first=False or n │ │ │ │ +0003a500: 756c 6c73 5f6c 6173 743d 4661 6c73 6520 ulls_last=False │ │ │ │ +0003a510: 6973 2064 6570 7265 6361 7465 642c 2075 is deprecated, u │ │ │ │ +0003a520: 7365 204e 6f6e 6520 2671 756f 743b 3c2f se None ". │ │ │ │ +0003a540: 2020 2020 2020 3c73 7061 6e20 636c 6173 "ins │ │ │ │ +0003a560: 7465 6164 2e26 7175 6f74 3b3c 2f73 7061 tead.",. │ │ │ │ +0003a590: 2020 2020 2020 2020 2020 203c 7370 616e Remov │ │ │ │ +0003a5b0: 6564 496e 446a 616e 676f 3530 5761 726e edInDjango50Warn │ │ │ │ +0003a5c0: 696e 673c 2f73 7061 6e3e 3c73 7061 6e20 ing,. │ │ │ │ +0003a5f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 stacklevel=2,. │ │ │ │ +0003a660: 2020 2020 2020 2020 2020 3c73 7061 6e20 ). self │ │ │ │ +0003a6a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003a6c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6e span class="n">n │ │ │ │ +0003a6d0: 756c 6c73 5f66 6972 7374 3c2f 7370 616e ulls_first = nulls │ │ │ │ +0003a710: 5f66 6972 7374 3c2f 7370 616e 3e0a 2020 _first. │ │ │ │ +0003a720: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.nulls_ │ │ │ │ +0003a770: 6c61 7374 3c2f 7370 616e 3e20 3c73 7061 last = nulls_last< │ │ │ │ +0003a7b0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0003a7c0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0003a7d0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.descending = de │ │ │ │ +0003a840: 7363 656e 6469 6e67 3c2f 7370 616e 3e0a scending. │ │ │ │ +0003a850: 2020 2020 2020 2020 3c73 7061 6e20 636c if not h │ │ │ │ +0003a8a0: 6173 6174 7472 3c2f 7370 616e 3e3c 7370 asattr(expression< │ │ │ │ +0003a8e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0003a900: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +0003a910: 2671 756f 743b 7265 736f 6c76 655f 6578 "resolve_ex │ │ │ │ +0003a920: 7072 6573 7369 6f6e 2671 756f 743b 3c2f pression"):. │ │ │ │ +0003a950: 2020 2020 2020 2020 2020 203c 7370 616e raise │ │ │ │ +0003a970: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ValueEr │ │ │ │ +0003a990: 726f 723c 2f73 7061 6e3e 3c73 7061 6e20 ror("express │ │ │ │ +0003a9d0: 696f 6e20 6d75 7374 2062 6520 616e 2065 ion must be an e │ │ │ │ +0003a9e0: 7870 7265 7373 696f 6e20 7479 7065 2671 xpression type&q │ │ │ │ +0003a9f0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;). sel │ │ │ │ +0003aa30: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0003aa50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003aa60: 6578 7072 6573 7369 6f6e 3c2f 7370 616e expression = expre │ │ │ │ +0003aaa0: 7373 696f 6e3c 2f73 7061 6e3e 0a0a 2020 ssion.. │ │ │ │ +0003aab0: 2020 3c73 7061 6e20 636c 6173 733d 226b def __ │ │ │ │ +0003aae0: 7265 7072 5f5f 3c2f 7370 616e 3e3c 7370 repr__(self):. │ │ │ │ +0003ab40: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0003ab60: 203c 7370 616e 2063 6c61 7373 3d22 7332 "< │ │ │ │ +0003ab80: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +0003ab90: 7b7d 3c2f 7370 616e 3e3c 7370 616e 2063 {}({}, d │ │ │ │ +0003abe0: 6573 6365 6e64 696e 673d 3c2f 7370 616e escending={})&qu │ │ │ │ +0003ac20: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;.format< │ │ │ │ +0003ac60: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0003ac70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003ac80: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +0003aca0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003acb0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__class │ │ │ │ +0003acd0: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __.__name__, self< │ │ │ │ +0003ad40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ex │ │ │ │ +0003ad70: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0003ad80: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0003ad90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.desc │ │ │ │ +0003ade0: 656e 6469 6e67 3c2f 7370 616e 3e0a 2020 ending. │ │ │ │ +0003adf0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ).. │ │ │ │ +0003ae10: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +0003ae30: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +0003ae40: 7365 745f 736f 7572 6365 5f65 7870 7265 set_source_expre │ │ │ │ +0003ae50: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions(self, exprs< │ │ │ │ +0003aec0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0003aee0: 2020 2020 2020 2020 3c73 7061 6e20 636c self.expr │ │ │ │ +0003af30: 6573 7369 6f6e 3c2f 7370 616e 3e20 3c73 ession =< │ │ │ │ +0003af50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> exprs[0].. │ │ │ │ +0003afc0: 2020 3c73 7061 6e20 636c 6173 733d 226b def ge │ │ │ │ +0003aff0: 745f 736f 7572 6365 5f65 7870 7265 7373 t_source_express │ │ │ │ +0003b000: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ +0003b040: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0003b050: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +0003b060: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +0003b080: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ +0003b090: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.expre │ │ │ │ +0003b0e0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion].. def as_sql(self │ │ │ │ 0003b170: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 =< │ │ │ │ -0003b190: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0003b1a0: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None, **ext │ │ │ │ -0003b1f0: 7261 5f63 6f6e 7465 7874 3c2f 7370 616e ra_context):. │ │ │ │ -0003b220: 2020 203c 7370 616e 2063 6c61 7373 3d22 template = temp │ │ │ │ -0003b270: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late or< │ │ │ │ -0003b290: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.templ │ │ │ │ -0003b2e0: 6174 653c 2f73 7061 6e3e 0a20 2020 2020 ate. │ │ │ │ -0003b2f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if con │ │ │ │ -0003b320: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -0003b340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>features.sup │ │ │ │ -0003b390: 706f 7274 735f 6f72 6465 725f 6279 5f6e ports_order_by_n │ │ │ │ -0003b3a0: 756c 6c73 5f6d 6f64 6966 6965 723c 2f73 ulls_modifier:. │ │ │ │ -0003b3d0: 2020 2020 2020 2020 203c 7370 616e 2063 if self< │ │ │ │ +0003b180: 7373 3d22 7022 3e2c 3c2f 7370 616e 3e20 ss="p">, │ │ │ │ +0003b190: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003b1a0: 636f 6d70 696c 6572 3c2f 7370 616e 3e3c compiler< │ │ │ │ +0003b1b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0003b1c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ +0003b1e0: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, template=None, ** │ │ │ │ +0003b280: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extra_con │ │ │ │ +0003b2a0: 7465 7874 3c2f 7370 616e 3e3c 7370 616e text):. tem │ │ │ │ +0003b2e0: 706c 6174 653c 2f73 7061 6e3e 203c 7370 plate = template or │ │ │ │ +0003b340: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.template. if< │ │ │ │ +0003b3b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ +0003b3d0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ +0003b3f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003b400: 6665 6174 7572 6573 3c2f 7370 616e 3e3c features< │ │ │ │ 0003b410: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ 0003b420: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 nulls_las │ │ │ │ -0003b440: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t: │ │ │ │ -0003b460: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0003b470: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -0003b490: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = " │ │ │ │ -0003b4c0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;%s NULLS LAST&q │ │ │ │ -0003b500: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; % template. │ │ │ │ -0003b550: 203c 7370 616e 2063 6c61 7373 3d22 6b22 elif se │ │ │ │ -0003b580: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.nulls_first:. │ │ │ │ -0003b5e0: 2020 2020 2020 2020 2020 2020 3c73 7061 temp │ │ │ │ -0003b600: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late = "%s N │ │ │ │ -0003b670: 554c 4c53 2046 4952 5354 2671 756f 743b ULLS FIRST" │ │ │ │ -0003b680: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c % │ │ │ │ -0003b6a0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -0003b6c0: 0a20 2020 2020 2020 203c 7370 616e 2063 . else:. │ │ │ │ -0003b700: 2020 2020 2020 2020 203c 7370 616e 2063 if self< │ │ │ │ -0003b740: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003b750: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 nulls_las │ │ │ │ -0003b770: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t and not │ │ │ │ -0003b7b0: 203c 7370 616e 2063 6c61 7373 3d22 7022 (. │ │ │ │ -0003b7d0: 2020 2020 2020 2020 2020 3c73 7061 6e20 self< │ │ │ │ -0003b7f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.de │ │ │ │ -0003b820: 7363 656e 6469 6e67 3c2f 7370 616e 3e20 scending │ │ │ │ -0003b830: 3c73 7061 6e20 636c 6173 733d 226f 7722 and conn │ │ │ │ -0003b860: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection.features.orde │ │ │ │ -0003b8d0: 725f 6279 5f6e 756c 6c73 5f66 6972 7374 r_by_nulls_first │ │ │ │ -0003b8e0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0003b8f0: 2020 2020 3c73 7061 6e20 636c 6173 733d ):. │ │ │ │ -0003b910: 2020 2020 2020 2020 2020 2020 2020 3c73 te │ │ │ │ -0003b930: 6d70 6c61 7465 3c2f 7370 616e 3e20 3c73 mplate =< │ │ │ │ -0003b950: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "%%< │ │ │ │ -0003b990: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -0003b9a0: 2865 7870 7265 7373 696f 6e29 7320 4953 (expression)s IS │ │ │ │ -0003b9b0: 204e 554c 4c2c 203c 2f73 7061 6e3e 3c73 NULL, % │ │ │ │ -0003b9d0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s"< │ │ │ │ -0003b9f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> % │ │ │ │ -0003ba10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003ba20: 7465 6d70 6c61 7465 3c2f 7370 616e 3e0a template. │ │ │ │ -0003ba30: 2020 2020 2020 2020 2020 2020 3c73 7061 elif │ │ │ │ -0003ba50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.null │ │ │ │ -0003baa0: 735f 6669 7273 743c 2f73 7061 6e3e 203c s_first < │ │ │ │ -0003bab0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0003bac0: 616e 643c 2f73 7061 6e3e 203c 7370 616e and not< │ │ │ │ -0003bae0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (. │ │ │ │ -0003bb00: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0003bb10: 3c73 7061 6e20 636c 6173 733d 226f 7722 not sel │ │ │ │ -0003bb40: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003bb60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003bb70: 6465 7363 656e 6469 6e67 3c2f 7370 616e descending and co │ │ │ │ -0003bbb0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -0003bbc0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003bbd0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 features< │ │ │ │ -0003bbf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.or │ │ │ │ -0003bc20: 6465 725f 6279 5f6e 756c 6c73 5f66 6972 der_by_nulls_fir │ │ │ │ -0003bc30: 7374 3c2f 7370 616e 3e0a 2020 2020 2020 st. │ │ │ │ -0003bc40: 2020 2020 2020 3c73 7061 6e20 636c 6173 ):. │ │ │ │ -0003bc60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0003bc70: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003bc80: 7465 6d70 6c61 7465 3c2f 7370 616e 3e20 template │ │ │ │ -0003bc90: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003bca0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -0003bcc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 %%(expression)s │ │ │ │ -0003bd00: 4953 204e 4f54 204e 554c 4c2c 203c 2f73 IS NOT NULL, %s& │ │ │ │ -0003bd40: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; % template. co │ │ │ │ -0003bda0: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -0003bdb0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003bdc0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ops.check_e │ │ │ │ -0003be10: 7870 7265 7373 696f 6e5f 7375 7070 6f72 xpression_suppor │ │ │ │ -0003be20: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ -0003be40: 3c73 7061 6e20 636c 6173 733d 2262 7022 self). exp │ │ │ │ -0003be90: 7265 7373 696f 6e5f 7371 6c3c 2f73 7061 ression_sql, param │ │ │ │ -0003bed0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = compiler.compile │ │ │ │ -0003bf40: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -0003bf60: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0003bf70: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.expression). │ │ │ │ -0003bfd0: 2020 2020 203c 7370 616e 2063 6c61 7373 placeholder │ │ │ │ -0003bff0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = {. │ │ │ │ -0003c030: 2020 2020 2020 203c 7370 616e 2063 6c61 "ex │ │ │ │ -0003c050: 7072 6573 7369 6f6e 2671 756f 743b 3c2f pression": ex │ │ │ │ -0003c090: 7072 6573 7369 6f6e 5f73 716c 3c2f 7370 pression_sql,. │ │ │ │ -0003c0c0: 2020 2020 2020 2020 3c73 7061 6e20 636c "o │ │ │ │ -0003c0e0: 7264 6572 696e 6726 7175 6f74 3b3c 2f73 rdering": &q │ │ │ │ -0003c120: 756f 743b 4445 5343 2671 756f 743b 3c2f uot;DESC" if │ │ │ │ -0003c150: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.descending else "ASC&quo │ │ │ │ -0003c1e0: 743b 3c2f 7370 616e 3e3c 7370 616e 2063 t;,. ** │ │ │ │ -0003c220: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 extra_con │ │ │ │ -0003c240: 7465 7874 3c2f 7370 616e 3e3c 7370 616e text,. }. par │ │ │ │ -0003c2a0: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams *= template.coun │ │ │ │ -0003c310: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ -0003c330: 3c73 7061 6e20 636c 6173 733d 2273 3222 "% │ │ │ │ -0003c360: 2865 7870 7265 7373 696f 6e29 733c 2f73 (expression)s"). │ │ │ │ -0003c3b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -0003c3d0: 203c 7370 616e 2063 6c61 7373 3d22 7022 (templat │ │ │ │ -0003c400: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e % placeholders).rstrip(), par │ │ │ │ -0003c4c0: 616d 733c 2f73 7061 6e3e 0a0a 2020 2020 ams.. │ │ │ │ -0003c4d0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003c4e0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def as_o │ │ │ │ -0003c500: 7261 636c 653c 2f73 7061 6e3e 3c73 7061 racle(
    self │ │ │ │ -0003c540: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003c550: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ -0003c570: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ -0003c590: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection):. │ │ │ │ -0003c5d0: 2020 2020 3c73 7061 6e20 636c 6173 733d # Oracle do │ │ │ │ -0003c5f0: 6573 6e26 2333 393b 7420 616c 6c6f 7720 esn't allow │ │ │ │ -0003c600: 4f52 4445 5220 4259 2045 5849 5354 5328 ORDER BY EXISTS( │ │ │ │ -0003c610: 2920 6f72 2066 696c 7465 7273 2075 6e6c ) or filters unl │ │ │ │ -0003c620: 6573 7320 6974 2623 3339 3b73 2077 7261 ess it's wra │ │ │ │ -0003c630: 7070 6564 3c2f 7370 616e 3e0a 2020 2020 pped. │ │ │ │ -0003c640: 2020 2020 3c73 7061 6e20 636c 6173 733d # in a CASE │ │ │ │ -0003c660: 2057 4845 4e2e 3c2f 7370 616e 3e0a 2020 WHEN.. │ │ │ │ -0003c670: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ -0003c690: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003c6a0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection.ops.condi │ │ │ │ -0003c710: 7469 6f6e 616c 5f65 7870 7265 7373 696f tional_expressio │ │ │ │ -0003c720: 6e5f 7375 7070 6f72 7465 645f 696e 5f77 n_supported_in_w │ │ │ │ -0003c730: 6865 7265 5f63 6c61 7573 653c 2f73 7061 here_clause(. │ │ │ │ -0003c760: 2020 2020 2020 203c 7370 616e 2063 6c61 self.expre │ │ │ │ -0003c7b0: 7373 696f 6e3c 2f73 7061 6e3e 0a20 2020 ssion. │ │ │ │ -0003c7c0: 2020 2020 203c 7370 616e 2063 6c61 7373 ):. │ │ │ │ -0003c7e0: 2020 2020 2020 2020 2020 203c 7370 616e copy< │ │ │ │ -0003c800: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -0003c820: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.
    copy< │ │ │ │ -0003c870: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0003c880: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +0003b430: 7373 3d22 6e22 3e73 7570 706f 7274 735f ss="n">supports_ │ │ │ │ +0003b440: 6f72 6465 725f 6279 5f6e 756c 6c73 5f6d order_by_nulls_m │ │ │ │ +0003b450: 6f64 6966 6965 723c 2f73 7061 6e3e 3c73 odifier:< │ │ │ │ +0003b470: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0003b480: 2020 203c 7370 616e 2063 6c61 7373 3d22 if se │ │ │ │ +0003b4b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.nulls_last:. │ │ │ │ +0003b510: 2020 2020 2020 2020 2020 203c 7370 616e templ │ │ │ │ +0003b530: 6174 653c 2f73 7061 6e3e 203c 7370 616e ate = "%s NU │ │ │ │ +0003b5a0: 4c4c 5320 4c41 5354 2671 756f 743b 3c2f LLS LAST" % < │ │ │ │ +0003b5d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +0003b5e0: 656d 706c 6174 653c 2f73 7061 6e3e 0a20 emplate. │ │ │ │ +0003b5f0: 2020 2020 2020 2020 2020 203c 7370 616e elif< │ │ │ │ +0003b610: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.nulls │ │ │ │ +0003b660: 5f66 6972 7374 3c2f 7370 616e 3e3c 7370 _first:. │ │ │ │ +0003b690: 2020 2020 2020 3c73 7061 6e20 636c 6173 template = < │ │ │ │ +0003b6d0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +0003b6e0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "%s │ │ │ │ +0003b700: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 NULLS F │ │ │ │ +0003b720: 4952 5354 2671 756f 743b 3c2f 7370 616e IRST" % templ │ │ │ │ +0003b760: 6174 653c 2f73 7061 6e3e 0a20 2020 2020 ate. │ │ │ │ +0003b770: 2020 203c 7370 616e 2063 6c61 7373 3d22 else:< │ │ │ │ +0003b7a0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0003b7b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if se │ │ │ │ +0003b7e0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.nulls_last and < │ │ │ │ +0003b840: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ +0003b850: 6e6f 743c 2f73 7061 6e3e 203c 7370 616e not (. │ │ │ │ +0003b880: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +0003b8a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003b8b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .descendi │ │ │ │ +0003b8d0: 6e67 3c2f 7370 616e 3e20 3c73 7061 6e20 ng and connection │ │ │ │ +0003b910: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003b930: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +0003b940: 6561 7475 7265 733c 2f73 7061 6e3e 3c73 eatures.< │ │ │ │ +0003b960: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>order_by_n │ │ │ │ +0003b980: 756c 6c73 5f66 6972 7374 3c2f 7370 616e ulls_first. ): │ │ │ │ +0003b9b0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003b9c0: 2020 2020 2020 2020 3c73 7061 6e20 636c template │ │ │ │ +0003b9e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +0003ba00: 203c 7370 616e 2063 6c61 7373 3d22 7332 "< │ │ │ │ +0003ba20: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +0003ba30: 2525 3c2f 7370 616e 3e3c 7370 616e 2063 %%(expre │ │ │ │ +0003ba50: 7373 696f 6e29 7320 4953 204e 554c 4c2c ssion)s IS NULL, │ │ │ │ +0003ba60: 203c 2f73 7061 6e3e 3c73 7061 6e20 636c %s" │ │ │ │ +0003baa0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 % templa │ │ │ │ +0003bad0: 7465 3c2f 7370 616e 3e0a 2020 2020 2020 te. │ │ │ │ +0003bae0: 2020 2020 2020 3c73 7061 6e20 636c 6173 elif self.< │ │ │ │ +0003bb30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>nulls_firs │ │ │ │ +0003bb50: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t and not │ │ │ │ +0003bb90: 203c 7370 616e 2063 6c61 7373 3d22 7022 (. │ │ │ │ +0003bbb0: 2020 2020 2020 2020 2020 3c73 7061 6e20 not self.descen │ │ │ │ +0003bc20: 6469 6e67 3c2f 7370 616e 3e20 3c73 7061 ding and │ │ │ │ +0003bc40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ +0003bc60: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.features │ │ │ │ +0003bca0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003bcb0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .order_by │ │ │ │ +0003bcd0: 5f6e 756c 6c73 5f66 6972 7374 3c2f 7370 _nulls_first. │ │ │ │ +0003bcf0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003bd00: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +0003bd10: 2020 2020 2020 2020 2020 3c73 7061 6e20 templa │ │ │ │ +0003bd30: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te = "%%(exp │ │ │ │ +0003bda0: 7265 7373 696f 6e29 7320 4953 204e 4f54 ression)s IS NOT │ │ │ │ +0003bdb0: 204e 554c 4c2c 203c 2f73 7061 6e3e 3c73 NULL, % │ │ │ │ +0003bdd0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s"< │ │ │ │ +0003bdf0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> % │ │ │ │ +0003be10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003be20: 7465 6d70 6c61 7465 3c2f 7370 616e 3e0a template. │ │ │ │ +0003be30: 2020 2020 2020 2020 3c73 7061 6e20 636c connecti │ │ │ │ +0003be50: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.ops.check_express │ │ │ │ +0003bec0: 696f 6e5f 7375 7070 6f72 743c 2f73 7061 ion_support(self< │ │ │ │ +0003bf00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +0003bf20: 2020 2020 2020 203c 7370 616e 2063 6c61 expressio │ │ │ │ +0003bf40: 6e5f 7371 6c3c 2f73 7061 6e3e 3c73 7061 n_sql, params = comp │ │ │ │ +0003bfb0: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(self.exp │ │ │ │ +0003c050: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression)< │ │ │ │ +0003c070: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0003c080: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ +0003c090: 6c61 6365 686f 6c64 6572 733c 2f73 7061 laceholders = {. │ │ │ │ +0003c0e0: 203c 7370 616e 2063 6c61 7373 3d22 7332 "expressi │ │ │ │ +0003c100: 6f6e 2671 756f 743b 3c2f 7370 616e 3e3c on"< │ │ │ │ +0003c110: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +0003c120: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c expressi │ │ │ │ +0003c140: 6f6e 5f73 716c 3c2f 7370 616e 3e3c 7370 on_sql,. │ │ │ │ +0003c170: 2020 3c73 7061 6e20 636c 6173 733d 2273 "orderin │ │ │ │ +0003c190: 6726 7175 6f74 3b3c 2f73 7061 6e3e 3c73 g":< │ │ │ │ +0003c1b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "DE │ │ │ │ +0003c1d0: 5343 2671 756f 743b 3c2f 7370 616e 3e20 SC" │ │ │ │ +0003c1e0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0003c1f0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if self< │ │ │ │ +0003c210: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.de │ │ │ │ +0003c240: 7363 656e 6469 6e67 3c2f 7370 616e 3e20 scending │ │ │ │ +0003c250: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0003c260: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else &qu │ │ │ │ +0003c280: 6f74 3b41 5343 2671 756f 743b 3c2f 7370 ot;ASC",. │ │ │ │ +0003c2b0: 2020 2020 2020 2020 3c73 7061 6e20 636c **extra_context,. │ │ │ │ +0003c310: 2020 2020 2020 3c73 7061 6e20 636c 6173 }. │ │ │ │ +0003c330: 2020 2020 2020 203c 7370 616e 2063 6c61 params *= < │ │ │ │ +0003c370: 7370 616e 2063 6c61 7373 3d22 6e22 3e74 span class="n">t │ │ │ │ +0003c380: 656d 706c 6174 653c 2f73 7061 6e3e 3c73 emplate.< │ │ │ │ +0003c3a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>count(" │ │ │ │ +0003c3f0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;%(expre │ │ │ │ +0003c410: 7373 696f 6e29 733c 2f73 7061 6e3e 3c73 ssion)s& │ │ │ │ +0003c430: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;). ret │ │ │ │ +0003c470: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn (template % plac │ │ │ │ +0003c4e0: 6568 6f6c 6465 7273 3c2f 7370 616e 3e3c eholders< │ │ │ │ +0003c4f0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0003c500: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003c520: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ +0003c530: 7374 7269 703c 2f73 7061 6e3e 3c73 7061 strip(),< │ │ │ │ +0003c550: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> params.. def as_oracle< │ │ │ │ +0003c5b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +0003c5e0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf, compiler, conne │ │ │ │ +0003c650: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction):. # │ │ │ │ +0003c690: 204f 7261 636c 6520 646f 6573 6e26 2333 Oracle doesn │ │ │ │ +0003c6a0: 393b 7420 616c 6c6f 7720 4f52 4445 5220 9;t allow ORDER │ │ │ │ +0003c6b0: 4259 2045 5849 5354 5328 2920 6f72 2066 BY EXISTS() or f │ │ │ │ +0003c6c0: 696c 7465 7273 2075 6e6c 6573 7320 6974 ilters unless it │ │ │ │ +0003c6d0: 2623 3339 3b73 2077 7261 7070 6564 3c2f 's wrapped. # │ │ │ │ +0003c700: 2069 6e20 6120 4341 5345 2057 4845 4e2e in a CASE WHEN. │ │ │ │ +0003c710: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003c720: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0003c730: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if connec │ │ │ │ +0003c750: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion.ops.conditional │ │ │ │ +0003c7c0: 5f65 7870 7265 7373 696f 6e5f 7375 7070 _expression_supp │ │ │ │ +0003c7d0: 6f72 7465 645f 696e 5f77 6865 7265 5f63 orted_in_where_c │ │ │ │ +0003c7e0: 6c61 7573 653c 2f73 7061 6e3e 3c73 7061 lause(. │ │ │ │ +0003c810: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.expression< │ │ │ │ +0003c860: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0003c870: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +0003c880: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ 0003c890: 2020 2020 203c 7370 616e 2063 6c61 7373 copy │ │ │ │ -0003c8b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003c8c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .expressi │ │ │ │ -0003c8e0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on = Case(< │ │ │ │ -0003c930: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0003c940: 2020 2020 2020 203c 7370 616e 2063 6c61 When(self< │ │ │ │ -0003c990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ex │ │ │ │ -0003c9c0: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ -0003c9d0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -0003c9e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c then=True │ │ │ │ -0003ca30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ), │ │ │ │ -0003ca50: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0003ca60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 default< │ │ │ │ -0003ca80: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0003ca90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 False,. │ │ │ │ -0003cad0: 2020 2020 2020 2020 203c 7370 616e 2063 ). re │ │ │ │ -0003cb10: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn copy │ │ │ │ -0003cb30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003cb50: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -0003cb60: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(compiler, conn │ │ │ │ -0003cbd0: 6563 7469 6f6e 3c2f 7370 616e 3e3c 7370 ection). re │ │ │ │ -0003cc10: 7475 726e 3c2f 7370 616e 3e20 3c73 7061 turn sel │ │ │ │ -0003cc30: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003cc50: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003cc60: 6173 5f73 716c 3c2f 7370 616e 3e3c 7370 as_sql(compiler, con │ │ │ │ -0003ccd0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection)< │ │ │ │ -0003ccf0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ -0003cd10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> get_grou │ │ │ │ -0003cd30: 705f 6279 5f63 6f6c 733c 2f73 7061 6e3e p_by_cols │ │ │ │ -0003cd40: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003cd50: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0003cd90: 2020 2020 2020 3c73 7061 6e20 636c 6173 cols = []. for │ │ │ │ -0003ce00: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c source in │ │ │ │ -0003ce40: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.get_source_ │ │ │ │ -0003ce90: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions():. │ │ │ │ -0003cec0: 2020 2020 2020 2020 203c 7370 616e 2063 cols.exte │ │ │ │ -0003cf10: 6e64 3c2f 7370 616e 3e3c 7370 616e 2063 nd(source.< │ │ │ │ -0003cf60: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_group_ │ │ │ │ -0003cf80: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols() │ │ │ │ -0003cfa0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -0003cfb0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -0003cfd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -0003cfe0: 6f6c 733c 2f73 7061 6e3e 0a0a 2020 2020 ols.. │ │ │ │ -0003cff0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003d000: 6465 663c 2f73 7061 6e3e 203c 7370 616e def reve │ │ │ │ -0003d020: 7273 655f 6f72 6465 7269 6e67 3c2f 7370 rse_ordering(self │ │ │ │ -0003d060: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0003d080: 0a20 2020 2020 2020 203c 7370 616e 2063 . self.des │ │ │ │ -0003d0d0: 6365 6e64 696e 673c 2f73 7061 6e3e 203c cending < │ │ │ │ -0003d0e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -0003d0f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c not self │ │ │ │ -0003d130: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003d140: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .descendi │ │ │ │ -0003d160: 6e67 3c2f 7370 616e 3e0a 2020 2020 2020 ng. │ │ │ │ -0003d170: 2020 3c73 7061 6e20 636c 6173 733d 226b if sel │ │ │ │ -0003d1a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003d1c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003d1d0: 6e75 6c6c 735f 6669 7273 743c 2f73 7061 nulls_first:. │ │ │ │ -0003d200: 2020 2020 2020 203c 7370 616e 2063 6c61 self.nulls │ │ │ │ -0003d250: 5f6c 6173 743c 2f73 7061 6e3e 203c 7370 _last = True. < │ │ │ │ -0003d2a0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0003d2b0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.nulls_first = < │ │ │ │ -0003d310: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ -0003d320: 4e6f 6e65 3c2f 7370 616e 3e0a 2020 2020 None. │ │ │ │ -0003d330: 2020 2020 3c73 7061 6e20 636c 6173 733d elif │ │ │ │ -0003d350: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.nulls_last:. │ │ │ │ -0003d3c0: 2020 2020 2020 2020 2020 3c73 7061 6e20 self< │ │ │ │ -0003d3e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.nu │ │ │ │ -0003d410: 6c6c 735f 6669 7273 743c 2f73 7061 6e3e lls_first │ │ │ │ -0003d420: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = True< │ │ │ │ -0003d450: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0003d460: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ -0003d480: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003d490: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 nulls_las │ │ │ │ -0003d4b0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t = None. │ │ │ │ -0003d4f0: 2020 2020 2020 203c 7370 616e 2063 6c61 return self.. def asc(self):. │ │ │ │ -0003d5c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ -0003d5e0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0003d5f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 descendin │ │ │ │ -0003d610: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g = False. │ │ │ │ -0003d650: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -0003d670: 3c73 7061 6e20 636c 6173 733d 226e 6622 desc(self │ │ │ │ -0003d6c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003d6d0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -0003d6e0: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -0003d710: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>descending │ │ │ │ -0003d730: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -0003d750: 203c 7370 616e 2063 6c61 7373 3d22 6b63 True... │ │ │ │ -0003d770: 3c64 6976 2063 6c61 7373 3d22 7669 6577
    .[docs]. │ │ │ │ -0003d810: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003d820: 636c 6173 733c 2f73 7061 6e3e 203c 7370 class Wi │ │ │ │ -0003d840: 6e64 6f77 3c2f 7370 616e 3e3c 7370 616e ndow(SQLiteNumeric │ │ │ │ -0003d880: 4d69 7869 6e3c 2f73 7061 6e3e 3c73 7061 Mixin, Expression< │ │ │ │ -0003d8c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -0003d8e0: 2020 2020 3c73 7061 6e20 636c 6173 733d template = &q │ │ │ │ -0003d930: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;%(ex │ │ │ │ -0003d950: 7072 6573 7369 6f6e 2973 3c2f 7370 616e pression)s OVER ( │ │ │ │ -0003d980: 3c73 7061 6e20 636c 6173 733d 2273 6922 %(window)s)". # Althoug │ │ │ │ -0003d9e0: 6820 7468 6520 6d61 696e 2065 7870 7265 h the main expre │ │ │ │ -0003d9f0: 7373 696f 6e20 6d61 7920 6569 7468 6572 ssion may either │ │ │ │ -0003da00: 2062 6520 616e 2061 6767 7265 6761 7465 be an aggregate │ │ │ │ -0003da10: 206f 7220 616e 3c2f 7370 616e 3e0a 2020 or an. │ │ │ │ -0003da20: 2020 3c73 7061 6e20 636c 6173 733d 2263 # expression │ │ │ │ -0003da40: 7769 7468 2061 6e20 6167 6772 6567 6174 with an aggregat │ │ │ │ -0003da50: 6520 6675 6e63 7469 6f6e 2c20 7468 6520 e function, the │ │ │ │ -0003da60: 4752 4f55 5020 4259 2074 6861 7420 7769 GROUP BY that wi │ │ │ │ -0003da70: 6c6c 3c2f 7370 616e 3e0a 2020 2020 3c73 ll. # │ │ │ │ -0003da90: 2062 6520 696e 7472 6f64 7563 6564 2069 be introduced i │ │ │ │ -0003daa0: 6e20 7468 6520 7175 6572 7920 6173 2061 n the query as a │ │ │ │ -0003dab0: 2072 6573 756c 7420 6973 206e 6f74 2064 result is not d │ │ │ │ -0003dac0: 6573 6972 6564 2e3c 2f73 7061 6e3e 0a20 esired.. │ │ │ │ -0003dad0: 2020 203c 7370 616e 2063 6c61 7373 3d22 contains_aggr │ │ │ │ -0003daf0: 6567 6174 653c 2f73 7061 6e3e 203c 7370 egate = False. contains │ │ │ │ -0003db50: 5f6f 7665 725f 636c 6175 7365 3c2f 7370 _over_clause = Tr │ │ │ │ -0003db90: 7565 3c2f 7370 616e 3e0a 0a20 2020 203c ue.. < │ │ │ │ -0003dba0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0003dbb0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __ini │ │ │ │ -0003dbd0: 745f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 t__(. self │ │ │ │ -0003dc10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ -0003dc30: 2020 2020 2020 2020 3c73 7061 6e20 636c expressi │ │ │ │ -0003dc50: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on,. partit │ │ │ │ -0003dc90: 696f 6e5f 6279 3c2f 7370 616e 3e3c 7370 ion_by=None,. │ │ │ │ -0003dcf0: 2020 3c73 7061 6e20 636c 6173 733d 226e order_by=None,. │ │ │ │ -0003dd60: 2020 2020 2020 3c73 7061 6e20 636c 6173 frame=None< │ │ │ │ -0003ddb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ -0003ddd0: 2020 2020 2020 203c 7370 616e 2063 6c61 output_fi │ │ │ │ -0003ddf0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld=None,< │ │ │ │ -0003de40: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. ):. se │ │ │ │ -0003de80: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.partition_by = pa │ │ │ │ -0003def0: 7274 6974 696f 6e5f 6279 3c2f 7370 616e rtition_by. self< │ │ │ │ -0003df20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.or │ │ │ │ -0003df50: 6465 725f 6279 3c2f 7370 616e 3e20 3c73 der_by =< │ │ │ │ +0003c8b0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = self< │ │ │ │ +0003c8e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.co │ │ │ │ +0003c910: 7079 3c2f 7370 616e 3e3c 7370 616e 2063 py(). < │ │ │ │ +0003c940: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +0003c950: 6f70 793c 2f73 7061 6e3e 3c73 7061 6e20 opy.expression = Cas │ │ │ │ +0003c9c0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +0003c9e0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0003c9f0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 When(self │ │ │ │ +0003ca40: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003ca50: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .expressi │ │ │ │ +0003ca70: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, then=True),. │ │ │ │ +0003cb00: 2020 2020 2020 2020 2020 203c 7370 616e defau │ │ │ │ +0003cb20: 6c74 3c2f 7370 616e 3e3c 7370 616e 2063 lt=False,< │ │ │ │ +0003cb70: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0003cb80: 2020 203c 7370 616e 2063 6c61 7373 3d22 ). │ │ │ │ +0003cba0: 2020 2020 2020 2020 3c73 7061 6e20 636c return copy.as_sql< │ │ │ │ +0003cc10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(co │ │ │ │ +0003cc40: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler, connection │ │ │ │ +0003cc80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ +0003cca0: 2020 2020 2020 2020 3c73 7061 6e20 636c return self.as_sql │ │ │ │ +0003cd10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0003cd30: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +0003cd40: 6f6d 7069 6c65 723c 2f73 7061 6e3e 3c73 ompiler,< │ │ │ │ +0003cd60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ +0003cd80: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n) │ │ │ │ +0003cda0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +0003cdc0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 get_group_by_c │ │ │ │ +0003cde0: 6f6c 733c 2f73 7061 6e3e 3c73 7061 6e20 ols(self): │ │ │ │ +0003ce30: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003ce40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003ce50: 636f 6c73 3c2f 7370 616e 3e20 3c73 7061 cols = []. │ │ │ │ +0003ce90: 2020 2020 2020 203c 7370 616e 2063 6c61 for source │ │ │ │ +0003ced0: 3c73 7061 6e20 636c 6173 733d 226f 7722 in self │ │ │ │ +0003cf00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003cf20: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +0003cf30: 6574 5f73 6f75 7263 655f 6578 7072 6573 et_source_expres │ │ │ │ +0003cf40: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions():< │ │ │ │ +0003cf60: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +0003cf70: 2020 203c 7370 616e 2063 6c61 7373 3d22 cols.< │ │ │ │ +0003cfa0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>extend(sourc │ │ │ │ +0003cff0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ +0003d010: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003d020: 6765 745f 6772 6f75 705f 6279 5f63 6f6c get_group_by_col │ │ │ │ +0003d030: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s()). retur │ │ │ │ +0003d070: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n cols.. def reverse_or │ │ │ │ +0003d0d0: 6465 7269 6e67 3c2f 7370 616e 3e3c 7370 dering(self):. │ │ │ │ +0003d130: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +0003d150: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0003d160: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 descendin │ │ │ │ +0003d180: 673c 2f73 7061 6e3e 203c 7370 616e 2063 g = not s │ │ │ │ +0003d1d0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.descending. if self.nulls_ │ │ │ │ +0003d280: 6669 7273 743c 2f73 7061 6e3e 3c73 7061 first:. │ │ │ │ +0003d2b0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.nulls_last< │ │ │ │ +0003d300: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0003d320: 3c73 7061 6e20 636c 6173 733d 226b 6322 True. │ │ │ │ +0003d340: 2020 2020 2020 2020 203c 7370 616e 2063 self.nul │ │ │ │ +0003d390: 6c73 5f66 6972 7374 3c2f 7370 616e 3e20 ls_first │ │ │ │ +0003d3a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003d3b0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = None. el │ │ │ │ +0003d3f0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if self< │ │ │ │ +0003d410: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.nu │ │ │ │ +0003d440: 6c6c 735f 6c61 7374 3c2f 7370 616e 3e3c lls_last< │ │ │ │ +0003d450: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +0003d460: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003d470: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +0003d490: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003d4a0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .nulls_fi │ │ │ │ +0003d4c0: 7273 743c 2f73 7061 6e3e 203c 7370 616e rst = True │ │ │ │ +0003d500: 0a20 2020 2020 2020 2020 2020 203c 7370 . se │ │ │ │ +0003d520: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.nulls_last = Non │ │ │ │ +0003d590: 653c 2f73 7061 6e3e 0a20 2020 2020 2020 e. │ │ │ │ +0003d5a0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +0003d5c0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0003d5d0: 7365 6c66 3c2f 7370 616e 3e0a 0a20 2020 self.. │ │ │ │ +0003d5e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def asc │ │ │ │ +0003d610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0003d630: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0003d640: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. se │ │ │ │ +0003d680: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.descending = Fal │ │ │ │ +0003d6f0: 7365 3c2f 7370 616e 3e0a 0a20 2020 203c se.. < │ │ │ │ +0003d700: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +0003d710: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef desc< │ │ │ │ +0003d730: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ +0003d760: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf):. sel │ │ │ │ +0003d7a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0003d7c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003d7d0: 6465 7363 656e 6469 6e67 3c2f 7370 616e descending = True │ │ │ │ +0003d810: 3c2f 7370 616e 3e0a 0a0a 3c64 6976 2063 ...
    .[ │ │ │ │ +0003d8b0: 646f 6375 6d65 6e74 6174 6965 5d3c 2f61 documentatie].class < │ │ │ │ +0003d8e0: 7370 616e 2063 6c61 7373 3d22 6e63 223e span class="nc"> │ │ │ │ +0003d8f0: 5769 6e64 6f77 3c2f 7370 616e 3e3c 7370 Window(SQLiteNumer │ │ │ │ +0003d930: 6963 4d69 7869 6e3c 2f73 7061 6e3e 3c73 icMixin,< │ │ │ │ +0003d950: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Expressio │ │ │ │ +0003d970: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n):. template = < │ │ │ │ +0003d9d0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +0003d9e0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "%( │ │ │ │ +0003da00: 6578 7072 6573 7369 6f6e 2973 3c2f 7370 expression)s OVER (%(window)s)". # Altho │ │ │ │ +0003da90: 7567 6820 7468 6520 6d61 696e 2065 7870 ugh the main exp │ │ │ │ +0003daa0: 7265 7373 696f 6e20 6d61 7920 6569 7468 ression may eith │ │ │ │ +0003dab0: 6572 2062 6520 616e 2061 6767 7265 6761 er be an aggrega │ │ │ │ +0003dac0: 7465 206f 7220 616e 3c2f 7370 616e 3e0a te or an. │ │ │ │ +0003dad0: 2020 2020 3c73 7061 6e20 636c 6173 733d # expressio │ │ │ │ +0003daf0: 6e20 7769 7468 2061 6e20 6167 6772 6567 n with an aggreg │ │ │ │ +0003db00: 6174 6520 6675 6e63 7469 6f6e 2c20 7468 ate function, th │ │ │ │ +0003db10: 6520 4752 4f55 5020 4259 2074 6861 7420 e GROUP BY that │ │ │ │ +0003db20: 7769 6c6c 3c2f 7370 616e 3e0a 2020 2020 will. │ │ │ │ +0003db30: 3c73 7061 6e20 636c 6173 733d 2263 3122 # be introduced │ │ │ │ +0003db50: 2069 6e20 7468 6520 7175 6572 7920 6173 in the query as │ │ │ │ +0003db60: 2061 2072 6573 756c 7420 6973 206e 6f74 a result is not │ │ │ │ +0003db70: 2064 6573 6972 6564 2e3c 2f73 7061 6e3e desired. │ │ │ │ +0003db80: 0a20 2020 203c 7370 616e 2063 6c61 7373 . contains_ag │ │ │ │ +0003dba0: 6772 6567 6174 653c 2f73 7061 6e3e 203c gregate < │ │ │ │ +0003dbb0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0003dbc0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c False. contai │ │ │ │ +0003dc00: 6e73 5f6f 7665 725f 636c 6175 7365 3c2f ns_over_clause = < │ │ │ │ +0003dc30: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +0003dc40: 5472 7565 3c2f 7370 616e 3e0a 0a20 2020 True.. │ │ │ │ +0003dc50: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __i │ │ │ │ +0003dc80: 6e69 745f 5f3c 2f73 7061 6e3e 3c73 7061 nit__(. se │ │ │ │ +0003dcc0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf,. expres │ │ │ │ +0003dd00: 7369 6f6e 3c2f 7370 616e 3e3c 7370 616e sion,. part │ │ │ │ +0003dd40: 6974 696f 6e5f 6279 3c2f 7370 616e 3e3c ition_by< │ │ │ │ +0003dd50: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0003dd60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None,. │ │ │ │ +0003dda0: 2020 2020 3c73 7061 6e20 636c 6173 733d order_by=None │ │ │ │ +0003ddf0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ +0003de10: 2020 2020 2020 2020 3c73 7061 6e20 636c frame=Non │ │ │ │ +0003de60: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ +0003de80: 0a20 2020 2020 2020 203c 7370 616e 2063 . output_ │ │ │ │ +0003dea0: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field=None │ │ │ │ +0003dee0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003def0: 2c3c 2f73 7061 6e3e 0a20 2020 203c 7370 ,. ):< │ │ │ │ +0003df10: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ +0003df20: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0003df30: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.partition_by< │ │ │ │ 0003df70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> order_by< │ │ │ │ -0003df90: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -0003dfa0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -0003dfb0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.frame │ │ │ │ -0003dff0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003e000: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = frame.. < │ │ │ │ -0003e030: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -0003e040: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f not getattr(expr │ │ │ │ -0003e0b0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession, "win │ │ │ │ -0003e0f0: 646f 775f 636f 6d70 6174 6962 6c65 2671 dow_compatible&q │ │ │ │ -0003e100: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;, False):. │ │ │ │ -0003e160: 2020 2020 2020 203c 7370 616e 2063 6c61 raise ValueError< │ │ │ │ -0003e1a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(. │ │ │ │ -0003e1c0: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ -0003e1d0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -0003e1e0: 2671 756f 743b 4578 7072 6573 7369 6f6e "Expression │ │ │ │ -0003e1f0: 2026 2333 393b 3c2f 7370 616e 3e3c 7370 '%s │ │ │ │ -0003e210: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ' is │ │ │ │ -0003e230: 6e26 2333 393b 7420 636f 6d70 6174 6962 n't compatib │ │ │ │ -0003e240: 6c65 2077 6974 6820 4f56 4552 2063 6c61 le with OVER cla │ │ │ │ -0003e250: 7573 6573 2e26 7175 6f74 3b3c 2f73 7061 uses.". │ │ │ │ -0003e270: 2020 203c 7370 616e 2063 6c61 7373 3d22 % expr │ │ │ │ -0003e2a0: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession.__class__< │ │ │ │ -0003e2e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>._ │ │ │ │ -0003e310: 5f6e 616d 655f 5f3c 2f73 7061 6e3e 0a20 _name__. │ │ │ │ -0003e320: 2020 2020 2020 2020 2020 203c 7370 616e ).. if< │ │ │ │ -0003e360: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.parti │ │ │ │ -0003e3b0: 7469 6f6e 5f62 793c 2f73 7061 6e3e 203c tion_by < │ │ │ │ -0003e3c0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0003e3d0: 6973 3c2f 7370 616e 3e20 3c73 7061 6e20 is not None:. │ │ │ │ -0003e430: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -0003e450: 203c 7370 616e 2063 6c61 7373 3d22 6f77 not is │ │ │ │ -0003e480: 696e 7374 616e 6365 3c2f 7370 616e 3e3c instance< │ │ │ │ -0003e490: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0003e4a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.parti │ │ │ │ -0003e4f0: 7469 6f6e 5f62 793c 2f73 7061 6e3e 3c73 tion_by,< │ │ │ │ -0003e510: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ -0003e530: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0003e540: 7475 706c 653c 2f73 7061 6e3e 3c73 7061 tuple, list)):. │ │ │ │ -0003e5a0: 2020 2020 2020 2020 2020 2020 3c73 7061 sel │ │ │ │ -0003e5c0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003e5e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003e5f0: 7061 7274 6974 696f 6e5f 6279 3c2f 7370 partition_by = (self.partiti │ │ │ │ -0003e680: 6f6e 5f62 793c 2f73 7061 6e3e 3c73 7061 on_by,). │ │ │ │ -0003e6b0: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -0003e6e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>partition_ │ │ │ │ -0003e700: 6279 3c2f 7370 616e 3e20 3c73 7061 6e20 by = ExpressionLis │ │ │ │ -0003e740: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ -0003e760: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003e770: 2a3c 2f73 7061 6e3e 3c73 7061 6e20 636c *self.part │ │ │ │ -0003e7c0: 6974 696f 6e5f 6279 3c2f 7370 616e 3e3c ition_by< │ │ │ │ -0003e7d0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -0003e7e0: 3c2f 7370 616e 3e0a 0a20 2020 2020 2020 .. │ │ │ │ -0003e7f0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ -0003e820: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003e840: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0003e850: 7264 6572 5f62 793c 2f73 7061 6e3e 203c rder_by < │ │ │ │ -0003e860: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -0003e870: 6973 3c2f 7370 616e 3e20 3c73 7061 6e20 is not None:. │ │ │ │ -0003e8d0: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ -0003e8f0: 203c 7370 616e 2063 6c61 7373 3d22 6e62 isinstance(self │ │ │ │ -0003e940: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003e960: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0003e970: 7264 6572 5f62 793c 2f73 7061 6e3e 3c73 rder_by,< │ │ │ │ -0003e990: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ -0003e9b0: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0003e9c0: 6c69 7374 3c2f 7370 616e 3e3c 7370 616e list, tuple)):. │ │ │ │ -0003ea20: 2020 2020 2020 2020 2020 2020 3c73 7061 sel │ │ │ │ -0003ea40: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003ea60: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003ea70: 6f72 6465 725f 6279 3c2f 7370 616e 3e20 order_by │ │ │ │ -0003ea80: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003ea90: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = OrderBy │ │ │ │ -0003eab0: 4c69 7374 3c2f 7370 616e 3e3c 7370 616e List(*self │ │ │ │ -0003eb00: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003eb20: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0003eb30: 7264 6572 5f62 793c 2f73 7061 6e3e 3c73 rder_by)< │ │ │ │ -0003eb50: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -0003eb60: 2020 203c 7370 616e 2063 6c61 7373 3d22 elif < │ │ │ │ -0003eb80: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ -0003eb90: 6973 696e 7374 616e 6365 3c2f 7370 616e isinstance(self.ord │ │ │ │ -0003ec00: 6572 5f62 793c 2f73 7061 6e3e 3c73 7061 er_by, (Bas │ │ │ │ -0003ec50: 6545 7870 7265 7373 696f 6e3c 2f73 7061 eExpression, str< │ │ │ │ -0003ec90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>)): │ │ │ │ -0003ecb0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0003ecc0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.order_by = Or │ │ │ │ -0003ed40: 6465 7242 794c 6973 743c 2f73 7061 6e3e derByList │ │ │ │ -0003ed50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003ed60: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.orde │ │ │ │ -0003edb0: 725f 6279 3c2f 7370 616e 3e3c 7370 616e r_by). │ │ │ │ -0003ede0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003edf0: 656c 7365 3c2f 7370 616e 3e3c 7370 616e else:. │ │ │ │ -0003ee20: 2020 2020 3c73 7061 6e20 636c 6173 733d raise │ │ │ │ -0003ee40: 203c 7370 616e 2063 6c61 7373 3d22 6e65 ValueError(. │ │ │ │ -0003ee80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0003ee90: 3c73 7061 6e20 636c 6173 733d 2273 3222 "Window.or │ │ │ │ -0003eeb0: 6465 725f 6279 206d 7573 7420 6265 2065 der_by must be e │ │ │ │ -0003eec0: 6974 6865 7220 6120 7374 7269 6e67 2072 ither a string r │ │ │ │ -0003eed0: 6566 6572 656e 6365 2074 6f20 6120 2671 eference to a &q │ │ │ │ -0003eee0: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ -0003eef0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0003ef00: 3c73 7061 6e20 636c 6173 733d 2273 3222 "field, an │ │ │ │ -0003ef20: 2065 7870 7265 7373 696f 6e2c 206f 7220 expression, or │ │ │ │ -0003ef30: 6120 6c69 7374 206f 7220 7475 706c 6520 a list or tuple │ │ │ │ -0003ef40: 6f66 2074 6865 6d2e 2671 756f 743b 3c2f of them.". │ │ │ │ -0003ef60: 2020 2020 2020 3c73 7061 6e20 636c 6173 ). │ │ │ │ -0003ef80: 2020 2020 2020 203c 7370 616e 2063 6c61 super().__init__(out │ │ │ │ -0003f020: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -0003f030: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003f040: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =output_f │ │ │ │ -0003f060: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield). sel │ │ │ │ -0003f0a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -0003f0c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0003f0d0: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ -0003f0e0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n = self.< │ │ │ │ -0003f130: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>_parse_exp │ │ │ │ -0003f150: 7265 7373 696f 6e73 3c2f 7370 616e 3e3c ressions< │ │ │ │ -0003f160: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0003f170: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 expressio │ │ │ │ -0003f190: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n)[0].. def _resolve_out │ │ │ │ -0003f220: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -0003f230: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -0003f240: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -0003f280: 2020 2020 2020 3c73 7061 6e20 636c 6173 return self │ │ │ │ -0003f2c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003f2d0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .source_e │ │ │ │ -0003f2f0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ -0003f300: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003f310: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .output_f │ │ │ │ -0003f330: 6965 6c64 3c2f 7370 616e 3e0a 0a20 2020 ield.. │ │ │ │ -0003f340: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def get │ │ │ │ -0003f370: 5f73 6f75 7263 655f 6578 7072 6573 7369 _source_expressi │ │ │ │ -0003f380: 6f6e 733c 2f73 7061 6e3e 3c73 7061 6e20 ons(self): │ │ │ │ -0003f3d0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0003f3e0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -0003f3f0: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return [< │ │ │ │ -0003f410: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.source │ │ │ │ -0003f460: 5f65 7870 7265 7373 696f 6e3c 2f73 7061 _expression, self │ │ │ │ -0003f4a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003f4c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -0003f4d0: 6172 7469 7469 6f6e 5f62 793c 2f73 7061 artition_by, self │ │ │ │ -0003f510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0003f530: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -0003f540: 7264 6572 5f62 793c 2f73 7061 6e3e 3c73 rder_by,< │ │ │ │ -0003f560: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.frame │ │ │ │ -0003f5b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ]. │ │ │ │ -0003f5d0: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -0003f5f0: 3c73 7061 6e20 636c 6173 733d 226e 6622 set_source_expr │ │ │ │ -0003f610: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions(< │ │ │ │ -0003f630: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, exprs │ │ │ │ -0003f680: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -0003f6a0: 0a20 2020 2020 2020 203c 7370 616e 2063 . self.sou │ │ │ │ -0003f6f0: 7263 655f 6578 7072 6573 7369 6f6e 3c2f rce_expression, s │ │ │ │ -0003f730: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.partition_by, s │ │ │ │ -0003f7a0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.order_by, self< │ │ │ │ -0003f810: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.fr │ │ │ │ -0003f840: 616d 653c 2f73 7061 6e3e 203c 7370 616e ame = exprs │ │ │ │ -0003f880: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -0003f8a0: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sql< │ │ │ │ -0003f8c0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0003f8d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, comp │ │ │ │ -0003f920: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler, connection, te │ │ │ │ -0003f990: 6d70 6c61 7465 3c2f 7370 616e 3e3c 7370 mplate=None):. │ │ │ │ -0003f9f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 connection.ops< │ │ │ │ -0003fa40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ch │ │ │ │ -0003fa70: 6563 6b5f 6578 7072 6573 7369 6f6e 5f73 eck_expression_s │ │ │ │ -0003fa80: 7570 706f 7274 3c2f 7370 616e 3e3c 7370 upport(self). │ │ │ │ -0003fae0: 2020 3c73 7061 6e20 636c 6173 733d 226b if not │ │ │ │ -0003fb10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -0003fb30: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on.features │ │ │ │ -0003fb70: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003fb80: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .supports │ │ │ │ -0003fba0: 5f6f 7665 725f 636c 6175 7365 3c2f 7370 _over_clause:. │ │ │ │ -0003fbd0: 2020 2020 2020 2020 3c73 7061 6e20 636c raise NotSupporte │ │ │ │ -0003fc10: 6445 7272 6f72 3c2f 7370 616e 3e3c 7370 dError("This │ │ │ │ -0003fc50: 2062 6163 6b65 6e64 2064 6f65 7320 6e6f backend does no │ │ │ │ -0003fc60: 7420 7375 7070 6f72 7420 7769 6e64 6f77 t support window │ │ │ │ -0003fc70: 2065 7870 7265 7373 696f 6e73 2e26 7175 expressions.&qu │ │ │ │ -0003fc80: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;). expr_ │ │ │ │ -0003fcc0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql, params │ │ │ │ -0003fd00: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = compil │ │ │ │ -0003fd30: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.compile< │ │ │ │ -0003fd70: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0003fd80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.sourc │ │ │ │ -0003fdd0: 655f 6578 7072 6573 7369 6f6e 3c2f 7370 e_expression). │ │ │ │ -0003fe00: 2020 2020 3c73 7061 6e20 636c 6173 733d window_sql, wi │ │ │ │ -0003fe50: 6e64 6f77 5f70 6172 616d 733c 2f73 7061 ndow_params = [],< │ │ │ │ -0003fe90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> () │ │ │ │ -0003feb0: 0a0a 2020 2020 2020 2020 3c73 7061 6e20 .. if self │ │ │ │ -0003fef0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0003ff00: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .partitio │ │ │ │ -0003ff20: 6e5f 6279 3c2f 7370 616e 3e20 3c73 7061 n_by is< │ │ │ │ -0003ff40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> not None< │ │ │ │ -0003ff80: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -0003ff90: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0003ffa0: 2020 2020 3c73 7061 6e20 636c 6173 733d sql_expr, sql_ │ │ │ │ -0003fff0: 7061 7261 6d73 3c2f 7370 616e 3e20 3c73 params =< │ │ │ │ -00040010: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.parti │ │ │ │ -00040060: 7469 6f6e 5f62 793c 2f73 7061 6e3e 3c73 tion_by.< │ │ │ │ -00040080: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>as_sql(. │ │ │ │ -000400c0: 2020 2020 2020 2020 2020 2020 3c73 7061 comp │ │ │ │ -000400e0: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler=compiler,. │ │ │ │ -00040140: 2020 2020 2020 2020 2020 203c 7370 616e conne │ │ │ │ -00040160: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction=connection,. │ │ │ │ -000401c0: 2020 2020 2020 2020 2020 2020 2020 3c73 te │ │ │ │ -000401e0: 6d70 6c61 7465 3c2f 7370 616e 3e3c 7370 mplate="PART │ │ │ │ -00040220: 4954 494f 4e20 4259 203c 2f73 7061 6e3e ITION BY │ │ │ │ -00040230: 3c73 7061 6e20 636c 6173 733d 2273 6922 %(expressions)s │ │ │ │ +0003df80: 7373 3d22 6f22 3e3d 3c2f 7370 616e 3e20 ss="o">= │ │ │ │ +0003df90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003dfa0: 7061 7274 6974 696f 6e5f 6279 3c2f 7370 partition_by. sel │ │ │ │ +0003dfd0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0003dff0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003e000: 6f72 6465 725f 6279 3c2f 7370 616e 3e20 order_by │ │ │ │ +0003e010: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003e020: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = order_b │ │ │ │ +0003e040: 793c 2f73 7061 6e3e 0a20 2020 2020 2020 y. │ │ │ │ +0003e050: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.frame = frame │ │ │ │ +0003e0d0: 3c2f 7370 616e 3e0a 0a20 2020 2020 2020 .. │ │ │ │ +0003e0e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if not< │ │ │ │ +0003e110: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> getattr< │ │ │ │ +0003e130: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(ex │ │ │ │ +0003e160: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0003e170: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0003e180: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "w │ │ │ │ +0003e1a0: 696e 646f 775f 636f 6d70 6174 6962 6c65 indow_compatible │ │ │ │ +0003e1b0: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ", False):. │ │ │ │ +0003e210: 2020 2020 2020 2020 203c 7370 616e 2063 raise ValueErro │ │ │ │ +0003e250: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +0003e270: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ +0003e280: 203c 7370 616e 2063 6c61 7373 3d22 7332 "Expressi │ │ │ │ +0003e2a0: 6f6e 2026 2333 393b 3c2f 7370 616e 3e3c on '< │ │ │ │ +0003e2b0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +0003e2c0: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s' │ │ │ │ +0003e2e0: 6973 6e26 2333 393b 7420 636f 6d70 6174 isn't compat │ │ │ │ +0003e2f0: 6962 6c65 2077 6974 6820 4f56 4552 2063 ible with OVER c │ │ │ │ +0003e300: 6c61 7573 6573 2e26 7175 6f74 3b3c 2f73 lauses.". │ │ │ │ +0003e320: 2020 2020 203c 7370 616e 2063 6c61 7373 % ex │ │ │ │ +0003e350: 7072 6573 7369 6f6e 3c2f 7370 616e 3e3c pression< │ │ │ │ +0003e360: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0003e370: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ +0003e390: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _. │ │ │ │ +0003e3b0: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __name__ │ │ │ │ +0003e3d0: 0a20 2020 2020 2020 2020 2020 203c 7370 . ).. < │ │ │ │ +0003e400: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ +0003e410: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f self.par │ │ │ │ +0003e460: 7469 7469 6f6e 5f62 793c 2f73 7061 6e3e tition_by │ │ │ │ +0003e470: 203c 7370 616e 2063 6c61 7373 3d22 6f77 is not │ │ │ │ +0003e4a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c None:. │ │ │ │ +0003e4e0: 2020 2020 2020 2020 203c 7370 616e 2063 if not < │ │ │ │ +0003e520: 7370 616e 2063 6c61 7373 3d22 6e62 223e span class="nb"> │ │ │ │ +0003e530: 6973 696e 7374 616e 6365 3c2f 7370 616e isinstance(self.par │ │ │ │ +0003e5a0: 7469 7469 6f6e 5f62 793c 2f73 7061 6e3e tition_by │ │ │ │ +0003e5b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003e5c0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , (tuple,< │ │ │ │ +0003e610: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> list)):. │ │ │ │ +0003e650: 2020 2020 2020 2020 2020 2020 2020 3c73 s │ │ │ │ +0003e670: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.partition_by = < │ │ │ │ +0003e6d0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0003e6e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.parti │ │ │ │ +0003e730: 7469 6f6e 5f62 793c 2f73 7061 6e3e 3c73 tion_by,) │ │ │ │ +0003e750: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003e760: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ +0003e780: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003e790: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .partitio │ │ │ │ +0003e7b0: 6e5f 6279 3c2f 7370 616e 3e20 3c73 7061 n_by = ExpressionL │ │ │ │ +0003e7f0: 6973 743c 2f73 7061 6e3e 3c73 7061 6e20 ist(*self< │ │ │ │ +0003e840: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.pa │ │ │ │ +0003e870: 7274 6974 696f 6e5f 6279 3c2f 7370 616e rtition_by).. │ │ │ │ +0003e8a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if se │ │ │ │ +0003e8d0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.order_by │ │ │ │ +0003e910: 203c 7370 616e 2063 6c61 7373 3d22 6f77 is not │ │ │ │ +0003e940: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c None:. │ │ │ │ +0003e980: 2020 2020 2020 2020 203c 7370 616e 2063 if isinstance(se │ │ │ │ +0003e9f0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.order_by │ │ │ │ +0003ea30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003ea40: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , (list, tuple)):. │ │ │ │ +0003ead0: 2020 2020 2020 2020 2020 2020 2020 3c73 s │ │ │ │ +0003eaf0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.order_by = Order │ │ │ │ +0003eb60: 4279 4c69 7374 3c2f 7370 616e 3e3c 7370 ByList(*se │ │ │ │ +0003ebb0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.order_by │ │ │ │ +0003ebf0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003ec00: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +0003ec10: 2020 2020 203c 7370 616e 2063 6c61 7373 elif │ │ │ │ +0003ec30: 203c 7370 616e 2063 6c61 7373 3d22 6e62 isinstance(self │ │ │ │ +0003ec80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003eca0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +0003ecb0: 7264 6572 5f62 793c 2f73 7061 6e3e 3c73 rder_by,< │ │ │ │ +0003ecd0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ +0003ecf0: 7370 616e 2063 6c61 7373 3d22 6e22 3e42 span class="n">B │ │ │ │ +0003ed00: 6173 6545 7870 7265 7373 696f 6e3c 2f73 aseExpression, st │ │ │ │ +0003ed40: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r)):. │ │ │ │ +0003ed70: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +0003ed90: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0003eda0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 order_by< │ │ │ │ +0003edc0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0003ede0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003edf0: 4f72 6465 7242 794c 6973 743c 2f73 7061 OrderByList(self< │ │ │ │ +0003ee30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.or │ │ │ │ +0003ee60: 6465 725f 6279 3c2f 7370 616e 3e3c 7370 der_by). │ │ │ │ +0003ee90: 2020 3c73 7061 6e20 636c 6173 733d 226b else:. │ │ │ │ +0003eed0: 2020 2020 2020 3c73 7061 6e20 636c 6173 raise ValueError(. │ │ │ │ +0003ef30: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0003ef40: 2020 3c73 7061 6e20 636c 6173 733d 2273 "Window. │ │ │ │ +0003ef60: 6f72 6465 725f 6279 206d 7573 7420 6265 order_by must be │ │ │ │ +0003ef70: 2065 6974 6865 7220 6120 7374 7269 6e67 either a string │ │ │ │ +0003ef80: 2072 6566 6572 656e 6365 2074 6f20 6120 reference to a │ │ │ │ +0003ef90: 2671 756f 743b 3c2f 7370 616e 3e0a 2020 ". │ │ │ │ +0003efa0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +0003efb0: 2020 3c73 7061 6e20 636c 6173 733d 2273 "field, │ │ │ │ +0003efd0: 616e 2065 7870 7265 7373 696f 6e2c 206f an expression, o │ │ │ │ +0003efe0: 7220 6120 6c69 7374 206f 7220 7475 706c r a list or tupl │ │ │ │ +0003eff0: 6520 6f66 2074 6865 6d2e 2671 756f 743b e of them." │ │ │ │ +0003f000: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +0003f010: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ +0003f030: 0a20 2020 2020 2020 203c 7370 616e 2063 . super< │ │ │ │ +0003f050: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>()< │ │ │ │ +0003f070: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +0003f080: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __init__ │ │ │ │ +0003f0a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +0003f0c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +0003f0d0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field=output │ │ │ │ +0003f110: 5f66 6965 6c64 3c2f 7370 616e 3e3c 7370 _field). s │ │ │ │ +0003f150: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.source_express │ │ │ │ +0003f190: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion = self │ │ │ │ +0003f1d0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0003f1e0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c ._parse_e │ │ │ │ +0003f200: 7870 7265 7373 696f 6e73 3c2f 7370 616e xpressions(express │ │ │ │ +0003f240: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion)[0].. def _resolve_o │ │ │ │ +0003f2d0: 7574 7075 745f 6669 656c 643c 2f73 7061 utput_field(self< │ │ │ │ +0003f310: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +0003f330: 2020 2020 2020 2020 3c73 7061 6e20 636c return self.source │ │ │ │ +0003f3a0: 5f65 7870 7265 7373 696f 6e3c 2f73 7061 _expression.output │ │ │ │ +0003f3e0: 5f66 6965 6c64 3c2f 7370 616e 3e0a 0a20 _field.. │ │ │ │ +0003f3f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def g │ │ │ │ +0003f420: 6574 5f73 6f75 7263 655f 6578 7072 6573 et_source_expres │ │ │ │ +0003f430: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions(self │ │ │ │ +0003f470: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003f480: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +0003f490: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +0003f4b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003f4c0: 5b3c 2f73 7061 6e3e 3c73 7061 6e20 636c [self.sour │ │ │ │ +0003f510: 6365 5f65 7870 7265 7373 696f 6e3c 2f73 ce_expression, se │ │ │ │ +0003f550: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.partition_by, se │ │ │ │ +0003f5c0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.order_by │ │ │ │ +0003f600: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003f610: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.fra │ │ │ │ +0003f660: 6d65 3c2f 7370 616e 3e3c 7370 616e 2063 me].. def set_source_ex │ │ │ │ +0003f6c0: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ +0003f6d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0003f6e0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, exp │ │ │ │ +0003f730: 7273 3c2f 7370 616e 3e3c 7370 616e 2063 rs):. self │ │ │ │ +0003f770: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0003f790: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +0003f7a0: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +0003f7b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0003f7d0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.partition_by │ │ │ │ +0003f820: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0003f840: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.order_by, sel │ │ │ │ +0003f8c0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +0003f8e0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003f8f0: 6672 616d 653c 2f73 7061 6e3e 203c 7370 frame = exprs.. def as_sql(self, co │ │ │ │ +0003f9d0: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler, connection │ │ │ │ +0003fa10: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0003fa30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003fa40: 7465 6d70 6c61 7465 3c2f 7370 616e 3e3c template< │ │ │ │ +0003fa50: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0003fa60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 None):. │ │ │ │ +0003faa0: 2020 2020 203c 7370 616e 2063 6c61 7373 connection< │ │ │ │ +0003fac0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.op │ │ │ │ +0003faf0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +0003fb10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003fb20: 6368 6563 6b5f 6578 7072 6573 7369 6f6e check_expression │ │ │ │ +0003fb30: 5f73 7570 706f 7274 3c2f 7370 616e 3e3c _support< │ │ │ │ +0003fb40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0003fb50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self). │ │ │ │ +0003fb90: 2020 2020 3c73 7061 6e20 636c 6173 733d if n │ │ │ │ +0003fbc0: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot connec │ │ │ │ +0003fbe0: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion.features.suppor │ │ │ │ +0003fc50: 7473 5f6f 7665 725f 636c 6175 7365 3c2f ts_over_clause:. │ │ │ │ +0003fc80: 2020 2020 2020 2020 2020 3c73 7061 6e20 raise< │ │ │ │ +0003fca0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> NotSuppor │ │ │ │ +0003fcc0: 7465 6445 7272 6f72 3c2f 7370 616e 3e3c tedError< │ │ │ │ +0003fcd0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0003fce0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "Th │ │ │ │ +0003fd00: 6973 2062 6163 6b65 6e64 2064 6f65 7320 is backend does │ │ │ │ +0003fd10: 6e6f 7420 7375 7070 6f72 7420 7769 6e64 not support wind │ │ │ │ +0003fd20: 6f77 2065 7870 7265 7373 696f 6e73 2e26 ow expressions.& │ │ │ │ +0003fd30: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;). exp │ │ │ │ +0003fd70: 725f 7371 6c3c 2f73 7061 6e3e 3c73 7061 r_sql, params = comp │ │ │ │ +0003fde0: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(self.sou │ │ │ │ +0003fe80: 7263 655f 6578 7072 6573 7369 6f6e 3c2f rce_expression). │ │ │ │ +0003feb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 window_sql │ │ │ │ +0003fed0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0003fef0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0003ff00: 7769 6e64 6f77 5f70 6172 616d 733c 2f73 window_params = [] │ │ │ │ +0003ff40: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , ().. if self.partit │ │ │ │ +0003ffd0: 696f 6e5f 6279 3c2f 7370 616e 3e20 3c73 ion_by i │ │ │ │ +0003fff0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s not None:. │ │ │ │ +00040050: 2020 2020 2020 3c73 7061 6e20 636c 6173 sql_expr, sq │ │ │ │ +000400a0: 6c5f 7061 7261 6d73 3c2f 7370 616e 3e20 l_params │ │ │ │ +000400b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +000400c0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = self.par │ │ │ │ +00040110: 7469 7469 6f6e 5f62 793c 2f73 7061 6e3e tition_by │ │ │ │ +00040120: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00040130: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .as_sql(. │ │ │ │ +00040170: 2020 2020 2020 2020 2020 2020 2020 3c73 co │ │ │ │ +00040190: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler=compiler,. │ │ │ │ +000401f0: 2020 2020 2020 2020 2020 2020 203c 7370 con │ │ │ │ +00040210: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection=< │ │ │ │ +00040230: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>connection │ │ │ │ 00040250: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ",. │ │ │ │ -00040290: 2020 2020 2020 2020 2020 3c73 7061 6e20 ). < │ │ │ │ -000402c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e77 span class="n">w │ │ │ │ -000402d0: 696e 646f 775f 7371 6c3c 2f73 7061 6e3e indow_sql │ │ │ │ -000402e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000402f0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .append(sql │ │ │ │ -00040340: 5f65 7870 723c 2f73 7061 6e3e 3c73 7061 _expr,. │ │ │ │ +00040270: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00040280: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00040290: 7465 6d70 6c61 7465 3c2f 7370 616e 3e3c template< │ │ │ │ +000402a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +000402b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 "PA │ │ │ │ +000402d0: 5254 4954 494f 4e20 4259 203c 2f73 7061 RTITION BY %(expressions │ │ │ │ +00040300: 2973 3c2f 7370 616e 3e3c 7370 616e 2063 )s" │ │ │ │ +00040320: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ +00040340: 2020 2020 2020 2020 2020 2020 3c73 7061 ). │ │ │ │ 00040370: 203c 7370 616e 2063 6c61 7373 3d22 6e22 window_params += │ │ │ │ -000403b0: 3c73 7061 6e20 636c 6173 733d 226e 6222 tuple(sql_params< │ │ │ │ -00040400: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ -00040420: 2020 2020 2020 2020 3c73 7061 6e20 636c if self.< │ │ │ │ -00040470: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>order_by is │ │ │ │ -000404b0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 not No │ │ │ │ -000404e0: 6e65 3c2f 7370 616e 3e3c 7370 616e 2063 ne:. or │ │ │ │ -00040520: 6465 725f 7371 6c3c 2f73 7061 6e3e 3c73 der_sql,< │ │ │ │ -00040540: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> order_par │ │ │ │ -00040560: 616d 733c 2f73 7061 6e3e 203c 7370 616e ams = compiler.compi │ │ │ │ -000405d0: 6c65 3c2f 7370 616e 3e3c 7370 616e 2063 le(self.order_by). │ │ │ │ -00040660: 2020 2020 2020 2020 203c 7370 616e 2063 window_ │ │ │ │ -00040680: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql.append< │ │ │ │ -000406c0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00040380: 3e77 696e 646f 775f 7371 6c3c 2f73 7061 >window_sql.append │ │ │ │ +000403c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000403e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +000403f0: 716c 5f65 7870 723c 2f73 7061 6e3e 3c73 ql_expr)< │ │ │ │ +00040410: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00040420: 2020 203c 7370 616e 2063 6c61 7373 3d22 window_params │ │ │ │ +00040440: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c += tuple< │ │ │ │ +00040480: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00040490: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 sql_param │ │ │ │ +000404b0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ +000404d0: 0a0a 2020 2020 2020 2020 3c73 7061 6e20 .. if self │ │ │ │ +00040510: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00040520: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .order_by │ │ │ │ +00040540: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c is not < │ │ │ │ +00040580: 7370 616e 2063 6c61 7373 3d22 6b63 223e span class="kc"> │ │ │ │ +00040590: 4e6f 6e65 3c2f 7370 616e 3e3c 7370 616e None:. │ │ │ │ +000405c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000405d0: 6f72 6465 725f 7371 6c3c 2f73 7061 6e3e order_sql │ │ │ │ +000405e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000405f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , order_p │ │ │ │ +00040610: 6172 616d 733c 2f73 7061 6e3e 203c 7370 arams = compiler.com │ │ │ │ +00040680: 7069 6c65 3c2f 7370 616e 3e3c 7370 616e pile(self< │ │ │ │ +000406c0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ 000406d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 order_sql │ │ │ │ -000406f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00040710: 2020 2020 2020 2020 2020 2020 3c73 7061 wind │ │ │ │ -00040730: 6f77 5f70 6172 616d 733c 2f73 7061 6e3e ow_params │ │ │ │ -00040740: 203c 7370 616e 2063 6c61 7373 3d22 6f22 += tupl │ │ │ │ -00040770: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -00040790: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000407a0: 6f72 6465 725f 7061 7261 6d73 3c2f 7370 order_params).. │ │ │ │ -000407d0: 2020 2020 203c 7370 616e 2063 6c61 7373 if < │ │ │ │ -000407f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00040800: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.frame< │ │ │ │ -00040840: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -00040850: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00040860: 2020 2020 3c73 7061 6e20 636c 6173 733d frame_sql, fra │ │ │ │ -000408b0: 6d65 5f70 6172 616d 733c 2f73 7061 6e3e me_params │ │ │ │ -000408c0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = compil │ │ │ │ -000408f0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er.compile< │ │ │ │ -00040930: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00040940: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.frame │ │ │ │ -00040990: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -000409b0: 2020 2020 2020 2020 2020 2020 3c73 7061 wind │ │ │ │ -000409d0: 6f77 5f73 716c 3c2f 7370 616e 3e3c 7370 ow_sql.append(frame_ │ │ │ │ -00040a40: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql). < │ │ │ │ -00040a70: 7370 616e 2063 6c61 7373 3d22 6e22 3e77 span class="n">w │ │ │ │ -00040a80: 696e 646f 775f 7061 7261 6d73 3c2f 7370 indow_params += t │ │ │ │ -00040ac0: 7570 6c65 3c2f 7370 616e 3e3c 7370 616e uple(frame_params< │ │ │ │ -00040b00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ -00040b20: 2020 2020 2020 2020 3c73 7061 6e20 636c template │ │ │ │ -00040b40: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ -00040b60: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -00040b80: 203c 7370 616e 2063 6c61 7373 3d22 6f77 or sel │ │ │ │ -00040bb0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00040bd0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00040be0: 7465 6d70 6c61 7465 3c2f 7370 616e 3e0a template. │ │ │ │ -00040bf0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -00040c10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (. │ │ │ │ -00040c30: 2020 2020 2020 2020 2020 2020 3c73 7061 temp │ │ │ │ -00040c50: 6c61 7465 3c2f 7370 616e 3e20 3c73 7061 late % {&q │ │ │ │ -00040ca0: 756f 743b 6578 7072 6573 7369 6f6e 2671 uot;expression&q │ │ │ │ -00040cb0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;: expr_sql, &qu │ │ │ │ -00040d20: 6f74 3b77 696e 646f 7726 7175 6f74 3b3c ot;window"< │ │ │ │ -00040d30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>: < │ │ │ │ -00040d50: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00040d60: 2671 756f 743b 2026 7175 6f74 3b3c 2f73 " ".join │ │ │ │ -00040da0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00040dc0: 7370 616e 2063 6c61 7373 3d22 6e22 3e77 span class="n">w │ │ │ │ -00040dd0: 696e 646f 775f 7371 6c3c 2f73 7061 6e3e indow_sql │ │ │ │ -00040de0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00040df0: 293c 2f73 7061 6e3e 3c73 7061 6e20 636c ). │ │ │ │ -00040e10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00040e20: 7374 7269 703c 2f73 7061 6e3e 3c73 7061 strip()}, │ │ │ │ -00040e40: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00040e50: 2020 2020 3c73 7061 6e20 636c 6173 733d (*params, *window_params< │ │ │ │ -00040ef0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),. │ │ │ │ -00040f10: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ -00040f30: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -00040f50: 203c 7370 616e 2063 6c61 7373 3d22 6e66 as_sqlite(self< │ │ │ │ -00040fa0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00040fc0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00040fd0: 6f6d 7069 6c65 723c 2f73 7061 6e3e 3c73 ompiler,< │ │ │ │ -00040ff0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ -00041010: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n):. if isinstance< │ │ │ │ -00041070: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000410a0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.output_field, fi │ │ │ │ -00041110: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.DecimalField< │ │ │ │ -00041150: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00041170: 2020 2020 2020 2020 2020 2020 3c73 7061 # C │ │ │ │ -00041190: 6173 7469 6e67 2074 6f20 6e75 6d65 7269 asting to numeri │ │ │ │ -000411a0: 6320 6d75 7374 2062 6520 6f75 7473 6964 c must be outsid │ │ │ │ -000411b0: 6520 6f66 2074 6865 2077 696e 646f 7720 e of the window │ │ │ │ -000411c0: 6578 7072 6573 7369 6f6e 2e3c 2f73 7061 expression.. < │ │ │ │ -000411e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -000411f0: 6f70 793c 2f73 7061 6e3e 203c 7370 616e opy = self │ │ │ │ -00041230: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00041240: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .copy(). │ │ │ │ -00041280: 2020 2020 2020 2020 203c 7370 616e 2063 source_ │ │ │ │ -000412a0: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions = copy │ │ │ │ -000412e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00041300: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ -00041310: 6574 5f73 6f75 7263 655f 6578 7072 6573 et_source_expres │ │ │ │ -00041320: 7369 6f6e 733c 2f73 7061 6e3e 3c73 7061 sions(). │ │ │ │ -00041350: 2020 3c73 7061 6e20 636c 6173 733d 226e source_express │ │ │ │ -00041370: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions[0].outp │ │ │ │ -000413f0: 7574 5f66 6965 6c64 3c2f 7370 616e 3e20 ut_field │ │ │ │ -00041400: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00041410: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = fields< │ │ │ │ -00041430: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Fl │ │ │ │ -00041460: 6f61 7446 6965 6c64 3c2f 7370 616e 3e3c oatField< │ │ │ │ -00041470: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00041480: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -00041490: 2020 2020 203c 7370 616e 2063 6c61 7373 copy │ │ │ │ -000414b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000414c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .set_sour │ │ │ │ -000414e0: 6365 5f65 7870 7265 7373 696f 6e73 3c2f ce_expressions(sou │ │ │ │ -00041520: 7263 655f 6578 7072 6573 7369 6f6e 733c rce_expressions< │ │ │ │ -00041530: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ -00041550: 2020 2020 2020 2020 2020 203c 7370 616e retur │ │ │ │ -00041570: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n super< │ │ │ │ -00041590: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(Wi │ │ │ │ -000415c0: 6e64 6f77 3c2f 7370 616e 3e3c 7370 616e ndow, copy< │ │ │ │ -00041600: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00041610: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00041630: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ -00041640: 735f 7371 6c69 7465 3c2f 7370 616e 3e3c s_sqlite< │ │ │ │ -00041650: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00041660: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 compiler< │ │ │ │ -00041680: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000416a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -000416b0: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -000416c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000416d0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -000416e0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00041700: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00041710: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.as_sql │ │ │ │ -00041750: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00041760: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (compiler │ │ │ │ -00041780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000417a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000417b0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection).. < │ │ │ │ -000417e0: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -000417f0: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef __str │ │ │ │ -00041810: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __(self):< │ │ │ │ -00041860: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00041870: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -00041880: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn &q │ │ │ │ -000418a0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;{} OVER ({}{}{})".format< │ │ │ │ -00041950: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(. │ │ │ │ -00041970: 2020 2020 2020 2020 2020 203c 7370 616e str< │ │ │ │ +000406e0: 7373 3d22 6e22 3e6f 7264 6572 5f62 793c ss="n">order_by< │ │ │ │ +000406f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +00040710: 2020 2020 2020 2020 2020 203c 7370 616e windo │ │ │ │ +00040730: 775f 7371 6c3c 2f73 7061 6e3e 3c73 7061 w_sql.append(order_s │ │ │ │ +000407a0: 716c 3c2f 7370 616e 3e3c 7370 616e 2063 ql). wi │ │ │ │ +000407e0: 6e64 6f77 5f70 6172 616d 733c 2f73 7061 ndow_params += tu │ │ │ │ +00040820: 706c 653c 2f73 7061 6e3e 3c73 7061 6e20 ple(order_params).. │ │ │ │ +00040880: 2020 2020 2020 203c 7370 616e 2063 6c61 if │ │ │ │ +000408a0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.frame:. │ │ │ │ +00040910: 2020 2020 2020 3c73 7061 6e20 636c 6173 frame_sql< │ │ │ │ +00040930: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00040950: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ +00040960: 7261 6d65 5f70 6172 616d 733c 2f73 7061 rame_params = comp │ │ │ │ +000409a0: 696c 6572 3c2f 7370 616e 3e3c 7370 616e iler.compile(self.fra │ │ │ │ +00040a40: 6d65 3c2f 7370 616e 3e3c 7370 616e 2063 me). wi │ │ │ │ +00040a80: 6e64 6f77 5f73 716c 3c2f 7370 616e 3e3c ndow_sql< │ │ │ │ +00040a90: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00040aa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 append(fram │ │ │ │ +00040af0: 655f 7371 6c3c 2f73 7061 6e3e 3c73 7061 e_sql). │ │ │ │ +00040b20: 203c 7370 616e 2063 6c61 7373 3d22 6e22 window_params += │ │ │ │ +00040b60: 3c73 7061 6e20 636c 6173 733d 226e 6222 tuple(frame_param │ │ │ │ +00040bb0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ +00040bd0: 0a0a 2020 2020 2020 2020 3c73 7061 6e20 .. templa │ │ │ │ +00040bf0: 7465 3c2f 7370 616e 3e20 3c73 7061 6e20 te = template or s │ │ │ │ +00040c60: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.template.. retur │ │ │ │ +00040cc0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n (. te │ │ │ │ +00040d00: 6d70 6c61 7465 3c2f 7370 616e 3e20 3c73 mplate %< │ │ │ │ +00040d20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> {< │ │ │ │ +00040d40: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00040d50: 2671 756f 743b 6578 7072 6573 7369 6f6e "expression │ │ │ │ +00040d60: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ": expr_sql, & │ │ │ │ +00040dd0: 7175 6f74 3b77 696e 646f 7726 7175 6f74 quot;window" │ │ │ │ +00040de0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;: │ │ │ │ +00040e00: 203c 7370 616e 2063 6c61 7373 3d22 7332 " "< │ │ │ │ +00040e20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.jo │ │ │ │ +00040e50: 696e 3c2f 7370 616e 3e3c 7370 616e 2063 in(window_sql).strip() │ │ │ │ +00040ef0: 7d2c 3c2f 7370 616e 3e0a 2020 2020 2020 },. │ │ │ │ +00040f00: 2020 2020 2020 3c73 7061 6e20 636c 6173 (*< │ │ │ │ +00040f30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>params, *window_param │ │ │ │ +00040fa0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s),. ).. def as_sqlite(sel │ │ │ │ +00041050: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f, │ │ │ │ +00041070: 203c 7370 616e 2063 6c61 7373 3d22 6e22 compiler │ │ │ │ +00041090: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000410a0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , connect │ │ │ │ +000410c0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion):. if isinstanc │ │ │ │ +00041120: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +00041140: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.output_field │ │ │ │ +00041190: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +000411b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000411c0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DecimalFiel │ │ │ │ +00041200: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d):. # │ │ │ │ +00041240: 2043 6173 7469 6e67 2074 6f20 6e75 6d65 Casting to nume │ │ │ │ +00041250: 7269 6320 6d75 7374 2062 6520 6f75 7473 ric must be outs │ │ │ │ +00041260: 6964 6520 6f66 2074 6865 2077 696e 646f ide of the windo │ │ │ │ +00041270: 7720 6578 7072 6573 7369 6f6e 2e3c 2f73 w expression.. │ │ │ │ +00041290: 203c 7370 616e 2063 6c61 7373 3d22 6e22 copy = self.copy(). │ │ │ │ +00041330: 2020 2020 2020 2020 2020 203c 7370 616e sourc │ │ │ │ +00041350: 655f 6578 7072 6573 7369 6f6e 733c 2f73 e_expressions = co │ │ │ │ +00041390: 7079 3c2f 7370 616e 3e3c 7370 616e 2063 py.get_source_expr │ │ │ │ +000413d0: 6573 7369 6f6e 733c 2f73 7061 6e3e 3c73 essions() │ │ │ │ +000413f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00041400: 2020 2020 3c73 7061 6e20 636c 6173 733d source_expre │ │ │ │ +00041420: 7373 696f 6e73 3c2f 7370 616e 3e3c 7370 ssions[0]< │ │ │ │ +00041470: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.ou │ │ │ │ +000414a0: 7470 7574 5f66 6965 6c64 3c2f 7370 616e tput_field = field │ │ │ │ +000414e0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +00041500: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00041510: 466c 6f61 7446 6965 6c64 3c2f 7370 616e FloatField(). │ │ │ │ +00041540: 2020 2020 2020 203c 7370 616e 2063 6c61 copy.set_so │ │ │ │ +00041590: 7572 6365 5f65 7870 7265 7373 696f 6e73 urce_expressions │ │ │ │ +000415a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +000415c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ +000415d0: 6f75 7263 655f 6578 7072 6573 7369 6f6e ource_expression │ │ │ │ +000415e0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s) │ │ │ │ +00041600: 0a20 2020 2020 2020 2020 2020 203c 7370 . ret │ │ │ │ +00041620: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn supe │ │ │ │ +00041640: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +00041660: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00041670: 5769 6e64 6f77 3c2f 7370 616e 3e3c 7370 Window, copy).as_sqlite(compile │ │ │ │ +00041730: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00041750: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection). │ │ │ │ +00041790: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +000417b0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.as_sql(compil │ │ │ │ +00041830: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, connection).. │ │ │ │ +00041890: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def __s │ │ │ │ +000418c0: 7472 5f5f 3c2f 7370 616e 3e3c 7370 616e tr__(self< │ │ │ │ +00041900: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +00041910: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00041920: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +00041940: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00041950: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "{} │ │ │ │ +00041970: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 OVER (< │ │ │ │ 00041990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -000419c0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.source_express │ │ │ │ -00041a00: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion),. │ │ │ │ -00041a30: 3c73 7061 6e20 636c 6173 733d 2273 3222 "PARTITION │ │ │ │ -00041a50: 2042 5920 2671 756f 743b 3c2f 7370 616e BY " + str< │ │ │ │ -00041a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(s │ │ │ │ -00041ac0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.partition_by) if │ │ │ │ -00041b30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c self.part │ │ │ │ -00041b80: 6974 696f 6e5f 6279 3c2f 7370 616e 3e20 ition_by │ │ │ │ -00041b90: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00041ba0: 656c 7365 3c2f 7370 616e 3e20 3c73 7061 else &qu │ │ │ │ -00041bc0: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ -00041bd0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00041be0: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -00041bf0: 2020 2020 203c 7370 616e 2063 6c61 7373 str │ │ │ │ -00041c10: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00041c20: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.orde │ │ │ │ -00041c70: 725f 6279 3c2f 7370 616e 3e20 3c73 7061 r_by or< │ │ │ │ -00041c90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> "&q │ │ │ │ -00041cb0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;),. │ │ │ │ -00041ce0: 203c 7370 616e 2063 6c61 7373 3d22 6e62 str(self │ │ │ │ -00041d30: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00041d40: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .frame or │ │ │ │ -00041d80: 3c73 7061 6e20 636c 6173 733d 2273 3222 ""),. │ │ │ │ -00041dc0: 2020 2020 2020 3c73 7061 6e20 636c 6173 ).. │ │ │ │ -00041de0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -00041e00: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -00041e10: 5f5f 7265 7072 5f5f 3c2f 7370 616e 3e3c __repr__< │ │ │ │ -00041e20: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00041e30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -00041e70: 2020 2020 203c 7370 616e 2063 6c61 7373 return "<%s< │ │ │ │ -00041ed0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00041ee0: 3a20 3c2f 7370 616e 3e3c 7370 616e 2063 : %s>" % < │ │ │ │ -00041f40: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00041f50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.__cl │ │ │ │ -00041fa0: 6173 735f 5f3c 2f73 7061 6e3e 3c73 7061 ass__.__name__, se │ │ │ │ -00042010: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf).. def get_group_by_ │ │ │ │ -00042070: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols(self< │ │ │ │ -000420b0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -000420c0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -000420d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 group_by_cols = < │ │ │ │ -00042110: 7370 616e 2063 6c61 7373 3d22 7022 3e5b span class="p">[ │ │ │ │ -00042120: 5d3c 2f73 7061 6e3e 0a20 2020 2020 2020 ]. │ │ │ │ -00042130: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ -00042160: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00042180: 7370 616e 2063 6c61 7373 3d22 6e22 3e70 span class="n">p │ │ │ │ -00042190: 6172 7469 7469 6f6e 5f62 793c 2f73 7061 artition_by:. │ │ │ │ -000421c0: 2020 2020 2020 203c 7370 616e 2063 6c61 group_by_ │ │ │ │ -000421e0: 636f 6c73 3c2f 7370 616e 3e3c 7370 616e cols.extend │ │ │ │ -00042220: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00042230: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self{}{}{})".forma │ │ │ │ +00041a00: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t( │ │ │ │ +00041a20: 0a20 2020 2020 2020 2020 2020 203c 7370 . st │ │ │ │ +00041a40: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +00041a60: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.source_expre │ │ │ │ +00041ab0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion),. │ │ │ │ +00041ae0: 2020 3c73 7061 6e20 636c 6173 733d 2273 "PARTITI │ │ │ │ +00041b00: 4f4e 2042 5920 2671 756f 743b 3c2f 7370 ON BY " + st │ │ │ │ +00041b40: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r( │ │ │ │ +00041b60: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.partition_by │ │ │ │ +00041bb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ) │ │ │ │ +00041bd0: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +00041be0: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if self< │ │ │ │ +00041c00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.pa │ │ │ │ +00041c30: 7274 6974 696f 6e5f 6279 3c2f 7370 616e rtition_by else & │ │ │ │ +00041c70: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;",. │ │ │ │ +00041ca0: 2020 2020 2020 203c 7370 616e 2063 6c61 str(self< │ │ │ │ +00041cf0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.or │ │ │ │ +00041d20: 6465 725f 6279 3c2f 7370 616e 3e20 3c73 der_by o │ │ │ │ +00041d40: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r " │ │ │ │ +00041d60: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "),< │ │ │ │ +00041d80: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ +00041d90: 2020 203c 7370 616e 2063 6c61 7373 3d22 str(< │ │ │ │ +00041dc0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.frame< │ │ │ │ +00041e10: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> or ""< │ │ │ │ +00041e50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),. │ │ │ │ +00041e70: 2020 2020 2020 2020 3c73 7061 6e20 636c ) │ │ │ │ +00041e90: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00041eb0: 203c 7370 616e 2063 6c61 7373 3d22 666d __repr__(self):. │ │ │ │ +00041f20: 2020 2020 2020 203c 7370 616e 2063 6c61 return "< │ │ │ │ +00041f60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 %s: %s>" │ │ │ │ +00041fd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c % │ │ │ │ +00041ff0: 203c 7370 616e 2063 6c61 7373 3d22 7022 (self.__ │ │ │ │ +00042050: 636c 6173 735f 5f3c 2f73 7061 6e3e 3c73 class__.< │ │ │ │ +00042070: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>__name__< │ │ │ │ +00042090: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +000420b0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +000420c0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self).. def get_group_b │ │ │ │ +00042120: 795f 636f 6c73 3c2f 7370 616e 3e3c 7370 y_cols(self):. │ │ │ │ +00042180: 2020 203c 7370 616e 2063 6c61 7373 3d22 group_by_cols │ │ │ │ +000421a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c = │ │ │ │ +000421c0: 203c 7370 616e 2063 6c61 7373 3d22 7022 []. │ │ │ │ +000421e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if se │ │ │ │ +00042210: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.partition_by.part │ │ │ │ -00042280: 6974 696f 6e5f 6279 3c2f 7370 616e 3e3c ition_by< │ │ │ │ -00042290: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000422a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 get_group │ │ │ │ -000422c0: 5f62 795f 636f 6c73 3c2f 7370 616e 3e3c _by_cols< │ │ │ │ -000422d0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000422e0: 2929 3c2f 7370 616e 3e0a 2020 2020 2020 )). │ │ │ │ -000422f0: 2020 3c73 7061 6e20 636c 6173 733d 226b if sel │ │ │ │ -00042320: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00042340: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00042350: 6f72 6465 725f 6279 3c2f 7370 616e 3e20 order_by │ │ │ │ -00042360: 3c73 7061 6e20 636c 6173 733d 226f 7722 is not< │ │ │ │ -00042390: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None:. │ │ │ │ -000423d0: 2020 2020 2020 2020 3c73 7061 6e20 636c group_by │ │ │ │ -000423f0: 5f63 6f6c 733c 2f73 7061 6e3e 3c73 7061 _cols.extend(self:. │ │ │ │ +00042270: 2020 2020 2020 2020 203c 7370 616e 2063 group_b │ │ │ │ +00042290: 795f 636f 6c73 3c2f 7370 616e 3e3c 7370 y_cols.extend(self< │ │ │ │ +00042300: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.pa │ │ │ │ +00042330: 7274 6974 696f 6e5f 6279 3c2f 7370 616e rtition_by.get_gro │ │ │ │ +00042370: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols()). │ │ │ │ +000423a0: 2020 2020 3c73 7061 6e20 636c 6173 733d if s │ │ │ │ +000423d0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.order_by is no │ │ │ │ +00042440: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t None.ord │ │ │ │ -00042490: 6572 5f62 793c 2f73 7061 6e3e 3c73 7061 er_by.get_group_by │ │ │ │ -000424d0: 5f63 6f6c 733c 2f73 7061 6e3e 3c73 7061 _cols())< │ │ │ │ -000424f0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00042500: 7370 616e 2063 6c61 7373 3d22 6b22 3e72 span class="k">r │ │ │ │ -00042510: 6574 7572 6e3c 2f73 7061 6e3e 203c 7370 eturn gro │ │ │ │ -00042530: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols
    ....class │ │ │ │ -00042560: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c WindowF │ │ │ │ -00042580: 7261 6d65 3c2f 7370 616e 3e3c 7370 616e rame(Expression):. │ │ │ │ -000425f0: 2020 3c2f 7370 616e 3e3c 7370 616e 2063 " │ │ │ │ -00042610: 2671 756f 743b 2671 756f 743b 3c2f 7370 "". Model t │ │ │ │ -00042640: 6865 2066 7261 6d65 2063 6c61 7573 6520 he frame clause │ │ │ │ -00042650: 696e 2077 696e 646f 7720 6578 7072 6573 in window expres │ │ │ │ -00042660: 7369 6f6e 732e 2054 6865 7265 2061 7265 sions. There are │ │ │ │ -00042670: 2074 776f 2074 7970 6573 206f 6620 6672 two types of fr │ │ │ │ -00042680: 616d 653c 2f73 7061 6e3e 0a3c 7370 616e ame. │ │ │ │ -000426a0: 636c 6175 7365 7320 7768 6963 6820 6172 clauses which ar │ │ │ │ -000426b0: 6520 7375 6263 6c61 7373 6573 2c20 686f e subclasses, ho │ │ │ │ -000426c0: 7765 7665 722c 2061 6c6c 2070 726f 6365 wever, all proce │ │ │ │ -000426d0: 7373 696e 6720 616e 6420 7661 6c69 6461 ssing and valida │ │ │ │ -000426e0: 7469 6f6e 2028 6279 206e 6f3c 2f73 7061 tion (by no. means in │ │ │ │ -00042710: 7465 6e64 6564 2074 6f20 6265 2063 6f6d tended to be com │ │ │ │ -00042720: 706c 6574 6529 2069 7320 646f 6e65 2068 plete) is done h │ │ │ │ -00042730: 6572 652e 2054 6875 732c 2070 726f 7669 ere. Thus, provi │ │ │ │ -00042740: 6469 6e67 2061 6e20 656e 6420 666f 7220 ding an end for │ │ │ │ -00042750: 613c 2f73 7061 6e3e 0a3c 7370 616e 2063 a. fr │ │ │ │ -00042770: 616d 6520 6973 206f 7074 696f 6e61 6c20 ame is optional │ │ │ │ -00042780: 2874 6865 2064 6566 6175 6c74 2069 7320 (the default is │ │ │ │ -00042790: 554e 424f 554e 4445 4420 464f 4c4c 4f57 UNBOUNDED FOLLOW │ │ │ │ -000427a0: 494e 472c 2077 6869 6368 2069 7320 7468 ING, which is th │ │ │ │ -000427b0: 6520 6c61 7374 3c2f 7370 616e 3e0a 3c73 e last. │ │ │ │ -000427d0: 2020 2072 6f77 2069 6e20 7468 6520 6672 row in the fr │ │ │ │ -000427e0: 616d 6529 2e3c 2f73 7061 6e3e 0a3c 7370 ame).. │ │ │ │ -00042800: 2020 2671 756f 743b 2671 756f 743b 2671 ""&q │ │ │ │ -00042810: 756f 743b 3c2f 7370 616e 3e0a 0a20 2020 uot;.. │ │ │ │ -00042820: 203c 7370 616e 2063 6c61 7373 3d22 6e22 template │ │ │ │ -00042840: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = " │ │ │ │ -00042870: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;%(frame │ │ │ │ -00042890: 5f74 7970 6529 733c 2f73 7061 6e3e 3c73 _type)s │ │ │ │ -000428b0: 4245 5457 4545 4e20 3c2f 7370 616e 3e3c BETWEEN < │ │ │ │ -000428c0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -000428d0: 2528 7374 6172 7429 733c 2f73 7061 6e3e %(start)s │ │ │ │ -000428e0: 3c73 7061 6e20 636c 6173 733d 2273 3222 AND %( │ │ │ │ -00042910: 656e 6429 733c 2f73 7061 6e3e 3c73 7061 end)s&qu │ │ │ │ -00042930: 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 2020 ot;.. │ │ │ │ -00042940: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00042950: 6465 663c 2f73 7061 6e3e 203c 7370 616e def __in │ │ │ │ -00042970: 6974 5f5f 3c2f 7370 616e 3e3c 7370 616e it__(self< │ │ │ │ -000429b0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000429c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c start=Non │ │ │ │ -00042a10: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e, │ │ │ │ -00042a30: 203c 7370 616e 2063 6c61 7373 3d22 6e22 end=None< │ │ │ │ -00042a80: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00042a90: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ -00042aa0: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.start = Value │ │ │ │ -00042b20: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ -00042b40: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -00042b50: 7461 7274 3c2f 7370 616e 3e3c 7370 616e tart). sel │ │ │ │ -00042b90: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00042bb0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00042bc0: 656e 643c 2f73 7061 6e3e 203c 7370 616e end = Value │ │ │ │ -00042c00: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00042c10: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (end).. │ │ │ │ -00042c50: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00042c60: 6465 663c 2f73 7061 6e3e 203c 7370 616e def set_ │ │ │ │ -00042c80: 736f 7572 6365 5f65 7870 7265 7373 696f source_expressio │ │ │ │ -00042c90: 6e73 3c2f 7370 616e 3e3c 7370 616e 2063 ns(self, exprs):. │ │ │ │ -00042d20: 2020 2020 3c73 7061 6e20 636c 6173 733d self │ │ │ │ -00042d40: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00042d50: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .start, se │ │ │ │ -00042da0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.end = exprs.. def get_source_ex │ │ │ │ -00042e50: 7072 6573 7369 6f6e 733c 2f73 7061 6e3e pressions │ │ │ │ -00042e60: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00042e70: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -00042eb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return [sel │ │ │ │ -00042f00: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00042f20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00042f30: 7374 6172 743c 2f73 7061 6e3e 3c73 7061 start, self.end].. │ │ │ │ -00042fc0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def as_ │ │ │ │ -00042ff0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql(self,< │ │ │ │ -00043040: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> compiler< │ │ │ │ -00043060: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00043080: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00043090: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -000430a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000430b0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -000430c0: 2020 3c73 7061 6e20 636c 6173 733d 226e connection.ops.che │ │ │ │ -00043140: 636b 5f65 7870 7265 7373 696f 6e5f 7375 ck_expression_su │ │ │ │ -00043150: 7070 6f72 743c 2f73 7061 6e3e 3c73 7061 pport(self │ │ │ │ -00043190: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000431a0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -000431b0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 start, end │ │ │ │ -00043200: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = self< │ │ │ │ -00043230: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.wi │ │ │ │ -00043260: 6e64 6f77 5f66 7261 6d65 5f73 7461 7274 ndow_frame_start │ │ │ │ -00043270: 5f65 6e64 3c2f 7370 616e 3e3c 7370 616e _end(. │ │ │ │ -000432a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000432b0: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection, self< │ │ │ │ -000432f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.st │ │ │ │ -00043320: 6172 743c 2f73 7061 6e3e 3c73 7061 6e20 art.value,< │ │ │ │ -00043370: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.end.val │ │ │ │ -000433f0: 7565 3c2f 7370 616e 3e0a 2020 2020 2020 ue. │ │ │ │ -00043400: 2020 3c73 7061 6e20 636c 6173 733d 2270 ). │ │ │ │ -00043420: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -00043440: 203c 7370 616e 2063 6c61 7373 3d22 7022 (. │ │ │ │ -00043460: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.templa │ │ │ │ -000434b0: 7465 3c2f 7370 616e 3e0a 2020 2020 2020 te. │ │ │ │ -000434c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 % < │ │ │ │ -000434e0: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ -000434f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00043500: 2020 2020 2020 2020 3c73 7061 6e20 636c "f │ │ │ │ -00043520: 7261 6d65 5f74 7970 6526 7175 6f74 3b3c rame_type"< │ │ │ │ -00043530: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>: < │ │ │ │ -00043550: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00043560: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.frame_type,. │ │ │ │ -000435c0: 2020 2020 2020 2020 2020 2020 203c 7370 &q │ │ │ │ -000435e0: 756f 743b 7374 6172 7426 7175 6f74 3b3c uot;start"< │ │ │ │ -000435f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>: < │ │ │ │ -00043610: 7370 616e 2063 6c61 7373 3d22 6e22 3e73 span class="n">s │ │ │ │ -00043620: 7461 7274 3c2f 7370 616e 3e3c 7370 616e tart,. │ │ │ │ -00043650: 2020 2020 3c73 7061 6e20 636c 6173 733d "end&q │ │ │ │ -00043670: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;: end,< │ │ │ │ -000436c0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -000436d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 },. │ │ │ │ -000436f0: 2020 2020 2020 2020 203c 7370 616e 2063 [],. ).. def __repr__(se │ │ │ │ -000437a0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf):. retur │ │ │ │ -000437e0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n " │ │ │ │ -00043800: 266c 743b 3c2f 7370 616e 3e3c 7370 616e <%s: < │ │ │ │ -00043840: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -00043850: 2573 3c2f 7370 616e 3e3c 7370 616e 2063 %s>&q │ │ │ │ -00043870: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; % (se │ │ │ │ -000438c0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.__class__.__nam │ │ │ │ -00043930: 655f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 e__, self< │ │ │ │ -00043970: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00043980: 3c2f 7370 616e 3e0a 0a20 2020 203c 7370 .. def │ │ │ │ -000439a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c get_gro │ │ │ │ -000439c0: 7570 5f62 795f 636f 6c73 3c2f 7370 616e up_by_cols(self):. │ │ │ │ -00043a20: 2020 2020 2020 203c 7370 616e 2063 6c61 return [].. │ │ │ │ -00043a60: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -00043a80: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -00043a90: 5f5f 7374 725f 5f3c 2f73 7061 6e3e 3c73 __str__(< │ │ │ │ -00043ab0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self):. │ │ │ │ -00043af0: 2020 2020 3c73 7061 6e20 636c 6173 733d if s │ │ │ │ -00043b20: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.start.< │ │ │ │ -00043b70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value is n │ │ │ │ -00043bc0: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot None< │ │ │ │ -00043be0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> and self< │ │ │ │ -00043c20: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00043c30: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 start.value │ │ │ │ -00043c80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c < 0:. │ │ │ │ -00043ce0: 2020 3c73 7061 6e20 636c 6173 733d 226e start < │ │ │ │ -00043d00: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00043d10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "< │ │ │ │ -00043d30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>%d │ │ │ │ -00043d50: 3c73 7061 6e20 636c 6173 733d 2273 3222 %s" % (abs(< │ │ │ │ -00043e00: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.start< │ │ │ │ -00043e50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.va │ │ │ │ -00043e80: 6c75 653c 2f73 7061 6e3e 3c73 7061 6e20 lue), connection.ops │ │ │ │ -00043ef0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00043f10: 7370 616e 2063 6c61 7373 3d22 6e22 3e50 span class="n">P │ │ │ │ -00043f20: 5245 4345 4449 4e47 3c2f 7370 616e 3e3c RECEDING< │ │ │ │ -00043f30: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00043f40: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00043f50: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00043f60: 656c 6966 3c2f 7370 616e 3e20 3c73 7061 elif sel │ │ │ │ -00043f80: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00043fa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00043fb0: 7374 6172 743c 2f73 7061 6e3e 3c73 7061 start.value │ │ │ │ -00043ff0: 203c 7370 616e 2063 6c61 7373 3d22 6f77 is not │ │ │ │ -00044020: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c None and │ │ │ │ -00044060: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.start.value == │ │ │ │ -00044100: 3c73 7061 6e20 636c 6173 733d 226d 6922 0:. st │ │ │ │ -00044150: 6172 743c 2f73 7061 6e3e 203c 7370 616e art = connection.ops │ │ │ │ -000441c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000441e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -000441f0: 5552 5245 4e54 5f52 4f57 3c2f 7370 616e URRENT_ROW. else:. │ │ │ │ -00044240: 2020 2020 2020 2020 2020 3c73 7061 6e20 start< │ │ │ │ -00044260: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ -00044280: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00044290: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection.ops.UNBOU │ │ │ │ -00044300: 4e44 4544 5f50 5245 4345 4449 4e47 3c2f NDED_PRECEDING.. < │ │ │ │ -00044320: 7370 616e 2063 6c61 7373 3d22 6b22 3e69 span class="k">i │ │ │ │ -00044330: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f self.end │ │ │ │ -00044380: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000443a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ -000443b0: 616c 7565 3c2f 7370 616e 3e20 3c73 7061 alue is< │ │ │ │ -000443d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> not None │ │ │ │ -00044410: 3c73 7061 6e20 636c 6173 733d 226f 7722 and sel │ │ │ │ -00044440: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00044460: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00044470: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end.value < │ │ │ │ -000444b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e26 span class="o">& │ │ │ │ -000444c0: 6774 3b3c 2f73 7061 6e3e 203c 7370 616e gt; 0:. │ │ │ │ -00044500: 2020 2020 2020 2020 203c 7370 616e 2063 end = &q │ │ │ │ -00044550: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;%d % │ │ │ │ -000445a0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s"< │ │ │ │ -000445c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> % │ │ │ │ -000445e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000445f0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.end< │ │ │ │ -00044640: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.va │ │ │ │ -00044670: 6c75 653c 2f73 7061 6e3e 3c73 7061 6e20 lue, connection.ops< │ │ │ │ -000446e0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.FO │ │ │ │ -00044710: 4c4c 4f57 494e 473c 2f73 7061 6e3e 3c73 LLOWING)< │ │ │ │ -00044730: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -00044740: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ -00044750: 6c69 663c 2f73 7061 6e3e 203c 7370 616e lif self │ │ │ │ -00044770: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00044790: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -000447a0: 6e64 3c2f 7370 616e 3e3c 7370 616e 2063 nd.value i │ │ │ │ -000447f0: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s not None and s │ │ │ │ -00044860: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.end.value │ │ │ │ -000448d0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 == 0:. │ │ │ │ -00044920: 2020 2020 2020 2020 203c 7370 616e 2063 end = con │ │ │ │ -00044970: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection.< │ │ │ │ -00044990: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>ops │ │ │ │ -000449b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000449c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .CURRENT_ │ │ │ │ -000449e0: 524f 573c 2f73 7061 6e3e 0a20 2020 2020 ROW. │ │ │ │ -000449f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 else:< │ │ │ │ -00044a20: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00044a30: 2020 203c 7370 616e 2063 6c61 7373 3d22 end =< │ │ │ │ -00044a60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ -00044a80: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n. │ │ │ │ -00044aa0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00044ab0: 6f70 733c 2f73 7061 6e3e 3c73 7061 6e20 ops.UNBOUNDED_FOLL │ │ │ │ -00044af0: 4f57 494e 473c 2f73 7061 6e3e 0a20 2020 OWING. │ │ │ │ -00044b00: 2020 2020 203c 7370 616e 2063 6c61 7373 return self< │ │ │ │ -00044b40: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00044b50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 template< │ │ │ │ -00044b70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> % │ │ │ │ -00044b90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00044ba0: 7b3c 2f73 7061 6e3e 0a20 2020 2020 2020 {. │ │ │ │ -00044bb0: 2020 2020 203c 7370 616e 2063 6c61 7373 "fram │ │ │ │ -00044bd0: 655f 7479 7065 2671 756f 743b 3c2f 7370 e_type": sel │ │ │ │ -00044c10: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ -00044c30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00044c40: 6672 616d 655f 7479 7065 3c2f 7370 616e frame_type,. │ │ │ │ -00044c70: 2020 2020 2020 3c73 7061 6e20 636c 6173 "sta │ │ │ │ -00044c90: 7274 2671 756f 743b 3c2f 7370 616e 3e3c rt"< │ │ │ │ -00044ca0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -00044cb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c start,. │ │ │ │ -00044cf0: 2020 2020 2020 2020 203c 7370 616e 2063 " │ │ │ │ -00044d10: 656e 6426 7175 6f74 3b3c 2f73 7061 6e3e end" │ │ │ │ -00044d20: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00044d30: 3a3c 2f73 7061 6e3e 203c 7370 616e 2063 : end,. │ │ │ │ -00044d70: 2020 2020 3c73 7061 6e20 636c 6173 733d }.. │ │ │ │ -00044d90: 2020 3c73 7061 6e20 636c 6173 733d 226b def wi │ │ │ │ -00044dc0: 6e64 6f77 5f66 7261 6d65 5f73 7461 7274 ndow_frame_start │ │ │ │ -00044dd0: 5f65 6e64 3c2f 7370 616e 3e3c 7370 616e _end(self< │ │ │ │ -00044e10: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00044e20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c connecti │ │ │ │ -00044e40: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, start,< │ │ │ │ -00044e90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> end):. │ │ │ │ -00044ed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 raise │ │ │ │ -00044ef0: 3c73 7061 6e20 636c 6173 733d 226e 6522 NotImplementedE │ │ │ │ -00044f10: 7272 6f72 3c2f 7370 616e 3e3c 7370 616e rror("Subcla │ │ │ │ -00044f50: 7373 6573 206d 7573 7420 696d 706c 656d sses must implem │ │ │ │ -00044f60: 656e 7420 7769 6e64 6f77 5f66 7261 6d65 ent window_frame │ │ │ │ -00044f70: 5f73 7461 7274 5f65 6e64 2829 2e26 7175 _start_end().&qu │ │ │ │ -00044f80: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;)...
    . │ │ │ │ -00044fd0: 3c61 2063 6c61 7373 3d22 7669 6577 636f [d │ │ │ │ -00045040: 6f63 735d 3c2f 613e 0a3c 7370 616e 2063 ocs].class RowRange< │ │ │ │ -00045080: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(Wi │ │ │ │ -000450b0: 6e64 6f77 4672 616d 653c 2f73 7061 6e3e ndowFrame │ │ │ │ -000450c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000450d0: 293a 3c2f 7370 616e 3e0a 2020 2020 3c73 ):. fr │ │ │ │ -000450f0: 616d 655f 7479 7065 3c2f 7370 616e 3e20 ame_type │ │ │ │ -00045100: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00045110: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = " │ │ │ │ -00045130: 524f 5753 2671 756f 743b 3c2f 7370 616e ROWS".. def window_frame_ │ │ │ │ -00045180: 7374 6172 745f 656e 643c 2f73 7061 6e3e start_end │ │ │ │ -00045190: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000451a0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, con │ │ │ │ -000451f0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection,< │ │ │ │ -00045210: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> start, end< │ │ │ │ -00045260: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00045280: 2020 2020 2020 2020 3c73 7061 6e20 636c return connection │ │ │ │ -000452c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000452e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -000452f0: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps.window_frame_ro │ │ │ │ -00045330: 7773 5f73 7461 7274 5f65 6e64 3c2f 7370 ws_start_end(start │ │ │ │ -00045370: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00045390: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000453a0: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end)
    ....
    .[docs]< │ │ │ │ -00045470: 2f61 3e0a 3c73 7061 6e20 636c 6173 733d /a>.class │ │ │ │ -00045490: 203c 7370 616e 2063 6c61 7373 3d22 6e63 ValueRange(Windo │ │ │ │ -000454e0: 7746 7261 6d65 3c2f 7370 616e 3e3c 7370 wFrame):< │ │ │ │ -00045500: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. frame │ │ │ │ -00045520: 5f74 7970 653c 2f73 7061 6e3e 203c 7370 _type = "RAN │ │ │ │ -00045560: 4745 2671 756f 743b 3c2f 7370 616e 3e0a GE". │ │ │ │ -00045570: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -00045590: 3c73 7061 6e20 636c 6173 733d 226e 6622 window_frame_st │ │ │ │ -000455b0: 6172 745f 656e 643c 2f73 7061 6e3e 3c73 art_end(< │ │ │ │ -000455d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self, conne │ │ │ │ -00045620: 6374 696f 6e3c 2f73 7061 6e3e 3c73 7061 ction, start, end):. │ │ │ │ -000456b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return connection.ops │ │ │ │ -00045720: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00045740: 7370 616e 2063 6c61 7373 3d22 6e22 3e77 span class="n">w │ │ │ │ -00045750: 696e 646f 775f 6672 616d 655f 7261 6e67 indow_frame_rang │ │ │ │ -00045760: 655f 7374 6172 745f 656e 643c 2f73 7061 e_start_end(start< │ │ │ │ -000457a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000457c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ -000457d0: 6e64 3c2f 7370 616e 3e3c 7370 616e 2063 nd)
    ..
    .[docs].@deconstructi │ │ │ │ -0000f060: 626c 653c 2f73 7061 6e3e 0a3c 7370 616e ble.class │ │ │ │ -0000f080: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c Express │ │ │ │ -0000f0a0: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion(BaseExpression │ │ │ │ -0000f0e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -0000f100: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000f110: 436f 6d62 696e 6162 6c65 3c2f 7370 616e Combinable):. < │ │ │ │ -0000f150: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"&qu │ │ │ │ -0000f170: 6f74 3b26 7175 6f74 3b41 6e20 6578 7072 ot;"An expr │ │ │ │ -0000f180: 6573 7369 6f6e 2074 6861 7420 6361 6e20 ession that can │ │ │ │ -0000f190: 6265 2063 6f6d 6269 6e65 6420 7769 7468 be combined with │ │ │ │ -0000f1a0: 206f 7468 6572 2065 7870 7265 7373 696f other expressio │ │ │ │ -0000f1b0: 6e73 2e26 7175 6f74 3b26 7175 6f74 3b26 ns.""& │ │ │ │ -0000f1c0: 7175 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 quot;.. │ │ │ │ -0000f1d0: 2020 3c73 7061 6e20 636c 6173 733d 226e @cached_prope │ │ │ │ -0000f1f0: 7274 793c 2f73 7061 6e3e 0a20 2020 203c rty. < │ │ │ │ -0000f200: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ -0000f210: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef ident │ │ │ │ -0000f230: 6974 793c 2f73 7061 6e3e 3c73 7061 6e20 ity(self): │ │ │ │ -0000f280: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -0000f290: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000f2a0: 636f 6e73 7472 7563 746f 725f 7369 676e constructor_sign │ │ │ │ -0000f2b0: 6174 7572 653c 2f73 7061 6e3e 203c 7370 ature = inspect.sign │ │ │ │ -0000f320: 6174 7572 653c 2f73 7061 6e3e 3c73 7061 ature(self │ │ │ │ -0000f360: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000f370: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__init_ │ │ │ │ -0000f390: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _) │ │ │ │ -0000f3b0: 0a20 2020 2020 2020 203c 7370 616e 2063 . args, kwa │ │ │ │ -0000f400: 7267 733c 2f73 7061 6e3e 203c 7370 616e rgs = self │ │ │ │ -0000f440: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000f450: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c ._constru │ │ │ │ -0000f470: 6374 6f72 5f61 7267 733c 2f73 7061 6e3e ctor_args │ │ │ │ -0000f480: 0a20 2020 2020 2020 203c 7370 616e 2063 . signatu │ │ │ │ -0000f4a0: 7265 3c2f 7370 616e 3e20 3c73 7061 6e20 re = constructor_s │ │ │ │ -0000f4e0: 6967 6e61 7475 7265 3c2f 7370 616e 3e3c ignature< │ │ │ │ -0000f4f0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0000f500: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 bind_part │ │ │ │ -0000f520: 6961 6c3c 2f73 7061 6e3e 3c73 7061 6e20 ial(*args, ** │ │ │ │ -0000f5a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 kwargs). │ │ │ │ -0000f5e0: 2020 2020 203c 7370 616e 2063 6c61 7373 signature.app │ │ │ │ -0000f630: 6c79 5f64 6566 6175 6c74 733c 2f73 7061 ly_defaults(). │ │ │ │ -0000f660: 2020 2020 3c73 7061 6e20 636c 6173 733d arguments = si │ │ │ │ -0000f6b0: 676e 6174 7572 653c 2f73 7061 6e3e 3c73 gnature.< │ │ │ │ -0000f6d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>arguments< │ │ │ │ -0000f6f0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.it │ │ │ │ -0000f720: 656d 733c 2f73 7061 6e3e 3c73 7061 6e20 ems(). iden │ │ │ │ -0000f760: 7469 7479 3c2f 7370 616e 3e20 3c73 7061 tity = [se │ │ │ │ -0000f7b0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.__class__]. │ │ │ │ -0000f810: 2020 203c 7370 616e 2063 6c61 7373 3d22 for ar │ │ │ │ -0000f840: 673c 2f73 7061 6e3e 3c73 7061 6e20 636c g, │ │ │ │ -0000f860: 203c 7370 616e 2063 6c61 7373 3d22 6e22 value i │ │ │ │ -0000f890: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n argumen │ │ │ │ -0000f8b0: 7473 3c2f 7370 616e 3e3c 7370 616e 2063 ts:. if │ │ │ │ -0000f8f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c isinsta │ │ │ │ -0000f910: 6e63 653c 2f73 7061 6e3e 3c73 7061 6e20 nce(value,< │ │ │ │ -0000f960: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields, " │ │ │ │ +0000edc0: 3b73 656c 6563 745f 666f 726d 6174 2671 ;select_format&q │ │ │ │ +0000edd0: 756f 743b 3c2f 7370 616e 3e3c 7370 616e uot;):. │ │ │ │ +0000ee00: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +0000ee20: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0000ee30: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.output_field< │ │ │ │ +0000ee70: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.se │ │ │ │ +0000eea0: 6c65 6374 5f66 6f72 6d61 743c 2f73 7061 lect_format(compil │ │ │ │ +0000eee0: 6572 3c2f 7370 616e 3e3c 7370 616e 2063 er, sql, params). │ │ │ │ +0000ef70: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +0000ef90: 203c 7370 616e 2063 6c61 7373 3d22 6e22 sql, params...
    │ │ │ │ +0000f010: 0a3c 6120 636c 6173 733d 2276 6965 7763 .[documentatie]< │ │ │ │ +0000f090: 2f61 3e0a 3c73 7061 6e20 636c 6173 733d /a>.@deconstruc │ │ │ │ +0000f0b0: 7469 626c 653c 2f73 7061 6e3e 0a3c 7370 tible.cla │ │ │ │ +0000f0d0: 7373 3c2f 7370 616e 3e20 3c73 7061 6e20 ss Expre │ │ │ │ +0000f0f0: 7373 696f 6e3c 2f73 7061 6e3e 3c73 7061 ssion(BaseExpressi │ │ │ │ +0000f130: 6f6e 3c2f 7370 616e 3e3c 7370 616e 2063 on, Combinable):. │ │ │ │ +0000f1a0: 203c 2f73 7061 6e3e 3c73 7061 6e20 636c "& │ │ │ │ +0000f1c0: 7175 6f74 3b26 7175 6f74 3b41 6e20 6578 quot;"An ex │ │ │ │ +0000f1d0: 7072 6573 7369 6f6e 2074 6861 7420 6361 pression that ca │ │ │ │ +0000f1e0: 6e20 6265 2063 6f6d 6269 6e65 6420 7769 n be combined wi │ │ │ │ +0000f1f0: 7468 206f 7468 6572 2065 7870 7265 7373 th other express │ │ │ │ +0000f200: 696f 6e73 2e26 7175 6f74 3b26 7175 6f74 ions."" │ │ │ │ +0000f210: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 0a0a ;".. │ │ │ │ +0000f220: 2020 2020 3c73 7061 6e20 636c 6173 733d @cached_pro │ │ │ │ +0000f240: 7065 7274 793c 2f73 7061 6e3e 0a20 2020 perty. │ │ │ │ +0000f250: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def ide │ │ │ │ +0000f280: 6e74 6974 793c 2f73 7061 6e3e 3c73 7061 ntity(self │ │ │ │ +0000f2c0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000f2d0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +0000f2e0: 2020 3c73 7061 6e20 636c 6173 733d 226e constructor_si │ │ │ │ +0000f300: 676e 6174 7572 653c 2f73 7061 6e3e 203c gnature < │ │ │ │ +0000f310: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +0000f320: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c inspect< │ │ │ │ +0000f340: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.si │ │ │ │ +0000f370: 676e 6174 7572 653c 2f73 7061 6e3e 3c73 gnature(< │ │ │ │ +0000f390: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.__ini │ │ │ │ +0000f3e0: 745f 5f3c 2f73 7061 6e3e 3c73 7061 6e20 t__). args< │ │ │ │ +0000f420: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +0000f440: 7370 616e 2063 6c61 7373 3d22 6e22 3e6b span class="n">k │ │ │ │ +0000f450: 7761 7267 733c 2f73 7061 6e3e 203c 7370 wargs = self._const │ │ │ │ +0000f4c0: 7275 6374 6f72 5f61 7267 733c 2f73 7061 ructor_args. signa │ │ │ │ +0000f4f0: 7475 7265 3c2f 7370 616e 3e20 3c73 7061 ture = constructor │ │ │ │ +0000f530: 5f73 6967 6e61 7475 7265 3c2f 7370 616e _signature.bind_pa │ │ │ │ +0000f570: 7274 6961 6c3c 2f73 7061 6e3e 3c73 7061 rtial(*args │ │ │ │ +0000f5c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ +0000f5e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000f5f0: 2a2a 3c2f 7370 616e 3e3c 7370 616e 2063 **kwargs< │ │ │ │ +0000f610: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>). │ │ │ │ +0000f630: 2020 2020 2020 203c 7370 616e 2063 6c61 signature │ │ │ │ +0000f650: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0000f670: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ +0000f680: 7070 6c79 5f64 6566 6175 6c74 733c 2f73 pply_defaults(). │ │ │ │ +0000f6b0: 2020 2020 2020 3c73 7061 6e20 636c 6173 arguments< │ │ │ │ +0000f6d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> = │ │ │ │ +0000f6f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000f700: 7369 676e 6174 7572 653c 2f73 7061 6e3e signature │ │ │ │ +0000f710: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +0000f720: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .argument │ │ │ │ +0000f740: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +0000f760: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000f770: 6974 656d 733c 2f73 7061 6e3e 3c73 7061 items(). id │ │ │ │ +0000f7b0: 656e 7469 7479 3c2f 7370 616e 3e20 3c73 entity =< │ │ │ │ +0000f7d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [< │ │ │ │ +0000f7f0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +0000f800: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.__class__]. │ │ │ │ +0000f860: 2020 2020 203c 7370 616e 2063 6c61 7373 for │ │ │ │ +0000f880: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000f890: 6172 673c 2f73 7061 6e3e 3c73 7061 6e20 arg, value │ │ │ │ +0000f8d0: 3c73 7061 6e20 636c 6173 733d 226f 7722 in argum │ │ │ │ +0000f900: 656e 7473 3c2f 7370 616e 3e3c 7370 616e ents:. │ │ │ │ +0000f930: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ +0000f940: 6966 3c2f 7370 616e 3e20 3c73 7061 6e20 if isins │ │ │ │ +0000f960: 7461 6e63 653c 2f73 7061 6e3e 3c73 7061 tance(.Fiel │ │ │ │ -0000f9b0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d):. │ │ │ │ -0000f9e0: 2020 3c73 7061 6e20 636c 6173 733d 226b if valu │ │ │ │ -0000fa10: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -0000fa30: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -0000fa40: 6e61 6d65 3c2f 7370 616e 3e20 3c73 7061 name and │ │ │ │ -0000fa60: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c value.mode │ │ │ │ -0000fab0: 6c3c 2f73 7061 6e3e 3c73 7061 6e20 636c l: │ │ │ │ -0000fad0: 0a20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -0000fae0: 2020 2020 203c 7370 616e 2063 6c61 7373 value = (value< │ │ │ │ -0000fb50: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -0000fb60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 model._meta │ │ │ │ -0000fbb0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -0000fbd0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6c span class="n">l │ │ │ │ -0000fbe0: 6162 656c 3c2f 7370 616e 3e3c 7370 616e abel, value │ │ │ │ -0000fc20: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000fc30: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .name). │ │ │ │ -0000fc70: 2020 2020 2020 2020 2020 2020 3c73 7061 else │ │ │ │ -0000fc90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ -0000fcb0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -0000fcc0: 2020 2020 3c73 7061 6e20 636c 6173 733d value │ │ │ │ -0000fce0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = type< │ │ │ │ -0000fd10: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>(va │ │ │ │ -0000fd40: 6c75 653c 2f73 7061 6e3e 3c73 7061 6e20 lue). < │ │ │ │ -0000fd70: 7370 616e 2063 6c61 7373 3d22 6b22 3e65 span class="k">e │ │ │ │ -0000fd80: 6c73 653c 2f73 7061 6e3e 3c73 7061 6e20 lse:. │ │ │ │ -0000fdb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 value │ │ │ │ -0000fdd0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -0000fde0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = make_ha │ │ │ │ -0000fe00: 7368 6162 6c65 3c2f 7370 616e 3e3c 7370 shable(value). │ │ │ │ -0000fe60: 2020 2020 2020 3c73 7061 6e20 636c 6173 identity.app │ │ │ │ -0000feb0: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end((arg, value)). │ │ │ │ -0000ff40: 2020 2020 3c73 7061 6e20 636c 6173 733d return tuple< │ │ │ │ -0000ff80: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -0000ff90: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 identity< │ │ │ │ -0000ffb0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>).. │ │ │ │ -0000ffd0: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ -0000fff0: 7370 616e 2063 6c61 7373 3d22 666d 223e span class="fm"> │ │ │ │ -00010000: 5f5f 6571 5f5f 3c2f 7370 616e 3e3c 7370 __eq__(self, other< │ │ │ │ -00010070: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ -00010090: 2020 2020 2020 2020 3c73 7061 6e20 636c if not i │ │ │ │ -000100e0: 7369 6e73 7461 6e63 653c 2f73 7061 6e3e sinstance │ │ │ │ -000100f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00010100: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (other, Exp │ │ │ │ -00010150: 7265 7373 696f 6e3c 2f73 7061 6e3e 3c73 ression): │ │ │ │ -00010170: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00010180: 2020 2020 3c73 7061 6e20 636c 6173 733d return NotImplemente │ │ │ │ -000101c0: 643c 2f73 7061 6e3e 0a20 2020 2020 2020 d. │ │ │ │ -000101d0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -000101f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ -00010200: 7468 6572 3c2f 7370 616e 3e3c 7370 616e ther.identity == se │ │ │ │ -00010270: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.identity │ │ │ │ -000102b0: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ -000102d0: 203c 7370 616e 2063 6c61 7373 3d22 666d __hash__(self):. │ │ │ │ -00010340: 2020 2020 2020 203c 7370 616e 2063 6c61 return hash(self.ide │ │ │ │ -000103e0: 6e74 6974 793c 2f73 7061 6e3e 3c73 7061 ntity)
    ....# │ │ │ │ -00010420: 2054 7970 6520 696e 6665 7265 6e63 6520 Type inference │ │ │ │ -00010430: 666f 7220 436f 6d62 696e 6564 4578 7072 for CombinedExpr │ │ │ │ -00010440: 6573 7369 6f6e 2e6f 7574 7075 745f 6669 ession.output_fi │ │ │ │ -00010450: 656c 642e 3c2f 7370 616e 3e0a 3c73 7061 eld..# M │ │ │ │ -00010470: 6973 7369 6e67 2069 7465 6d73 2077 696c issing items wil │ │ │ │ -00010480: 6c20 7265 7375 6c74 2069 6e20 4669 656c l result in Fiel │ │ │ │ -00010490: 6445 7272 6f72 2c20 6279 2064 6573 6967 dError, by desig │ │ │ │ -000104a0: 6e2e 3c2f 7370 616e 3e0a 3c73 7061 6e20 n..#.# The curre │ │ │ │ -000104e0: 6e74 2061 7070 726f 6163 6820 666f 7220 nt approach for │ │ │ │ -000104f0: 4e55 4c4c 2069 7320 6261 7365 6420 6f6e NULL is based on │ │ │ │ -00010500: 206c 6f77 6573 7420 636f 6d6d 6f6e 2064 lowest common d │ │ │ │ -00010510: 656e 6f6d 696e 6174 6f72 2062 6568 6176 enominator behav │ │ │ │ -00010520: 696f 723c 2f73 7061 6e3e 0a3c 7370 616e ior.# i. │ │ │ │ -00010540: 652e 2069 6620 6f6e 6520 6f66 2074 6865 e. if one of the │ │ │ │ -00010550: 2073 7570 706f 7274 6564 2064 6174 6162 supported datab │ │ │ │ -00010560: 6173 6573 2069 7320 7261 6973 696e 6720 ases is raising │ │ │ │ -00010570: 616e 2065 7272 6f72 2028 7261 7468 6572 an error (rather │ │ │ │ -00010580: 2074 6861 6e3c 2f73 7061 6e3e 0a3c 7370 than.# │ │ │ │ -000105a0: 7265 7475 726e 204e 554c 4c29 2066 6f72 return NULL) for │ │ │ │ -000105b0: 2060 7661 6c20 266c 743b 6f70 2667 743b `val <op> │ │ │ │ -000105c0: 204e 554c 4c60 2c20 7468 656e 2044 6a61 NULL`, then Dja │ │ │ │ -000105d0: 6e67 6f20 7261 6973 6573 2046 6965 6c64 ngo raises Field │ │ │ │ -000105e0: 4572 726f 722e 3c2f 7370 616e 3e0a 3c73 Error..No │ │ │ │ -00010600: 6e65 5479 7065 3c2f 7370 616e 3e20 3c73 neType =< │ │ │ │ -00010620: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> type(None │ │ │ │ -00010670: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00010690: 0a3c 7370 616e 2063 6c61 7373 3d22 6e22 ._connector_comb │ │ │ │ -000106b0: 696e 6174 696f 6e73 3c2f 7370 616e 3e20 inations │ │ │ │ -000106c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000106d0: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = [. # Numeric │ │ │ │ -00010710: 206f 7065 7261 7469 6f6e 7320 2d20 6f70 operations - op │ │ │ │ -00010720: 6572 616e 6473 206f 6620 7361 6d65 2074 erands of same t │ │ │ │ -00010730: 7970 652e 3c2f 7370 616e 3e0a 2020 2020 ype.. │ │ │ │ -00010740: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00010750: 7b3c 2f73 7061 6e3e 0a20 2020 2020 2020 {. │ │ │ │ -00010760: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connector: [. < │ │ │ │ -000107c0: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -000107d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 fields.Inte │ │ │ │ -00010820: 6765 7246 6965 6c64 3c2f 7370 616e 3e3c gerField< │ │ │ │ -00010830: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00010840: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Int │ │ │ │ -00010890: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ -000108a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000108b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ -000108d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.In │ │ │ │ -00010900: 7465 6765 7246 6965 6c64 3c2f 7370 616e tegerField),. │ │ │ │ -00010930: 2020 2020 2020 203c 7370 616e 2063 6c61 (< │ │ │ │ -00010950: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00010960: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.FloatField, fi │ │ │ │ -000109d0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.FloatField, fie │ │ │ │ -00010a40: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.FloatField),. │ │ │ │ -00010aa0: 2020 2020 2020 2020 203c 7370 616e 2063 (fields.< │ │ │ │ -00010af0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DecimalFie │ │ │ │ -00010b10: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ -00010b50: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00010b60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DecimalFi │ │ │ │ -00010b80: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, fields │ │ │ │ -00010bc0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00010bd0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DecimalF │ │ │ │ -00010bf0: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield),. ]. fo │ │ │ │ -00010c50: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r connect │ │ │ │ -00010c70: 6f72 3c2f 7370 616e 3e20 3c73 7061 6e20 or in (. │ │ │ │ -00010cb0: 2020 2020 2020 2020 2020 3c73 7061 6e20 Combin │ │ │ │ -00010cd0: 6162 6c65 3c2f 7370 616e 3e3c 7370 616e able.ADD,. │ │ │ │ -00010d30: 2020 3c73 7061 6e20 636c 6173 733d 226e Combinable.SUB,. │ │ │ │ -00010da0: 2020 2020 2020 2020 2020 3c73 7061 6e20 Combin │ │ │ │ -00010dc0: 6162 6c65 3c2f 7370 616e 3e3c 7370 616e able.MUL,. │ │ │ │ -00010e20: 2020 3c73 7061 6e20 636c 6173 733d 2263 # Behavior fo │ │ │ │ -00010e40: 7220 4449 5620 7769 7468 2069 6e74 6567 r DIV with integ │ │ │ │ -00010e50: 6572 2061 7267 756d 656e 7473 2066 6f6c er arguments fol │ │ │ │ -00010e60: 6c6f 7773 2050 6f73 7467 7265 732f 5351 lows Postgres/SQ │ │ │ │ -00010e70: 4c69 7465 2c3c 2f73 7061 6e3e 0a20 2020 Lite,. │ │ │ │ -00010e80: 2020 2020 2020 2020 203c 7370 616e 2063 # not │ │ │ │ -00010ea0: 4d79 5351 4c2f 4f72 6163 6c65 2e3c 2f73 MySQL/Oracle.. │ │ │ │ -00010ec0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.DIV,. │ │ │ │ -00010f30: 2020 2020 2020 2020 203c 7370 616e 2063 Combina │ │ │ │ -00010f50: 626c 653c 2f73 7061 6e3e 3c73 7061 6e20 ble.MOD,. │ │ │ │ -00010fb0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 Combinable.POW,. │ │ │ │ -00011020: 2020 2020 203c 7370 616e 2063 6c61 7373 ). │ │ │ │ -00011040: 2020 3c73 7061 6e20 636c 6173 733d 2270 },. │ │ │ │ -00011060: 3c73 7061 6e20 636c 6173 733d 2263 3122 # Numeric opera │ │ │ │ -00011080: 7469 6f6e 7320 2d20 6f70 6572 616e 6473 tions - operands │ │ │ │ -00011090: 206f 6620 6469 6666 6572 656e 7420 7479 of different ty │ │ │ │ -000110a0: 7065 2e3c 2f73 7061 6e3e 0a20 2020 203c pe.. < │ │ │ │ -000110b0: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ -000110c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000110d0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000110e0: 636f 6e6e 6563 746f 723c 2f73 7061 6e3e connector │ │ │ │ -000110f0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011100: 3a3c 2f73 7061 6e3e 203c 7370 616e 2063 : [. (< │ │ │ │ -00011140: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.Integ │ │ │ │ -00011190: 6572 4669 656c 643c 2f73 7061 6e3e 3c73 erField,< │ │ │ │ -000111b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Deci │ │ │ │ -00011200: 6d61 6c46 6965 6c64 3c2f 7370 616e 3e3c malField< │ │ │ │ -00011210: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00011220: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dec │ │ │ │ -00011270: 696d 616c 4669 656c 643c 2f73 7061 6e3e imalField │ │ │ │ -00011280: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011290: 292c 3c2f 7370 616e 3e0a 2020 2020 2020 ),. │ │ │ │ -000112a0: 2020 2020 2020 3c73 7061 6e20 636c 6173 (fi │ │ │ │ -000112d0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.DecimalField< │ │ │ │ -00011310: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00011330: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00011340: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.IntegerField │ │ │ │ -00011380: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -000113a0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -000113b0: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DecimalFiel │ │ │ │ -000113f0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. (< │ │ │ │ -00011430: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.Integ │ │ │ │ -00011480: 6572 4669 656c 643c 2f73 7061 6e3e 3c73 erField,< │ │ │ │ -000114a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Floa │ │ │ │ -000114f0: 7446 6965 6c64 3c2f 7370 616e 3e3c 7370 tField, fields.Float │ │ │ │ -00011560: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field),. │ │ │ │ -00011590: 2020 3c73 7061 6e20 636c 6173 733d 2270 (fields │ │ │ │ -000115c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000115e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e46 span class="n">F │ │ │ │ -000115f0: 6c6f 6174 4669 656c 643c 2f73 7061 6e3e loatField │ │ │ │ -00011600: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011610: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ -00011630: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.In │ │ │ │ -00011660: 7465 6765 7246 6965 6c64 3c2f 7370 616e tegerField, fields │ │ │ │ -000116a0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000116c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e46 span class="n">F │ │ │ │ -000116d0: 6c6f 6174 4669 656c 643c 2f73 7061 6e3e loatField │ │ │ │ -000116e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000116f0: 292c 3c2f 7370 616e 3e0a 2020 2020 2020 ),. │ │ │ │ -00011700: 2020 3c73 7061 6e20 636c 6173 733d 2270 ]. │ │ │ │ -00011720: 2020 203c 7370 616e 2063 6c61 7373 3d22 for co │ │ │ │ -00011750: 6e6e 6563 746f 723c 2f73 7061 6e3e 203c nnector < │ │ │ │ -00011760: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -00011770: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in (. < │ │ │ │ -000117a0: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -000117b0: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e ombinable │ │ │ │ -000117c0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000117d0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .ADD,. │ │ │ │ -00011810: 2020 2020 2020 203c 7370 616e 2063 6c61 Combinabl │ │ │ │ -00011830: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -00011850: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00011860: 5355 423c 2f73 7061 6e3e 3c73 7061 6e20 SUB,. < │ │ │ │ -00011890: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -000118a0: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e ombinable │ │ │ │ -000118b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000118c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .MUL,. │ │ │ │ -00011900: 2020 2020 2020 203c 7370 616e 2063 6c61 Combinabl │ │ │ │ -00011920: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -00011940: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00011950: 4449 563c 2f73 7061 6e3e 3c73 7061 6e20 DIV,. < │ │ │ │ -00011980: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -00011990: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e ombinable │ │ │ │ -000119a0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000119b0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .MOD,. │ │ │ │ -000119f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ). │ │ │ │ -00011a10: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011a20: 7d2c 3c2f 7370 616e 3e0a 2020 2020 3c73 },. # │ │ │ │ -00011a40: 2042 6974 7769 7365 206f 7065 7261 746f Bitwise operato │ │ │ │ -00011a50: 7273 2e3c 2f73 7061 6e3e 0a20 2020 203c rs.. < │ │ │ │ -00011a60: 7370 616e 2063 6c61 7373 3d22 7022 3e7b span class="p">{ │ │ │ │ -00011a70: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00011a80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00011a90: 636f 6e6e 6563 746f 723c 2f73 7061 6e3e connector │ │ │ │ -00011aa0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011ab0: 3a3c 2f73 7061 6e3e 203c 7370 616e 2063 : [. (< │ │ │ │ -00011af0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.Integ │ │ │ │ -00011b40: 6572 4669 656c 643c 2f73 7061 6e3e 3c73 erField,< │ │ │ │ -00011b60: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Inte │ │ │ │ -00011bb0: 6765 7246 6965 6c64 3c2f 7370 616e 3e3c gerField< │ │ │ │ -00011bc0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00011bd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Int │ │ │ │ -00011c20: 6567 6572 4669 656c 643c 2f73 7061 6e3e egerField │ │ │ │ -00011c30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011c40: 292c 3c2f 7370 616e 3e0a 2020 2020 2020 ),. │ │ │ │ -00011c50: 2020 3c73 7061 6e20 636c 6173 733d 2270 ]. │ │ │ │ -00011c70: 2020 203c 7370 616e 2063 6c61 7373 3d22 for co │ │ │ │ -00011ca0: 6e6e 6563 746f 723c 2f73 7061 6e3e 203c nnector < │ │ │ │ -00011cb0: 7370 616e 2063 6c61 7373 3d22 6f77 223e span class="ow"> │ │ │ │ -00011cc0: 696e 3c2f 7370 616e 3e20 3c73 7061 6e20 in (. < │ │ │ │ -00011cf0: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -00011d00: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e ombinable │ │ │ │ -00011d10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00011d20: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .BITAND,. │ │ │ │ -00011d60: 2020 2020 2020 2020 2020 3c73 7061 6e20 Combin │ │ │ │ -00011d80: 6162 6c65 3c2f 7370 616e 3e3c 7370 616e able.BITOR< │ │ │ │ -00011dc0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00011dd0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00011de0: 2020 2020 3c73 7061 6e20 636c 6173 733d Combinable.BIT │ │ │ │ -00011e30: 4c45 4654 5348 4946 543c 2f73 7061 6e3e LEFTSHIFT │ │ │ │ -00011e40: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00011e50: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -00011e60: 2020 2020 203c 7370 616e 2063 6c61 7373 Combinable< │ │ │ │ -00011e80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.BI │ │ │ │ -00011eb0: 5452 4947 4854 5348 4946 543c 2f73 7061 TRIGHTSHIFT,. │ │ │ │ -00011ee0: 2020 2020 2020 203c 7370 616e 2063 6c61 Combinabl │ │ │ │ -00011f00: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e. │ │ │ │ -00011f20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00011f30: 4249 5458 4f52 3c2f 7370 616e 3e3c 7370 BITXOR,. )< │ │ │ │ -00011f70: 2f73 7061 6e3e 0a20 2020 203c 7370 616e /span>. },. # Nume │ │ │ │ -00011fb0: 7269 6320 7769 7468 204e 554c 4c2e 3c2f ric with NULL.. {. conne │ │ │ │ -00012000: 6374 6f72 3c2f 7370 616e 3e3c 7370 616e ctor: [. │ │ │ │ -00012040: 2020 2020 2020 2020 203c 7370 616e 2063 (field_type, NoneT │ │ │ │ -000120b0: 7970 653c 2f73 7061 6e3e 3c73 7061 6e20 ype, field_type),. │ │ │ │ -00012110: 2020 2020 2020 2020 2020 3c73 7061 6e20 (NoneType, field_ │ │ │ │ -00012180: 7479 7065 3c2f 7370 616e 3e3c 7370 616e type, field_type),. │ │ │ │ -000121e0: 2020 2020 2020 203c 7370 616e 2063 6c61 ]. │ │ │ │ -00012200: 2020 2020 2020 2020 3c73 7061 6e20 636c for connector in < │ │ │ │ -00012260: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00012270: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00012280: 2020 2020 3c73 7061 6e20 636c 6173 733d Combinable.ADD │ │ │ │ -000122d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ -000122f0: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ -00012310: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.SUB< │ │ │ │ -00012350: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00012360: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00012370: 2020 2020 3c73 7061 6e20 636c 6173 733d Combinable.MUL │ │ │ │ -000123c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ -000123e0: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ -00012400: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.DIV< │ │ │ │ -00012440: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00012450: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00012460: 2020 2020 3c73 7061 6e20 636c 6173 733d Combinable.MOD │ │ │ │ -000124b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ,. │ │ │ │ -000124d0: 2020 2020 2020 2020 2020 2020 3c73 7061 Comb │ │ │ │ -000124f0: 696e 6162 6c65 3c2f 7370 616e 3e3c 7370 inable.POW< │ │ │ │ -00012530: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00012540: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00012550: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00012560: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ -00012570: 203c 7370 616e 2063 6c61 7373 3d22 6b22 for fiel │ │ │ │ -000125a0: 645f 7479 7065 3c2f 7370 616e 3e20 3c73 d_type i │ │ │ │ -000125c0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n (fields.< │ │ │ │ -00012610: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>IntegerFie │ │ │ │ -00012630: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ -00012670: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00012680: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DecimalFi │ │ │ │ -000126a0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld, fields │ │ │ │ -000126e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000126f0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .FloatFie │ │ │ │ -00012710: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld). },. │ │ │ │ -00012750: 2020 2020 3c73 7061 6e20 636c 6173 733d # Date/Date │ │ │ │ -00012770: 5469 6d65 4669 656c 642f 4475 7261 7469 TimeField/Durati │ │ │ │ -00012780: 6f6e 4669 656c 642f 5469 6d65 4669 656c onField/TimeFiel │ │ │ │ -00012790: 642e 3c2f 7370 616e 3e0a 2020 2020 3c73 d.. {< │ │ │ │ -000127b0: 2f73 7061 6e3e 0a20 2020 2020 2020 203c /span>. < │ │ │ │ -000127c0: 7370 616e 2063 6c61 7373 3d22 6e22 3e43 span class="n">C │ │ │ │ -000127d0: 6f6d 6269 6e61 626c 653c 2f73 7061 6e3e ombinable │ │ │ │ -000127e0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000127f0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .ADD: [. │ │ │ │ -00012850: 3c73 7061 6e20 636c 6173 733d 2263 3122 # Date/DateTime │ │ │ │ -00012870: 4669 656c 642e 3c2f 7370 616e 3e0a 2020 Field.. │ │ │ │ -00012880: 2020 2020 2020 2020 2020 3c73 7061 6e20 (fields< │ │ │ │ -000128c0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000128d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DateField │ │ │ │ -000128f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00012910: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00012920: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.DurationFie │ │ │ │ -00012960: 6c64 3c2f 7370 616e 3e3c 7370 616e 2063 ld, fields< │ │ │ │ -000129a0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000129b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 DateTimeF │ │ │ │ -000129d0: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield),. │ │ │ │ -00012a00: 203c 7370 616e 2063 6c61 7373 3d22 7022 (fields< │ │ │ │ -00012a30: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Da │ │ │ │ -00012a60: 7465 5469 6d65 4669 656c 643c 2f73 7061 teTimeField, field │ │ │ │ -00012aa0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00012ac0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00012ad0: 4475 7261 7469 6f6e 4669 656c 643c 2f73 DurationField, fie │ │ │ │ -00012b10: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DateTimeField< │ │ │ │ -00012b50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),. │ │ │ │ -00012b70: 2020 2020 2020 2020 2020 2020 3c73 7061 (fields.Duratio │ │ │ │ -00012be0: 6e46 6965 6c64 3c2f 7370 616e 3e3c 7370 nField, fields.DateF │ │ │ │ -00012c50: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield, fields.DateTim │ │ │ │ -00012cc0: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField),< │ │ │ │ -00012ce0: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00012cf0: 2020 203c 7370 616e 2063 6c61 7373 3d22 (field │ │ │ │ -00012d20: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00012d40: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00012d50: 4475 7261 7469 6f6e 4669 656c 643c 2f73 DurationField, fie │ │ │ │ -00012d90: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DateTimeField< │ │ │ │ -00012dd0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00012df0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00012e00: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateTimeFiel │ │ │ │ -00012e40: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. # │ │ │ │ -00012e80: 2044 7572 6174 696f 6e46 6965 6c64 2e3c DurationField.< │ │ │ │ -00012e90: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00012ea0: 2020 203c 7370 616e 2063 6c61 7373 3d22 (field │ │ │ │ -00012ed0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00012ef0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00012f00: 4475 7261 7469 6f6e 4669 656c 643c 2f73 DurationField, fie │ │ │ │ -00012f40: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DurationField< │ │ │ │ -00012f80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00012fa0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00012fb0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ -00012ff0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. # │ │ │ │ -00013030: 2054 696d 6546 6965 6c64 2e3c 2f73 7061 TimeField.. < │ │ │ │ -00013050: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00013060: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 fields.Time │ │ │ │ -000130b0: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field, fields.Durati │ │ │ │ -00013120: 6f6e 4669 656c 643c 2f73 7061 6e3e 3c73 onField,< │ │ │ │ -00013140: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> fields.Time │ │ │ │ -00013190: 4669 656c 643c 2f73 7061 6e3e 3c73 7061 Field),. │ │ │ │ -000131c0: 2020 3c73 7061 6e20 636c 6173 733d 2270 (fields │ │ │ │ -000131f0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00013210: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ -00013220: 7572 6174 696f 6e46 6965 6c64 3c2f 7370 urationField, fiel │ │ │ │ -00013260: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.TimeField, fields │ │ │ │ -000132d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -000132f0: 7370 616e 2063 6c61 7373 3d22 6e22 3e54 span class="n">T │ │ │ │ -00013300: 696d 6546 6965 6c64 3c2f 7370 616e 3e3c imeField< │ │ │ │ -00013310: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00013320: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -00013330: 203c 7370 616e 2063 6c61 7373 3d22 7022 ],. < │ │ │ │ -00013350: 7370 616e 2063 6c61 7373 3d22 7022 3e7d span class="p">} │ │ │ │ -00013360: 2c3c 2f73 7061 6e3e 0a20 2020 203c 7370 ,. {. Co │ │ │ │ -000133a0: 6d62 696e 6162 6c65 3c2f 7370 616e 3e3c mbinable< │ │ │ │ -000133b0: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -000133c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 SUB: [. < │ │ │ │ -00013420: 7370 616e 2063 6c61 7373 3d22 6331 223e span class="c1"> │ │ │ │ -00013430: 2320 4461 7465 2f44 6174 6554 696d 6546 # Date/DateTimeF │ │ │ │ -00013440: 6965 6c64 2e3c 2f73 7061 6e3e 0a20 2020 ield.. │ │ │ │ -00013450: 2020 2020 2020 2020 203c 7370 616e 2063 (fields.< │ │ │ │ -000134a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DateField< │ │ │ │ -000134c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -000134e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -000134f0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ -00013530: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ -00013550: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ -00013580: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DateTimeFi │ │ │ │ -000135a0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld),. │ │ │ │ -000135d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000135e0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (fields.Dat │ │ │ │ -00013630: 6554 696d 6546 6965 6c64 3c2f 7370 616e eTimeField, fields │ │ │ │ -00013670: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00013690: 7370 616e 2063 6c61 7373 3d22 6e22 3e44 span class="n">D │ │ │ │ -000136a0: 7572 6174 696f 6e46 6965 6c64 3c2f 7370 urationField, fiel │ │ │ │ -000136e0: 6473 3c2f 7370 616e 3e3c 7370 616e 2063 ds.DateTimeField),. │ │ │ │ -00013740: 2020 2020 2020 2020 2020 203c 7370 616e (fields │ │ │ │ -00013780: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00013790: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .DateFiel │ │ │ │ -000137b0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ -000137d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ -00013800: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>DateField< │ │ │ │ -00013820: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00013840: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00013850: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ -00013890: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. (< │ │ │ │ -000138d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>fields.DateF │ │ │ │ -00013920: 6965 6c64 3c2f 7370 616e 3e3c 7370 616e ield, fields.DateTim │ │ │ │ -00013990: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField, fields.Durat │ │ │ │ -00013a00: 696f 6e46 6965 6c64 3c2f 7370 616e 3e3c ionField< │ │ │ │ -00013a10: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00013a20: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ -00013a30: 2020 2020 203c 7370 616e 2063 6c61 7373 (fie │ │ │ │ -00013a60: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DateTimeField< │ │ │ │ -00013aa0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00013ac0: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00013ad0: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DateField, fie │ │ │ │ -00013b40: 6c64 733c 2f73 7061 6e3e 3c73 7061 6e20 lds.DurationField< │ │ │ │ -00013b80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>),. │ │ │ │ -00013ba0: 2020 2020 2020 2020 2020 2020 3c73 7061 (fields.DateTim │ │ │ │ -00013c10: 6546 6965 6c64 3c2f 7370 616e 3e3c 7370 eField, fields.DateT │ │ │ │ -00013c80: 696d 6546 6965 6c64 3c2f 7370 616e 3e3c imeField< │ │ │ │ -00013c90: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00013ca0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dur │ │ │ │ -00013cf0: 6174 696f 6e46 6965 6c64 3c2f 7370 616e ationField),. │ │ │ │ -00013d20: 2020 2020 2020 203c 7370 616e 2063 6c61 # Durati │ │ │ │ -00013d40: 6f6e 4669 656c 642e 3c2f 7370 616e 3e0a onField.. │ │ │ │ -00013d50: 2020 2020 2020 2020 2020 2020 3c73 7061 (fields.Duratio │ │ │ │ -00013dc0: 6e46 6965 6c64 3c2f 7370 616e 3e3c 7370 nField, fields.Durat │ │ │ │ -00013e30: 696f 6e46 6965 6c64 3c2f 7370 616e 3e3c ionField< │ │ │ │ -00013e40: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00013e50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c fields.Dur │ │ │ │ -00013ea0: 6174 696f 6e46 6965 6c64 3c2f 7370 616e ationField),. │ │ │ │ -00013ed0: 2020 2020 2020 203c 7370 616e 2063 6c61 # TimeFi │ │ │ │ -00013ef0: 656c 642e 3c2f 7370 616e 3e0a 2020 2020 eld.. │ │ │ │ -00013f00: 2020 2020 2020 2020 3c73 7061 6e20 636c ( │ │ │ │ -00013f20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00013f30: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.TimeField, fi │ │ │ │ -00013fa0: 656c 6473 3c2f 7370 616e 3e3c 7370 616e elds.DurationField │ │ │ │ -00013fe0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00014000: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00014010: 6669 656c 6473 3c2f 7370 616e 3e3c 7370 fields.TimeField),. │ │ │ │ -00014070: 2020 2020 2020 2020 2020 203c 7370 616e (fields │ │ │ │ -000140b0: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -000140c0: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .TimeFiel │ │ │ │ -000140e0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d, │ │ │ │ -00014100: 203c 7370 616e 2063 6c61 7373 3d22 6e22 fields.< │ │ │ │ -00014130: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>TimeField< │ │ │ │ -00014150: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00014170: 7370 616e 2063 6c61 7373 3d22 6e22 3e66 span class="n">f │ │ │ │ -00014180: 6965 6c64 733c 2f73 7061 6e3e 3c73 7061 ields.DurationFiel │ │ │ │ -000141c0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d),. ],. },.].._con │ │ │ │ -00014250: 6e65 6374 6f72 5f63 6f6d 6269 6e61 746f nector_combinato │ │ │ │ -00014260: 7273 3c2f 7370 616e 3e20 3c73 7061 6e20 rs = defaultdict(li │ │ │ │ -000142d0: 7374 3c2f 7370 616e 3e3c 7370 616e 2063 st)...def < │ │ │ │ -00014310: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ -00014320: 7265 6769 7374 6572 5f63 6f6d 6269 6e61 register_combina │ │ │ │ -00014330: 626c 655f 6669 656c 6473 3c2f 7370 616e ble_fields(lhs, conn │ │ │ │ -000143a0: 6563 746f 723c 2f73 7061 6e3e 3c73 7061 ector, rhs< │ │ │ │ -000143e0: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000143f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c result):.< │ │ │ │ -00014430: 7370 616e 2063 6c61 7373 3d22 7722 3e20 span class="w"> │ │ │ │ -00014440: 2020 203c 2f73 7061 6e3e 3c73 7061 6e20 " │ │ │ │ -00014460: 3b26 7175 6f74 3b26 7175 6f74 3b3c 2f73 ;"". Regist │ │ │ │ -00014490: 6572 2063 6f6d 6269 6e61 626c 6520 7479 er combinable ty │ │ │ │ -000144a0: 7065 733a 3c2f 7370 616e 3e0a 3c73 7061 pes:. │ │ │ │ -000144c0: 2020 2020 206c 6873 2026 6c74 3b63 6f6e lhs <con │ │ │ │ -000144d0: 6e65 6374 6f72 2667 743b 2072 6873 202d nector> rhs - │ │ │ │ -000144e0: 2667 743b 2072 6573 756c 743c 2f73 7061 > result. e.g.. reg │ │ │ │ -00014530: 6973 7465 725f 636f 6d62 696e 6162 6c65 ister_combinable │ │ │ │ -00014540: 5f66 6965 6c64 7328 3c2f 7370 616e 3e0a _fields(. │ │ │ │ -00014550: 3c73 7061 6e20 636c 6173 733d 2273 6422 Int │ │ │ │ -00014570: 6567 6572 4669 656c 642c 2043 6f6d 6269 egerField, Combi │ │ │ │ -00014580: 6e61 626c 652e 4144 442c 2046 6c6f 6174 nable.ADD, Float │ │ │ │ -00014590: 4669 656c 642c 2046 6c6f 6174 4669 656c Field, FloatFiel │ │ │ │ -000145a0: 643c 2f73 7061 6e3e 0a3c 7370 616e 2063 d. │ │ │ │ -000145c0: 2020 293c 2f73 7061 6e3e 0a3c 7370 616e ). │ │ │ │ -000145e0: 2671 756f 743b 2671 756f 743b 2671 756f ""&quo │ │ │ │ -000145f0: 743b 3c2f 7370 616e 3e0a 2020 2020 3c73 t;. _c │ │ │ │ -00014610: 6f6e 6e65 6374 6f72 5f63 6f6d 6269 6e61 onnector_combina │ │ │ │ -00014620: 746f 7273 3c2f 7370 616e 3e3c 7370 616e tors[connector].append │ │ │ │ -000146b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000146c0: 2828 3c2f 7370 616e 3e3c 7370 616e 2063 ((lhs, rhs< │ │ │ │ -00014710: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00014730: 7370 616e 2063 6c61 7373 3d22 6e22 3e72 span class="n">r │ │ │ │ -00014740: 6573 756c 743c 2f73 7061 6e3e 3c73 7061 esult))...for d in< │ │ │ │ -000147b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> _connecto │ │ │ │ -000147d0: 725f 636f 6d62 696e 6174 696f 6e73 3c2f r_combinations:. │ │ │ │ -00014800: 2020 3c73 7061 6e20 636c 6173 733d 226b for con │ │ │ │ -00014830: 6e65 6374 6f72 3c2f 7370 616e 3e3c 7370 nector, field_type │ │ │ │ -00014870: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s in d.items │ │ │ │ -000148e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000148f0: 2829 3a3c 2f73 7061 6e3e 0a20 2020 2020 ():. │ │ │ │ -00014900: 2020 203c 7370 616e 2063 6c61 7373 3d22 for lh │ │ │ │ -00014930: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ -00014950: 203c 7370 616e 2063 6c61 7373 3d22 6e22 rhs, result in fie │ │ │ │ -000149d0: 6c64 5f74 7970 6573 3c2f 7370 616e 3e3c ld_types< │ │ │ │ -000149e0: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ -000149f0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00014a00: 2020 2020 3c73 7061 6e20 636c 6173 733d register_com │ │ │ │ -00014a20: 6269 6e61 626c 655f 6669 656c 6473 3c2f binable_fields(lhs │ │ │ │ -00014a60: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 , │ │ │ │ -00014a80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00014a90: 636f 6e6e 6563 746f 723c 2f73 7061 6e3e connector │ │ │ │ -00014aa0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00014ab0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , rhs, resu │ │ │ │ -00014b00: 6c74 3c2f 7370 616e 3e3c 7370 616e 2063 lt)...@functools< │ │ │ │ -00014b40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.lr │ │ │ │ -00014b70: 755f 6361 6368 653c 2f73 7061 6e3e 3c73 u_cache(< │ │ │ │ -00014b90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>maxsize=128 │ │ │ │ -00014be0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ). │ │ │ │ -00014c00: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00014c10: 6465 663c 2f73 7061 6e3e 203c 7370 616e def _res │ │ │ │ -00014c30: 6f6c 7665 5f63 6f6d 6269 6e65 645f 7479 olve_combined_ty │ │ │ │ -00014c40: 7065 3c2f 7370 616e 3e3c 7370 616e 2063 pe(connector, lhs_ty │ │ │ │ -00014cb0: 7065 3c2f 7370 616e 3e3c 7370 616e 2063 pe, rhs_type):. < │ │ │ │ -00014d10: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00014d20: 6f6d 6269 6e61 746f 7273 3c2f 7370 616e ombinators = _conn │ │ │ │ -00014d60: 6563 746f 725f 636f 6d62 696e 6174 6f72 ector_combinator │ │ │ │ -00014d70: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00014d90: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00014da0: 6765 743c 2f73 7061 6e3e 3c73 7061 6e20 get(connector, ()). for combinator_ │ │ │ │ -00014e50: 6c68 735f 7479 7065 3c2f 7370 616e 3e3c lhs_type< │ │ │ │ -00014e60: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00014e70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c combinat │ │ │ │ -00014e90: 6f72 5f72 6873 5f74 7970 653c 2f73 7061 or_rhs_type, combi │ │ │ │ -00014ed0: 6e65 645f 7479 7065 3c2f 7370 616e 3e20 ned_type │ │ │ │ -00014ee0: 3c73 7061 6e20 636c 6173 733d 226f 7722 in combi │ │ │ │ -00014f10: 6e61 746f 7273 3c2f 7370 616e 3e3c 7370 nators:. if │ │ │ │ -00014f50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c issubcl │ │ │ │ -00014f70: 6173 733c 2f73 7061 6e3e 3c73 7061 6e20 ass(lhs_type, combin │ │ │ │ -00014fe0: 6174 6f72 5f6c 6873 5f74 7970 653c 2f73 ator_lhs_type) an │ │ │ │ -00015020: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d issubc │ │ │ │ -00015040: 6c61 7373 3c2f 7370 616e 3e3c 7370 616e lass(. │ │ │ │ -00015070: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00015080: 7268 735f 7479 7065 3c2f 7370 616e 3e3c rhs_type< │ │ │ │ -00015090: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -000150a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c combinat │ │ │ │ -000150c0: 6f72 5f72 6873 5f74 7970 653c 2f73 7061 or_rhs_type. ):. │ │ │ │ -00015100: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ -00015120: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00015130: 6f6d 6269 6e65 645f 7479 7065 3c2f 7370 ombined_type...class CombinedExpr │ │ │ │ -00015180: 6573 7369 6f6e 3c2f 7370 616e 3e3c 7370 ession(SQLiteNumer │ │ │ │ -000151c0: 6963 4d69 7869 6e3c 2f73 7061 6e3e 3c73 icMixin,< │ │ │ │ -000151e0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> Expressio │ │ │ │ -00015200: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n):. def │ │ │ │ -00015240: 203c 7370 616e 2063 6c61 7373 3d22 666d __init__(self, lh │ │ │ │ -000152c0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ -000152e0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connector, rhs, out │ │ │ │ -00015360: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -00015370: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00015380: 3d3c 2f73 7061 6e3e 3c73 7061 6e20 636c =None):. │ │ │ │ -000153c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 super().__init__(outp │ │ │ │ -00015460: 7574 5f66 6965 6c64 3c2f 7370 616e 3e3c ut_field< │ │ │ │ -00015470: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ -00015480: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 output_fi │ │ │ │ -000154a0: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld). self │ │ │ │ -000154e0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ -00015500: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00015510: 6f6e 6e65 6374 6f72 3c2f 7370 616e 3e20 onnector │ │ │ │ -00015520: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00015530: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = connect │ │ │ │ -00015550: 6f72 3c2f 7370 616e 3e0a 2020 2020 2020 or. │ │ │ │ -00015560: 2020 3c73 7061 6e20 636c 6173 733d 2262 self.< │ │ │ │ -00015590: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>lhs │ │ │ │ -000155b0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = lhs. se │ │ │ │ -00015600: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.rhs = rhs. │ │ │ │ -00015670: 0a20 2020 203c 7370 616e 2063 6c61 7373 . def │ │ │ │ -00015690: 3c73 7061 6e20 636c 6173 733d 2266 6d22 __repr__ │ │ │ │ -000156b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000156c0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ -00015700: 2020 2020 2020 3c73 7061 6e20 636c 6173 return "<< │ │ │ │ -00015740: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>{} │ │ │ │ -00015760: 3c73 7061 6e20 636c 6173 733d 2273 3222 : {}>"< │ │ │ │ -000157b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.fo │ │ │ │ -000157e0: 726d 6174 3c2f 7370 616e 3e3c 7370 616e rmat(self< │ │ │ │ -00015820: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00015830: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 __class_ │ │ │ │ -00015850: 5f3c 2f73 7061 6e3e 3c73 7061 6e20 636c _. │ │ │ │ -00015870: 3c73 7061 6e20 636c 6173 733d 2276 6d22 __name__ │ │ │ │ -00015890: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -000158a0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self).. │ │ │ │ -000158e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 def _ │ │ │ │ -00015910: 5f73 7472 5f5f 3c2f 7370 616e 3e3c 7370 _str__(self):. │ │ │ │ -00015970: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ -00015990: 203c 7370 616e 2063 6c61 7373 3d22 7332 "< │ │ │ │ -000159b0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ -000159c0: 7b7d 3c2f 7370 616e 3e3c 7370 616e 2063 {} {} {}< │ │ │ │ -00015a30: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ -00015a40: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ".format(self< │ │ │ │ -00015ab0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.lh │ │ │ │ -00015ae0: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s, │ │ │ │ -00015b00: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.connector, s │ │ │ │ -00015b80: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.rhs).. def get_source │ │ │ │ -00015c10: 5f65 7870 7265 7373 696f 6e73 3c2f 7370 _expressions(self │ │ │ │ -00015c50: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ -00015c70: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ -00015c90: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [< │ │ │ │ -00015cb0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ -00015cc0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.lhs, self.rhs].. │ │ │ │ -00015d80: 2020 3c73 7061 6e20 636c 6173 733d 226b def se │ │ │ │ -00015db0: 745f 736f 7572 6365 5f65 7870 7265 7373 t_source_express │ │ │ │ -00015dc0: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ -00015e00: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ -00015e10: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c exprs):. │ │ │ │ -00015e50: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.lhs, se │ │ │ │ -00015ed0: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.rhs = exprs.. def _resolve_outp │ │ │ │ -00015f80: 7574 5f66 6965 6c64 3c2f 7370 616e 3e3c ut_field< │ │ │ │ -00015f90: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ -00015fa0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self):. │ │ │ │ -00015fe0: 2020 2020 203c 7370 616e 2063 6c61 7373 # We avoid │ │ │ │ -00016000: 2075 7369 6e67 2073 7570 6572 2829 2068 using super() h │ │ │ │ -00016010: 6572 6520 666f 7220 7265 6173 6f6e 7320 ere for reasons │ │ │ │ -00016020: 6769 7665 6e20 696e 3c2f 7370 616e 3e0a given in. │ │ │ │ -00016030: 2020 2020 2020 2020 3c73 7061 6e20 636c # Expre │ │ │ │ -00016050: 7373 696f 6e2e 5f72 6573 6f6c 7665 5f6f ssion._resolve_o │ │ │ │ -00016060: 7574 7075 745f 6669 656c 6428 293c 2f73 utput_field(). com │ │ │ │ -00016090: 6269 6e65 645f 7479 7065 3c2f 7370 616e bined_type = _reso │ │ │ │ -000160d0: 6c76 655f 636f 6d62 696e 6564 5f74 7970 lve_combined_typ │ │ │ │ -000160e0: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ -00016100: 0a20 2020 2020 2020 2020 2020 203c 7370 . se │ │ │ │ -00016120: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.connector,. │ │ │ │ -00016180: 2020 2020 2020 3c73 7061 6e20 636c 6173 type(self< │ │ │ │ -000161d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.lh │ │ │ │ -00016200: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ -00016220: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00016230: 5f6f 7574 7075 745f 6669 656c 645f 6f72 _output_field_or │ │ │ │ -00016240: 5f6e 6f6e 653c 2f73 7061 6e3e 3c73 7061 _none),. │ │ │ │ -00016270: 2020 3c73 7061 6e20 636c 6173 733d 226e type(< │ │ │ │ -000162a0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self.rhs._out │ │ │ │ -00016320: 7075 745f 6669 656c 645f 6f72 5f6e 6f6e put_field_or_non │ │ │ │ -00016330: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e),. ). if combined_ty │ │ │ │ -000163b0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe is None:. │ │ │ │ -00016410: 2020 2020 2020 3c73 7061 6e20 636c 6173 raise FieldError(. │ │ │ │ -00016470: 2020 2020 2020 2020 2020 2020 203c 7370 f< │ │ │ │ -00016490: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>"Can │ │ │ │ -000164b0: 6e6f 7420 696e 6665 7220 7479 7065 206f not infer type o │ │ │ │ -000164c0: 6620 3c2f 7370 616e 3e3c 7370 616e 2063 f {self.< │ │ │ │ -00016510: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>connector< │ │ │ │ -00016530: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>!r} expression in │ │ │ │ -00016570: 766f 6c76 696e 6720 7468 6573 6520 2671 volving these &q │ │ │ │ -00016580: 756f 743b 3c2f 7370 616e 3e0a 2020 2020 uot;. │ │ │ │ -00016590: 2020 2020 2020 2020 2020 2020 3c73 7061 f"type │ │ │ │ -000165d0: 733a 203c 2f73 7061 6e3e 3c73 7061 6e20 s: {self< │ │ │ │ -00016610: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ -00016620: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 lhs.output_ │ │ │ │ -00016670: 6669 656c 643c 2f73 7061 6e3e 3c73 7061 field.__class__.__ │ │ │ │ -000166e0: 6e61 6d65 5f5f 3c2f 7370 616e 3e3c 7370 name__}< │ │ │ │ -00016700: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, "< │ │ │ │ -00016720: 2f73 7061 6e3e 0a20 2020 2020 2020 2020 /span>. │ │ │ │ -00016730: 2020 2020 2020 203c 7370 616e 2063 6c61 f │ │ │ │ -00016750: 3c73 7061 6e20 636c 6173 733d 2273 3222 "{ │ │ │ │ -00016780: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self.rhs.out │ │ │ │ -00016800: 7075 745f 6669 656c 643c 2f73 7061 6e3e put_field │ │ │ │ -00016810: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ -00016820: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .__class │ │ │ │ -00016840: 5f5f 3c2f 7370 616e 3e3c 7370 616e 2063 __.__name__}. You │ │ │ │ -000168b0: 206d 7573 7420 7365 7420 2671 756f 743b must set " │ │ │ │ -000168c0: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -000168d0: 2020 2020 2020 2020 3c73 7061 6e20 636c f"output_f │ │ │ │ -00016910: 6965 6c64 2e26 7175 6f74 3b3c 2f73 7061 ield.". < │ │ │ │ -00016930: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ -00016940: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00016950: 3c73 7061 6e20 636c 6173 733d 226b 223e │ │ │ │ -00016960: 7265 7475 726e 3c2f 7370 616e 3e20 3c73 return co │ │ │ │ -00016980: 6d62 696e 6564 5f74 7970 653c 2f73 7061 mbined_type().. │ │ │ │ -000169b0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def as_ │ │ │ │ -000169e0: 7371 6c3c 2f73 7061 6e3e 3c73 7061 6e20 sql(self,< │ │ │ │ -00016a30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> compiler< │ │ │ │ -00016a50: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ -00016a70: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ -00016a80: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ -00016a90: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ -00016aa0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ -00016ab0: 2020 3c73 7061 6e20 636c 6173 733d 226e expressions = [] │ │ │ │ -00016b00: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ -00016b10: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ -00016b20: 6578 7072 6573 7369 6f6e 5f70 6172 616d expression_param │ │ │ │ -00016b30: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s = []. │ │ │ │ -00016b70: 2020 2020 3c73 7061 6e20 636c 6173 733d sql,< │ │ │ │ -00016ba0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> params = co │ │ │ │ -00016bf0: 6d70 696c 6572 3c2f 7370 616e 3e3c 7370 mpiler.compile(self │ │ │ │ +0000f990: 226e 223e 7661 6c75 653c 2f73 7061 6e3e "n">value │ │ │ │ +0000f9a0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +0000f9b0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , fields< │ │ │ │ +0000f9d0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.Fi │ │ │ │ +0000fa00: 656c 643c 2f73 7061 6e3e 3c73 7061 6e20 eld):. │ │ │ │ +0000fa30: 2020 2020 3c73 7061 6e20 636c 6173 733d if va │ │ │ │ +0000fa60: 6c75 653c 2f73 7061 6e3e 3c73 7061 6e20 lue.name a │ │ │ │ +0000fab0: 6e64 3c2f 7370 616e 3e20 3c73 7061 6e20 nd value< │ │ │ │ +0000fad0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.mo │ │ │ │ +0000fb00: 6465 6c3c 2f73 7061 6e3e 3c73 7061 6e20 del:. │ │ │ │ +0000fb30: 2020 2020 2020 203c 7370 616e 2063 6c61 value = (value.model._me │ │ │ │ +0000fc00: 7461 3c2f 7370 616e 3e3c 7370 616e 2063 ta.label, value.name). │ │ │ │ +0000fcc0: 2020 2020 2020 2020 2020 2020 2020 3c73 el │ │ │ │ +0000fce0: 7365 3c2f 7370 616e 3e3c 7370 616e 2063 se:. │ │ │ │ +0000fd10: 2020 2020 2020 3c73 7061 6e20 636c 6173 value = typ │ │ │ │ +0000fd60: 653c 2f73 7061 6e3e 3c73 7061 6e20 636c e( │ │ │ │ +0000fd80: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +0000fd90: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value). │ │ │ │ +0000fdc0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 else:. │ │ │ │ +0000fe00: 2020 2020 203c 7370 616e 2063 6c61 7373 value = make_ │ │ │ │ +0000fe50: 6861 7368 6162 6c65 3c2f 7370 616e 3e3c hashable< │ │ │ │ +0000fe60: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +0000fe70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 value). │ │ │ │ +0000feb0: 2020 2020 2020 2020 3c73 7061 6e20 636c identity │ │ │ │ +0000fed0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +0000fef0: 7370 616e 2063 6c61 7373 3d22 6e22 3e61 span class="n">a │ │ │ │ +0000ff00: 7070 656e 643c 2f73 7061 6e3e 3c73 7061 ppend((arg< │ │ │ │ +0000ff40: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +0000ff50: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c value)). │ │ │ │ +0000ff90: 2020 2020 2020 3c73 7061 6e20 636c 6173 return tuple(identit │ │ │ │ +00010000: 793c 2f73 7061 6e3e 3c73 7061 6e20 636c y) │ │ │ │ +00010020: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00010040: 203c 7370 616e 2063 6c61 7373 3d22 666d __eq__< │ │ │ │ +00010060: 7370 616e 2063 6c61 7373 3d22 7022 3e28 span class="p">( │ │ │ │ +00010070: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 self, othe │ │ │ │ +000100c0: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r):. if not │ │ │ │ +00010120: 3c73 7061 6e20 636c 6173 733d 226e 6222 isinstance(other< │ │ │ │ +00010170: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00010190: 7370 616e 2063 6c61 7373 3d22 6e22 3e45 span class="n">E │ │ │ │ +000101a0: 7870 7265 7373 696f 6e3c 2f73 7061 6e3e xpression │ │ │ │ +000101b0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000101c0: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +000101d0: 2020 2020 2020 3c73 7061 6e20 636c 6173 return NotImplemen │ │ │ │ +00010210: 7465 643c 2f73 7061 6e3e 0a20 2020 2020 ted. │ │ │ │ +00010220: 2020 203c 7370 616e 2063 6c61 7373 3d22 return │ │ │ │ +00010240: 203c 7370 616e 2063 6c61 7373 3d22 6e22 other.identity == < │ │ │ │ +000102b0: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +000102c0: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.identity.. def __hash__(self │ │ │ │ +00010370: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00010390: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +000103b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> hash(self │ │ │ │ +00010400: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00010420: 7370 616e 2063 6c61 7373 3d22 6e22 3e69 span class="n">i │ │ │ │ +00010430: 6465 6e74 6974 793c 2f73 7061 6e3e 3c73 dentity)< │ │ │ │ +00010450: 2f73 7061 6e3e 3c2f 6469 763e 0a0a 0a0a /span>
  • < │ │ │ │ -00045800: 2f64 6976 3e0a 0a20 2020 2020 2020 2020 /div>.. │ │ │ │ -00045810: 203c 2f64 6976 3e0a 2020 2020 2020 2020
    . │ │ │ │ -00045820: 3c2f 6469 763e 0a20 2020 2020 203c 2f64
    . . . │ │ │ │ -00045840: 2020 200a 2020 2020 2020 2020 2020 3c64 . . │ │ │ │ -00045870: 2020 2020 2020 2020 2020 200a 2020 2020 . │ │ │ │ -00045880: 2020 3c64 6976 2063 6c61 7373 3d22 7370
    . │ │ │ │ -000458d0: 2020 2020 203c 6469 7620 636c 6173 733d
    ..document.get │ │ │ │ -00045ab0: 456c 656d 656e 7442 7949 6428 2773 6561 ElementById('sea │ │ │ │ -00045ac0: 7263 6862 6f78 2729 2e73 7479 6c65 2e64 rchbox').style.d │ │ │ │ -00045ad0: 6973 706c 6179 203d 2022 626c 6f63 6b22 isplay = "block" │ │ │ │ -00045ae0: 3c2f 7363 7269 7074 3e0a 2020 2020 2020 . │ │ │ │ -00045af0: 2020 3c2f 6469 763e 0a20 2020 2020 203c
    . < │ │ │ │ -00045b00: 2f64 6976 3e0a 2020 2020 2020 2020 2020 /div>. │ │ │ │ -00045b10: 2020 2020 3c68 333e 4c61 7374 2075 7064

    Last upd │ │ │ │ -00045b20: 6174 653a 3c2f 6833 3e0a 2020 2020 2020 ate:

    . │ │ │ │ -00045b30: 2020 2020 2020 2020 3c70 2063 6c61 7373

    May 0 │ │ │ │ -00045b50: 382c 2032 3032 343c 2f70 3e0a 2020 2020 8, 2024

    . │ │ │ │ -00045b60: 2020 2020 2020 3c2f 6469 763e 0a20 2020
    . │ │ │ │ -00045b70: 2020 2020 200a 2020 2020 2020 0a20 2020 . . │ │ │ │ -00045b80: 203c 2f64 6976 3e0a 0a20 2020 203c 6469
    .. . │ │ │ │ -00045ba0: 203c 6469 7620 636c 6173 733d 226e 6176 . │ │ │ │ -00045c10: 203c 2f64 6976 3e0a 0a20 2020 2020 203c
    .. < │ │ │ │ -00045c20: 6469 7620 636c 6173 733d 2263 6c65 6172 div class="clear │ │ │ │ -00045c30: 6572 223e 3c2f 6469 763e 0a20 2020 203c er">
    . < │ │ │ │ -00045c40: 2f64 6976 3e0a 2020 3c2f 626f 6479 3e0a /div>. . │ │ │ │ -00045c50: 3c2f 6874 6d6c 3e │ │ │ │ +00042470: 3d22 7022 3e3a 3c2f 7370 616e 3e0a 2020 ="p">:. │ │ │ │ +00042480: 2020 2020 2020 2020 2020 3c73 7061 6e20 group_ │ │ │ │ +000424a0: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols.< │ │ │ │ +000424c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>extend(self │ │ │ │ +00042510: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00042530: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00042540: 7264 6572 5f62 793c 2f73 7061 6e3e 3c73 rder_by.< │ │ │ │ +00042560: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>get_group_ │ │ │ │ +00042580: 6279 5f63 6f6c 733c 2f73 7061 6e3e 3c73 by_cols() │ │ │ │ +000425a0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +000425b0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 return < │ │ │ │ +000425d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e67 span class="n">g │ │ │ │ +000425e0: 726f 7570 5f62 795f 636f 6c73 3c2f 7370 roup_by_cols
    ....cla │ │ │ │ +00042610: 7373 3c2f 7370 616e 3e20 3c73 7061 6e20 ss Windo │ │ │ │ +00042630: 7746 7261 6d65 3c2f 7370 616e 3e3c 7370 wFrame(Expression< │ │ │ │ +00042670: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00042690: 3c73 7061 6e20 636c 6173 733d 2277 223e │ │ │ │ +000426a0: 2020 2020 3c2f 7370 616e 3e3c 7370 616e &quo │ │ │ │ +000426c0: 743b 2671 756f 743b 2671 756f 743b 3c2f t;"". Model │ │ │ │ +000426f0: 2074 6865 2066 7261 6d65 2063 6c61 7573 the frame claus │ │ │ │ +00042700: 6520 696e 2077 696e 646f 7720 6578 7072 e in window expr │ │ │ │ +00042710: 6573 7369 6f6e 732e 2054 6865 7265 2061 essions. There a │ │ │ │ +00042720: 7265 2074 776f 2074 7970 6573 206f 6620 re two types of │ │ │ │ +00042730: 6672 616d 653c 2f73 7061 6e3e 0a3c 7370 frame. │ │ │ │ +00042750: 2020 636c 6175 7365 7320 7768 6963 6820 clauses which │ │ │ │ +00042760: 6172 6520 7375 6263 6c61 7373 6573 2c20 are subclasses, │ │ │ │ +00042770: 686f 7765 7665 722c 2061 6c6c 2070 726f however, all pro │ │ │ │ +00042780: 6365 7373 696e 6720 616e 6420 7661 6c69 cessing and vali │ │ │ │ +00042790: 6461 7469 6f6e 2028 6279 206e 6f3c 2f73 dation (by no. means │ │ │ │ +000427c0: 696e 7465 6e64 6564 2074 6f20 6265 2063 intended to be c │ │ │ │ +000427d0: 6f6d 706c 6574 6529 2069 7320 646f 6e65 omplete) is done │ │ │ │ +000427e0: 2068 6572 652e 2054 6875 732c 2070 726f here. Thus, pro │ │ │ │ +000427f0: 7669 6469 6e67 2061 6e20 656e 6420 666f viding an end fo │ │ │ │ +00042800: 7220 613c 2f73 7061 6e3e 0a3c 7370 616e r a. │ │ │ │ +00042820: 6672 616d 6520 6973 206f 7074 696f 6e61 frame is optiona │ │ │ │ +00042830: 6c20 2874 6865 2064 6566 6175 6c74 2069 l (the default i │ │ │ │ +00042840: 7320 554e 424f 554e 4445 4420 464f 4c4c s UNBOUNDED FOLL │ │ │ │ +00042850: 4f57 494e 472c 2077 6869 6368 2069 7320 OWING, which is │ │ │ │ +00042860: 7468 6520 6c61 7374 3c2f 7370 616e 3e0a the last. │ │ │ │ +00042870: 3c73 7061 6e20 636c 6173 733d 2273 6422 row in the │ │ │ │ +00042890: 6672 616d 6529 2e3c 2f73 7061 6e3e 0a3c frame)..< │ │ │ │ +000428a0: 7370 616e 2063 6c61 7373 3d22 7364 223e span class="sd"> │ │ │ │ +000428b0: 2020 2020 2671 756f 743b 2671 756f 743b "" │ │ │ │ +000428c0: 2671 756f 743b 3c2f 7370 616e 3e0a 0a20 ".. │ │ │ │ +000428d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 template = &qu │ │ │ │ +00042920: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot;%(fra │ │ │ │ +00042940: 6d65 5f74 7970 6529 733c 2f73 7061 6e3e me_type)s │ │ │ │ +00042950: 3c73 7061 6e20 636c 6173 733d 2273 3222 BETWEEN %(start)s AND < │ │ │ │ +000429b0: 7370 616e 2063 6c61 7373 3d22 7369 223e span class="si"> │ │ │ │ +000429c0: 2528 656e 6429 733c 2f73 7061 6e3e 3c73 %(end)s& │ │ │ │ +000429e0: 7175 6f74 3b3c 2f73 7061 6e3e 0a0a 2020 quot;.. │ │ │ │ +000429f0: 2020 3c73 7061 6e20 636c 6173 733d 226b def __ │ │ │ │ +00042a20: 696e 6974 5f5f 3c2f 7370 616e 3e3c 7370 init__(self, start< │ │ │ │ +00042a90: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>=N │ │ │ │ +00042ac0: 6f6e 653c 2f73 7061 6e3e 3c73 7061 6e20 one, end=None):. │ │ │ │ +00042b50: 2020 203c 7370 616e 2063 6c61 7373 3d22 self< │ │ │ │ +00042b70: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00042b80: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 start = Val │ │ │ │ +00042bd0: 7565 3c2f 7370 616e 3e3c 7370 616e 2063 ue(start). s │ │ │ │ +00042c40: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.end = Value(end).. │ │ │ │ +00042d00: 2020 3c73 7061 6e20 636c 6173 733d 226b def se │ │ │ │ +00042d30: 745f 736f 7572 6365 5f65 7870 7265 7373 t_source_express │ │ │ │ +00042d40: 696f 6e73 3c2f 7370 616e 3e3c 7370 616e ions(self< │ │ │ │ +00042d80: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00042d90: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c exprs):. │ │ │ │ +00042dd0: 2020 2020 2020 3c73 7061 6e20 636c 6173 self.start< │ │ │ │ +00042e20: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>, < │ │ │ │ +00042e40: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00042e50: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.end =< │ │ │ │ +00042ea0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> exprs.. def get_source_ │ │ │ │ +00042f00: 6578 7072 6573 7369 6f6e 733c 2f73 7061 expressions(self< │ │ │ │ +00042f40: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00042f60: 2020 2020 2020 2020 3c73 7061 6e20 636c return [s │ │ │ │ +00042fb0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.start,< │ │ │ │ +00043000: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> self.end].. │ │ │ │ +00043070: 2020 203c 7370 616e 2063 6c61 7373 3d22 def a │ │ │ │ +000430a0: 735f 7371 6c3c 2f73 7061 6e3e 3c73 7061 s_sql(self │ │ │ │ +000430e0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000430f0: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , compile │ │ │ │ +00043110: 723c 2f73 7061 6e3e 3c73 7061 6e20 636c r, │ │ │ │ +00043130: 203c 7370 616e 2063 6c61 7373 3d22 6e22 connection):. │ │ │ │ +00043170: 2020 2020 3c73 7061 6e20 636c 6173 733d connection.ops │ │ │ │ +000431c0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000431e0: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +000431f0: 6865 636b 5f65 7870 7265 7373 696f 6e5f heck_expression_ │ │ │ │ +00043200: 7375 7070 6f72 743c 2f73 7061 6e3e 3c73 support(< │ │ │ │ +00043220: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>self). │ │ │ │ +00043260: 2020 203c 7370 616e 2063 6c61 7373 3d22 start< │ │ │ │ +00043280: 7370 616e 2063 6c61 7373 3d22 7022 3e2c span class="p">, │ │ │ │ +00043290: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c end = sel │ │ │ │ +000432e0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +00043300: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00043310: 7769 6e64 6f77 5f66 7261 6d65 5f73 7461 window_frame_sta │ │ │ │ +00043320: 7274 5f65 6e64 3c2f 7370 616e 3e3c 7370 rt_end(. │ │ │ │ +00043350: 2020 3c73 7061 6e20 636c 6173 733d 226e connection, sel │ │ │ │ +000433a0: 663c 2f73 7061 6e3e 3c73 7061 6e20 636c f. │ │ │ │ +000433c0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000433d0: 7374 6172 743c 2f73 7061 6e3e 3c73 7061 start.value │ │ │ │ +00043410: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00043420: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , self.end │ │ │ │ +00043470: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00043490: 7370 616e 2063 6c61 7373 3d22 6e22 3e76 span class="n">v │ │ │ │ +000434a0: 616c 7565 3c2f 7370 616e 3e0a 2020 2020 alue. │ │ │ │ +000434b0: 2020 2020 3c73 7061 6e20 636c 6173 733d ). │ │ │ │ +000434d0: 2020 2020 203c 7370 616e 2063 6c61 7373 return (. │ │ │ │ +00043510: 2020 2020 2020 2020 3c73 7061 6e20 636c self.temp │ │ │ │ +00043560: 6c61 7465 3c2f 7370 616e 3e0a 2020 2020 late. │ │ │ │ +00043570: 2020 2020 2020 2020 3c73 7061 6e20 636c % │ │ │ │ +00043590: 203c 7370 616e 2063 6c61 7373 3d22 7022 {. │ │ │ │ +000435b0: 2020 2020 2020 2020 2020 3c73 7061 6e20 " │ │ │ │ +000435d0: 3b66 7261 6d65 5f74 7970 6526 7175 6f74 ;frame_type" │ │ │ │ +000435e0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;: │ │ │ │ +00043600: 203c 7370 616e 2063 6c61 7373 3d22 6270 self.frame_type< │ │ │ │ +00043650: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00043670: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +00043680: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00043690: 2671 756f 743b 7374 6172 7426 7175 6f74 "start" │ │ │ │ +000436a0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;: │ │ │ │ +000436c0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 start,. │ │ │ │ +00043700: 2020 2020 2020 3c73 7061 6e20 636c 6173 "end │ │ │ │ +00043720: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 ": end │ │ │ │ +00043760: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00043770: 2c3c 2f73 7061 6e3e 0a20 2020 2020 2020 ,. │ │ │ │ +00043780: 2020 2020 203c 7370 616e 2063 6c61 7373 },. │ │ │ │ +000437a0: 2020 2020 2020 2020 2020 203c 7370 616e [],. )< │ │ │ │ +000437e0: 2f73 7061 6e3e 0a0a 2020 2020 3c73 7061 /span>.. def< │ │ │ │ +00043800: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> __repr__ │ │ │ │ +00043820: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 (< │ │ │ │ +00043840: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00043850: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self):. ret │ │ │ │ +00043890: 7572 6e3c 2f73 7061 6e3e 203c 7370 616e urn &quo │ │ │ │ +000438b0: 743b 266c 743b 3c2f 7370 616e 3e3c 7370 t;<%s │ │ │ │ +000438d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 : %s> │ │ │ │ +00043920: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " %< │ │ │ │ +00043940: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> (< │ │ │ │ +00043960: 7370 616e 2063 6c61 7373 3d22 6270 223e span class="bp"> │ │ │ │ +00043970: 7365 6c66 3c2f 7370 616e 3e3c 7370 616e self.__class__.__n │ │ │ │ +000439e0: 616d 655f 5f3c 2f73 7061 6e3e 3c73 7061 ame__, self).. < │ │ │ │ +00043a40: 7370 616e 2063 6c61 7373 3d22 6b22 3e64 span class="k">d │ │ │ │ +00043a50: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef get_g │ │ │ │ +00043a70: 726f 7570 5f62 795f 636f 6c73 3c2f 7370 roup_by_cols(self │ │ │ │ +00043ab0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 ): │ │ │ │ +00043ad0: 0a20 2020 2020 2020 203c 7370 616e 2063 . return< │ │ │ │ +00043af0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> [] │ │ │ │ +00043b10: 0a0a 2020 2020 3c73 7061 6e20 636c 6173 .. def │ │ │ │ +00043b30: 203c 7370 616e 2063 6c61 7373 3d22 666d __str__ │ │ │ │ +00043b50: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00043b60: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self):. │ │ │ │ +00043ba0: 2020 2020 2020 3c73 7061 6e20 636c 6173 if │ │ │ │ +00043bc0: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.start │ │ │ │ +00043c10: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00043c20: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .value is │ │ │ │ +00043c60: 3c73 7061 6e20 636c 6173 733d 226f 7722 not Non │ │ │ │ +00043c90: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e and self.start.val │ │ │ │ +00043d30: 7565 3c2f 7370 616e 3e20 3c73 7061 6e20 ue < 0< │ │ │ │ +00043d70: 7370 616e 2063 6c61 7373 3d22 7022 3e3a span class="p">: │ │ │ │ +00043d80: 3c2f 7370 616e 3e0a 2020 2020 2020 2020 . │ │ │ │ +00043d90: 2020 2020 3c73 7061 6e20 636c 6173 733d start │ │ │ │ +00043db0: 203c 7370 616e 2063 6c61 7373 3d22 6f22 = " │ │ │ │ +00043de0: 3b3c 2f73 7061 6e3e 3c73 7061 6e20 636c ;%d %s" % (abs │ │ │ │ +00043ea0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00043eb0: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self.star │ │ │ │ +00043f00: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t. │ │ │ │ +00043f20: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00043f30: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value), connection │ │ │ │ +00043f70: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00043f90: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00043fa0: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps.PRECEDING). │ │ │ │ +00044000: 2020 3c73 7061 6e20 636c 6173 733d 226b elif s │ │ │ │ +00044030: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.start.< │ │ │ │ +00044080: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value is n │ │ │ │ +000440d0: 6f74 3c2f 7370 616e 3e20 3c73 7061 6e20 ot None< │ │ │ │ +000440f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> and self< │ │ │ │ +00044130: 7370 616e 2063 6c61 7373 3d22 6f22 3e2e span class="o">. │ │ │ │ +00044140: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 start.value │ │ │ │ +00044190: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c == 0:. │ │ │ │ +000441f0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00044200: 7374 6172 743c 2f73 7061 6e3e 203c 7370 start = connection │ │ │ │ +00044240: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00044260: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +00044270: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps.CURRENT_ROW. else │ │ │ │ +000442d0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 :. │ │ │ │ +000442f0: 2020 2020 2020 2020 2020 2020 3c73 7061 star │ │ │ │ +00044310: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t = connection.ops.UNB │ │ │ │ +000443b0: 4f55 4e44 4544 5f50 5245 4345 4449 4e47 OUNDED_PRECEDING │ │ │ │ +000443c0: 3c2f 7370 616e 3e0a 0a20 2020 2020 2020 .. │ │ │ │ +000443d0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 if self │ │ │ │ +00044400: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +00044420: 7370 616e 2063 6c61 7373 3d22 6e22 3e65 span class="n">e │ │ │ │ +00044430: 6e64 3c2f 7370 616e 3e3c 7370 616e 2063 nd.value i │ │ │ │ +00044480: 733c 2f73 7061 6e3e 203c 7370 616e 2063 s not None and s │ │ │ │ +000444f0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.end.value │ │ │ │ +00044560: 203c 7370 616e 2063 6c61 7373 3d22 6f22 > 0< │ │ │ │ +00044590: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:. │ │ │ │ +000445b0: 2020 2020 2020 2020 2020 203c 7370 616e end = < │ │ │ │ +000445f0: 7370 616e 2063 6c61 7373 3d22 7332 223e span class="s2"> │ │ │ │ +00044600: 2671 756f 743b 3c2f 7370 616e 3e3c 7370 "%d │ │ │ │ +00044620: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 │ │ │ │ +00044640: 3c73 7061 6e20 636c 6173 733d 2273 6922 %s" │ │ │ │ +00044670: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; % (self< │ │ │ │ +000446c0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.en │ │ │ │ +000446f0: 643c 2f73 7061 6e3e 3c73 7061 6e20 636c d. │ │ │ │ +00044710: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00044720: 7661 6c75 653c 2f73 7061 6e3e 3c73 7061 value, connection< │ │ │ │ +00044760: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>.op │ │ │ │ +00044790: 733c 2f73 7061 6e3e 3c73 7061 6e20 636c s. │ │ │ │ +000447b0: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +000447c0: 464f 4c4c 4f57 494e 473c 2f73 7061 6e3e FOLLOWING │ │ │ │ +000447d0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +000447e0: 293c 2f73 7061 6e3e 0a20 2020 2020 2020 ). │ │ │ │ +000447f0: 203c 7370 616e 2063 6c61 7373 3d22 6b22 elif se │ │ │ │ +00044820: 6c66 3c2f 7370 616e 3e3c 7370 616e 2063 lf.end.value │ │ │ │ +00044890: 3c73 7061 6e20 636c 6173 733d 226f 7722 is not< │ │ │ │ +000448c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> None and │ │ │ │ +00044900: 3c73 7061 6e20 636c 6173 733d 2262 7022 self.end.< │ │ │ │ +00044960: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>value == 0< │ │ │ │ +000449b0: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>:. │ │ │ │ +000449d0: 2020 2020 2020 2020 2020 203c 7370 616e end = < │ │ │ │ +00044a10: 7370 616e 2063 6c61 7373 3d22 6e22 3e63 span class="n">c │ │ │ │ +00044a20: 6f6e 6e65 6374 696f 6e3c 2f73 7061 6e3e onnection │ │ │ │ +00044a30: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00044a40: 2e3c 2f73 7061 6e3e 3c73 7061 6e20 636c .ops.CURREN │ │ │ │ +00044a90: 545f 524f 573c 2f73 7061 6e3e 0a20 2020 T_ROW. │ │ │ │ +00044aa0: 2020 2020 203c 7370 616e 2063 6c61 7373 else │ │ │ │ +00044ac0: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00044ad0: 3a3c 2f73 7061 6e3e 0a20 2020 2020 2020 :. │ │ │ │ +00044ae0: 2020 2020 203c 7370 616e 2063 6c61 7373 end │ │ │ │ +00044b00: 3c73 7061 6e20 636c 6173 733d 226f 223e │ │ │ │ +00044b10: 3d3c 2f73 7061 6e3e 203c 7370 616e 2063 = connect │ │ │ │ +00044b30: 696f 6e3c 2f73 7061 6e3e 3c73 7061 6e20 ion.ops.UNBOUNDED_FO │ │ │ │ +00044ba0: 4c4c 4f57 494e 473c 2f73 7061 6e3e 0a20 LLOWING. │ │ │ │ +00044bb0: 2020 2020 2020 203c 7370 616e 2063 6c61 return self.templat │ │ │ │ +00044c20: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e % {. │ │ │ │ +00044c60: 2020 2020 2020 203c 7370 616e 2063 6c61 "fr │ │ │ │ +00044c80: 616d 655f 7479 7065 2671 756f 743b 3c2f ame_type": s │ │ │ │ +00044cc0: 656c 663c 2f73 7061 6e3e 3c73 7061 6e20 elf.frame_type,. │ │ │ │ +00044d20: 2020 2020 2020 2020 3c73 7061 6e20 636c "s │ │ │ │ +00044d40: 7461 7274 2671 756f 743b 3c2f 7370 616e tart": start< │ │ │ │ +00044d80: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>,. │ │ │ │ +00044da0: 2020 2020 2020 2020 2020 203c 7370 616e &quo │ │ │ │ +00044dc0: 743b 656e 6426 7175 6f74 3b3c 2f73 7061 t;end": end,. │ │ │ │ +00044e20: 2020 2020 2020 3c73 7061 6e20 636c 6173 }.. │ │ │ │ +00044e40: 2020 2020 3c73 7061 6e20 636c 6173 733d def < │ │ │ │ +00044e60: 7370 616e 2063 6c61 7373 3d22 6e66 223e span class="nf"> │ │ │ │ +00044e70: 7769 6e64 6f77 5f66 7261 6d65 5f73 7461 window_frame_sta │ │ │ │ +00044e80: 7274 5f65 6e64 3c2f 7370 616e 3e3c 7370 rt_end(self, connec │ │ │ │ +00044ef0: 7469 6f6e 3c2f 7370 616e 3e3c 7370 616e tion, start │ │ │ │ +00044f30: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00044f40: 2c3c 2f73 7061 6e3e 203c 7370 616e 2063 , end):. │ │ │ │ +00044f80: 2020 2020 203c 7370 616e 2063 6c61 7373 raise NotImplemente │ │ │ │ +00044fc0: 6445 7272 6f72 3c2f 7370 616e 3e3c 7370 dError("Subc │ │ │ │ +00045000: 6c61 7373 6573 206d 7573 7420 696d 706c lasses must impl │ │ │ │ +00045010: 656d 656e 7420 7769 6e64 6f77 5f66 7261 ement window_fra │ │ │ │ +00045020: 6d65 5f73 7461 7274 5f65 6e64 2829 2e26 me_start_end().& │ │ │ │ +00045030: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;)...
    . │ │ │ │ +000450f0: 5b64 6f63 756d 656e 7461 7469 655d 3c2f [documentatie].class │ │ │ │ +00045120: 3c73 7061 6e20 636c 6173 733d 226e 6322 RowRange │ │ │ │ +00045140: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00045150: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (WindowFr │ │ │ │ +00045170: 616d 653c 2f73 7061 6e3e 3c73 7061 6e20 ame):. frame_ty │ │ │ │ +000451b0: 7065 3c2f 7370 616e 3e20 3c73 7061 6e20 pe = "ROWS&q │ │ │ │ +000451f0: 756f 743b 3c2f 7370 616e 3e0a 0a20 2020 uot;.. │ │ │ │ +00045200: 203c 7370 616e 2063 6c61 7373 3d22 6b22 def win │ │ │ │ +00045230: 646f 775f 6672 616d 655f 7374 6172 745f dow_frame_start_ │ │ │ │ +00045240: 656e 643c 2f73 7061 6e3e 3c73 7061 6e20 end(self,< │ │ │ │ +00045290: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> connectio │ │ │ │ +000452b0: 6e3c 2f73 7061 6e3e 3c73 7061 6e20 636c n, │ │ │ │ +000452d0: 203c 7370 616e 2063 6c61 7373 3d22 6e22 start, end │ │ │ │ +00045320: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00045330: 293a 3c2f 7370 616e 3e0a 2020 2020 2020 ):. │ │ │ │ +00045340: 2020 3c73 7061 6e20 636c 6173 733d 226b return │ │ │ │ +00045360: 3c73 7061 6e20 636c 6173 733d 226e 223e │ │ │ │ +00045370: 636f 6e6e 6563 7469 6f6e 3c2f 7370 616e connection.ops.windo │ │ │ │ +000453e0: 775f 6672 616d 655f 726f 7773 5f73 7461 w_frame_rows_sta │ │ │ │ +000453f0: 7274 5f65 6e64 3c2f 7370 616e 3e3c 7370 rt_end(start, end)....
    .[documentatie │ │ │ │ +00045530: 5d3c 2f61 3e0a 3c73 7061 6e20 636c 6173 ].class ValueRange(Win │ │ │ │ +000455a0: 646f 7746 7261 6d65 3c2f 7370 616e 3e3c dowFrame< │ │ │ │ +000455b0: 7370 616e 2063 6c61 7373 3d22 7022 3e29 span class="p">) │ │ │ │ +000455c0: 3a3c 2f73 7061 6e3e 0a20 2020 203c 7370 :. fra │ │ │ │ +000455e0: 6d65 5f74 7970 653c 2f73 7061 6e3e 203c me_type < │ │ │ │ +000455f0: 7370 616e 2063 6c61 7373 3d22 6f22 3e3d span class="o">= │ │ │ │ +00045600: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c "R │ │ │ │ +00045620: 414e 4745 2671 756f 743b 3c2f 7370 616e ANGE".. def window_frame_ │ │ │ │ +00045670: 7374 6172 745f 656e 643c 2f73 7061 6e3e start_end │ │ │ │ +00045680: 3c73 7061 6e20 636c 6173 733d 2270 223e │ │ │ │ +00045690: 283c 2f73 7061 6e3e 3c73 7061 6e20 636c (self, con │ │ │ │ +000456e0: 6e65 6374 696f 6e3c 2f73 7061 6e3e 3c73 nection,< │ │ │ │ +00045700: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> start, end< │ │ │ │ +00045750: 2f73 7061 6e3e 3c73 7061 6e20 636c 6173 /span>):. │ │ │ │ +00045770: 2020 2020 2020 2020 3c73 7061 6e20 636c return connection │ │ │ │ +000457b0: 3c2f 7370 616e 3e3c 7370 616e 2063 6c61 .< │ │ │ │ +000457d0: 7370 616e 2063 6c61 7373 3d22 6e22 3e6f span class="n">o │ │ │ │ +000457e0: 7073 3c2f 7370 616e 3e3c 7370 616e 2063 ps.window_frame_ra │ │ │ │ +00045820: 6e67 655f 7374 6172 745f 656e 643c 2f73 nge_start_end(star │ │ │ │ +00045860: 743c 2f73 7061 6e3e 3c73 7061 6e20 636c t, │ │ │ │ +00045880: 203c 7370 616e 2063 6c61 7373 3d22 6e22 end)
    ..
    .. │ │ │ │ +000458d0: 2020 203c 2f64 6976 3e0a 2020 2020 2020
    . │ │ │ │ +000458e0: 2020 3c2f 6469 763e 0a20 2020 2020 203c
    . < │ │ │ │ +000458f0: 2f64 6976 3e0a 2020 2020 2020 0a20 2020 /div>. . │ │ │ │ +00045900: 2020 2020 200a 2020 2020 2020 2020 2020 . │ │ │ │ +00045910: 3c64 6976 2063 6c61 7373 3d22 7975 692d . │ │ │ │ +00045bd0: 2020 2020 2020 203c 6833 3e4c 6173 7420

    Last │ │ │ │ +00045be0: 7570 6461 7465 3a3c 2f68 333e 0a20 2020 update:

    . │ │ │ │ +00045bf0: 2020 2020 2020 2020 2020 203c 7020 636c

    me │ │ │ │ +00045c10: 6920 3038 2c20 3230 3234 3c2f 703e 0a20 i 08, 2024

    . │ │ │ │ +00045c20: 2020 2020 2020 2020 203c 2f64 6976 3e0a
    . │ │ │ │ +00045c30: 2020 2020 2020 2020 0a20 2020 2020 200a . . │ │ │ │ +00045c40: 2020 2020 3c2f 6469 763e 0a0a 2020 2020
    .. │ │ │ │ +00045c50: 3c64 6976 2069 643d 2266 7422 3e0a 2020
    . │ │ │ │ +00045c60: 2020 2020 3c64 6976 2063 6c61 7373 3d22 . .
    .. │ │ │ │ +00045ce0: 2020 2020 203c 6469 7620 636c 6173 733d
    │ │ │ │ +00045d00: 0a20 2020 203c 2f64 6976 3e0a 2020 3c2f .
    . . │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..eexxpprreessssiioonnss ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..eexxpprreessssiioonnss ************ │ │ │ │ │ import copy │ │ │ │ │ import datetime │ │ │ │ │ import functools │ │ │ │ │ import inspect │ │ │ │ │ import warnings │ │ │ │ │ from collections import defaultdict │ │ │ │ │ from decimal import Decimal │ │ │ │ │ @@ -494,15 +494,15 @@ │ │ │ │ │ """ │ │ │ │ │ if hasattr(self.output_field, "select_format"): │ │ │ │ │ return self.output_field.select_format(compiler, sql, params) │ │ │ │ │ return sql, params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible │ │ │ │ │ class Expression(BaseExpression, Combinable): │ │ │ │ │ """An expression that can be combined with other expressions.""" │ │ │ │ │ │ │ │ │ │ @cached_property │ │ │ │ │ def identity(self): │ │ │ │ │ constructor_signature = inspect.signature(self.__init__) │ │ │ │ │ @@ -838,15 +838,15 @@ │ │ │ │ │ rhs = compiler.compile(self.rhs) │ │ │ │ │ return connection.ops.subtract_temporals( │ │ │ │ │ self.lhs.output_field.get_internal_type(), lhs, rhs │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.F") │ │ │ │ │ class F(Combinable): │ │ │ │ │ """An object capable of resolving references to existing query objects.""" │ │ │ │ │ │ │ │ │ │ def __init__(self, name): │ │ │ │ │ """ │ │ │ │ │ Arguments: │ │ │ │ │ @@ -918,15 +918,15 @@ │ │ │ │ │ return self │ │ │ │ │ │ │ │ │ │ def get_group_by_cols(self): │ │ │ │ │ return [] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class OuterRef(F): │ │ │ │ │ contains_aggregate = False │ │ │ │ │ contains_over_clause = False │ │ │ │ │ │ │ │ │ │ def resolve_expression(self, *args, **kwargs): │ │ │ │ │ if isinstance(self.name, self.__class__): │ │ │ │ │ return self.name │ │ │ │ │ @@ -935,15 +935,15 @@ │ │ │ │ │ def relabeled_clone(self, relabels): │ │ │ │ │ return self │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.Func") │ │ │ │ │ class Func(SQLiteNumericMixin, Expression): │ │ │ │ │ """An SQL function call.""" │ │ │ │ │ │ │ │ │ │ function = None │ │ │ │ │ template = "%(function)s(%(expressions)s)" │ │ │ │ │ arg_joiner = ", " │ │ │ │ │ @@ -994,15 +994,15 @@ │ │ │ │ │ for pos, arg in enumerate(c.source_expressions): │ │ │ │ │ c.source_expressions[pos] = arg.resolve_expression( │ │ │ │ │ query, allow_joins, reuse, summarize, for_save │ │ │ │ │ ) │ │ │ │ │ return c │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def as_sql( │ │ │ │ │ self, │ │ │ │ │ compiler, │ │ │ │ │ connection, │ │ │ │ │ function=None, │ │ │ │ │ template=None, │ │ │ │ │ arg_joiner=None, │ │ │ │ │ @@ -1047,15 +1047,15 @@ │ │ │ │ │ copy.extra = self.extra.copy() │ │ │ │ │ return copy │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.Value") │ │ │ │ │ class Value(SQLiteNumericMixin, Expression): │ │ │ │ │ """Represent a wrapped value as a node within an expression.""" │ │ │ │ │ │ │ │ │ │ # Provide a default value for `for_save` in order to allow unresolved │ │ │ │ │ # instances to be compiled until a decision is taken in #25425. │ │ │ │ │ for_save = False │ │ │ │ │ @@ -1135,15 +1135,15 @@ │ │ │ │ │ def empty_result_set_value(self): │ │ │ │ │ return self.value │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RawSQL(Expression): │ │ │ │ │ def __init__(self, sql, params, output_field=None): │ │ │ │ │ if output_field is None: │ │ │ │ │ output_field = fields.Field() │ │ │ │ │ self.sql, self.params = sql, params │ │ │ │ │ super().__init__(output_field=output_field) │ │ │ │ │ │ │ │ │ │ @@ -1324,15 +1324,15 @@ │ │ │ │ │ group_by_cols = [] │ │ │ │ │ for order_by in self.get_source_expressions(): │ │ │ │ │ group_by_cols.extend(order_by.get_group_by_cols()) │ │ │ │ │ return group_by_cols │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.ExpressionWrapper") │ │ │ │ │ class ExpressionWrapper(SQLiteNumericMixin, Expression): │ │ │ │ │ """ │ │ │ │ │ An expression that can wrap another expression so that it can provide │ │ │ │ │ extra context to the inner expression, such as the output_field. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ @@ -1416,15 +1416,15 @@ │ │ │ │ │ and expression_supported_in_where_clause(self.expression) │ │ │ │ │ ): │ │ │ │ │ sql = "CASE WHEN {} THEN 1 ELSE 0 END".format(sql) │ │ │ │ │ return sql, params │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.When") │ │ │ │ │ class When(Expression): │ │ │ │ │ template = "WHEN %(condition)s THEN %(result)s" │ │ │ │ │ # This isn't a complete conditional expression, must be used in Case(). │ │ │ │ │ conditional = False │ │ │ │ │ │ │ │ │ │ def __init__(self, condition=None, then=None, **lookups): │ │ │ │ │ @@ -1499,15 +1499,15 @@ │ │ │ │ │ cols.extend(source.get_group_by_cols()) │ │ │ │ │ return cols │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ @deconstructible(path="django.db.models.Case") │ │ │ │ │ class Case(SQLiteNumericMixin, Expression): │ │ │ │ │ """ │ │ │ │ │ An SQL searched CASE expression: │ │ │ │ │ │ │ │ │ │ CASE │ │ │ │ │ WHEN n > 0 │ │ │ │ │ @@ -1602,15 +1602,15 @@ │ │ │ │ │ return self.default.get_group_by_cols() │ │ │ │ │ return super().get_group_by_cols() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Subquery(BaseExpression, Combinable): │ │ │ │ │ """ │ │ │ │ │ An explicit subquery. It may contain OuterRef() references to the outer │ │ │ │ │ query which will be resolved when it is applied to that query. │ │ │ │ │ """ │ │ │ │ │ │ │ │ │ │ template = "(%(subquery)s)" │ │ │ │ │ @@ -1659,15 +1659,15 @@ │ │ │ │ │ def get_group_by_cols(self): │ │ │ │ │ return self.query.get_group_by_cols(wrapper=self) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Exists(Subquery): │ │ │ │ │ template = "EXISTS(%(subquery)s)" │ │ │ │ │ output_field = fields.BooleanField() │ │ │ │ │ empty_result_set_value = False │ │ │ │ │ │ │ │ │ │ def __init__(self, queryset, **kwargs): │ │ │ │ │ super().__init__(queryset, **kwargs) │ │ │ │ │ @@ -1786,15 +1786,15 @@ │ │ │ │ │ self.descending = False │ │ │ │ │ │ │ │ │ │ def desc(self): │ │ │ │ │ self.descending = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class Window(SQLiteNumericMixin, Expression): │ │ │ │ │ template = "%(expression)s OVER (%(window)s)" │ │ │ │ │ # Although the main expression may either be an aggregate or an │ │ │ │ │ # expression with an aggregate function, the GROUP BY that will │ │ │ │ │ # be introduced in the query as a result is not desired. │ │ │ │ │ contains_aggregate = False │ │ │ │ │ contains_over_clause = True │ │ │ │ │ @@ -1978,30 +1978,30 @@ │ │ │ │ │ │ │ │ │ │ def window_frame_start_end(self, connection, start, end): │ │ │ │ │ raise NotImplementedError("Subclasses must implement │ │ │ │ │ window_frame_start_end().") │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class RowRange(WindowFrame): │ │ │ │ │ frame_type = "ROWS" │ │ │ │ │ │ │ │ │ │ def window_frame_start_end(self, connection, start, end): │ │ │ │ │ return connection.ops.window_frame_rows_start_end(start, end) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ValueRange(WindowFrame): │ │ │ │ │ frame_type = "RANGE" │ │ │ │ │ │ │ │ │ │ def window_frame_start_end(self, connection, start, end): │ │ │ │ │ return connection.ops.window_frame_range_start_end(start, end) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/files.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.fields.files — Django 4.2.13 documentation │ │ │ │ + django.db.models.fields.files — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Django 4.2.13 documentation

    │ │ │ │ +

    Django 4.2.13 documentatie

    │ │ │ │ │ │ │ │ │ │ │ │ + up
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Source code for django.db.models.fields.files

    │ │ │ │ +  

    Broncode voor django.db.models.fields.files

    │ │ │ │  import datetime
    │ │ │ │  import posixpath
    │ │ │ │  
    │ │ │ │  from django import forms
    │ │ │ │  from django.core import checks
    │ │ │ │  from django.core.files.base import File
    │ │ │ │  from django.core.files.images import ImageFile
    │ │ │ │ @@ -84,15 +85,15 @@
    │ │ │ │  from django.db.models.fields import Field
    │ │ │ │  from django.db.models.query_utils import DeferredAttribute
    │ │ │ │  from django.db.models.utils import AltersData
    │ │ │ │  from django.utils.translation import gettext_lazy as _
    │ │ │ │  
    │ │ │ │  
    │ │ │ │  
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FieldFile(File, AltersData): │ │ │ │ def __init__(self, instance, field, name): │ │ │ │ super().__init__(None, name) │ │ │ │ self.instance = instance │ │ │ │ self.field = field │ │ │ │ self.storage = field.storage │ │ │ │ self._committed = True │ │ │ │ @@ -145,15 +146,15 @@ │ │ │ │ def size(self): │ │ │ │ self._require_file() │ │ │ │ if not self._committed: │ │ │ │ return self.file.size │ │ │ │ return self.storage.size(self.name) │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def open(self, mode="rb"): │ │ │ │ self._require_file() │ │ │ │ if getattr(self, "_file", None) is None: │ │ │ │ self.file = self.storage.open(self.name, mode) │ │ │ │ else: │ │ │ │ self.file.open(mode) │ │ │ │ return self
    │ │ │ │ @@ -163,30 +164,30 @@ │ │ │ │ open.alters_data = True │ │ │ │ │ │ │ │ # In addition to the standard File API, FieldFiles have extra methods │ │ │ │ # to further manipulate the underlying file, as well as update the │ │ │ │ # associated model instance. │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def save(self, name, content, save=True): │ │ │ │ name = self.field.generate_filename(self.instance, name) │ │ │ │ self.name = self.storage.save(name, content, max_length=self.field.max_length) │ │ │ │ setattr(self.instance, self.field.attname, self.name) │ │ │ │ self._committed = True │ │ │ │ │ │ │ │ # Save the object because it has changed, unless save is False │ │ │ │ if save: │ │ │ │ self.instance.save()
    │ │ │ │ │ │ │ │ │ │ │ │ save.alters_data = True │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def delete(self, save=True): │ │ │ │ if not self: │ │ │ │ return │ │ │ │ # Only close the file if it's already open, which we know by the │ │ │ │ # presence of self._file │ │ │ │ if hasattr(self, "_file"): │ │ │ │ self.close() │ │ │ │ @@ -206,15 +207,15 @@ │ │ │ │ │ │ │ │ @property │ │ │ │ def closed(self): │ │ │ │ file = getattr(self, "_file", None) │ │ │ │ return file is None or file.closed │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ def close(self): │ │ │ │ file = getattr(self, "_file", None) │ │ │ │ if file is not None: │ │ │ │ file.close()
    │ │ │ │ │ │ │ │ │ │ │ │ def __getstate__(self): │ │ │ │ @@ -306,15 +307,15 @@ │ │ │ │ return instance.__dict__[self.field.attname] │ │ │ │ │ │ │ │ def __set__(self, instance, value): │ │ │ │ instance.__dict__[self.field.attname] = value │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class FileField(Field): │ │ │ │ # The class to wrap instance attributes in. Accessing the file object off │ │ │ │ # the instance will always return an instance of attr_class. │ │ │ │ attr_class = FieldFile │ │ │ │ │ │ │ │ # The descriptor to use for accessing the attribute off of the class. │ │ │ │ descriptor_class = FileDescriptor │ │ │ │ @@ -475,15 +476,15 @@ │ │ │ │ # Clear the image dimensions cache │ │ │ │ if hasattr(self, "_dimensions_cache"): │ │ │ │ del self._dimensions_cache │ │ │ │ super().delete(save) │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class ImageField(FileField): │ │ │ │ attr_class = ImageFieldFile │ │ │ │ descriptor_class = ImageFileDescriptor │ │ │ │ description = _("Image") │ │ │ │ │ │ │ │ def __init__( │ │ │ │ self, │ │ │ │ @@ -610,35 +611,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ + up
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..ffiieellddss..ffiilleess ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..ffiieellddss..ffiilleess ************ │ │ │ │ │ import datetime │ │ │ │ │ import posixpath │ │ │ │ │ │ │ │ │ │ from django import forms │ │ │ │ │ from django.core import checks │ │ │ │ │ from django.core.files.base import File │ │ │ │ │ from django.core.files.images import ImageFile │ │ │ │ │ @@ -15,15 +15,15 @@ │ │ │ │ │ from django.db.models.fields import Field │ │ │ │ │ from django.db.models.query_utils import DeferredAttribute │ │ │ │ │ from django.db.models.utils import AltersData │ │ │ │ │ from django.utils.translation import gettext_lazy as _ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FieldFile(File, AltersData): │ │ │ │ │ def __init__(self, instance, field, name): │ │ │ │ │ super().__init__(None, name) │ │ │ │ │ self.instance = instance │ │ │ │ │ self.field = field │ │ │ │ │ self.storage = field.storage │ │ │ │ │ self._committed = True │ │ │ │ │ @@ -77,15 +77,15 @@ │ │ │ │ │ def size(self): │ │ │ │ │ self._require_file() │ │ │ │ │ if not self._committed: │ │ │ │ │ return self.file.size │ │ │ │ │ return self.storage.size(self.name) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def open(self, mode="rb"): │ │ │ │ │ self._require_file() │ │ │ │ │ if getattr(self, "_file", None) is None: │ │ │ │ │ self.file = self.storage.open(self.name, mode) │ │ │ │ │ else: │ │ │ │ │ self.file.open(mode) │ │ │ │ │ return self │ │ │ │ │ @@ -96,15 +96,15 @@ │ │ │ │ │ open.alters_data = True │ │ │ │ │ │ │ │ │ │ # In addition to the standard File API, FieldFiles have extra methods │ │ │ │ │ # to further manipulate the underlying file, as well as update the │ │ │ │ │ # associated model instance. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def save(self, name, content, save=True): │ │ │ │ │ name = self.field.generate_filename(self.instance, name) │ │ │ │ │ self.name = self.storage.save(name, content, │ │ │ │ │ max_length=self.field.max_length) │ │ │ │ │ setattr(self.instance, self.field.attname, self.name) │ │ │ │ │ self._committed = True │ │ │ │ │ │ │ │ │ │ @@ -113,15 +113,15 @@ │ │ │ │ │ self.instance.save() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ save.alters_data = True │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def delete(self, save=True): │ │ │ │ │ if not self: │ │ │ │ │ return │ │ │ │ │ # Only close the file if it's already open, which we know by the │ │ │ │ │ # presence of self._file │ │ │ │ │ if hasattr(self, "_file"): │ │ │ │ │ self.close() │ │ │ │ │ @@ -142,15 +142,15 @@ │ │ │ │ │ │ │ │ │ │ @property │ │ │ │ │ def closed(self): │ │ │ │ │ file = getattr(self, "_file", None) │ │ │ │ │ return file is None or file.closed │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ def close(self): │ │ │ │ │ file = getattr(self, "_file", None) │ │ │ │ │ if file is not None: │ │ │ │ │ file.close() │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ return instance.__dict__[self.field.attname] │ │ │ │ │ │ │ │ │ │ def __set__(self, instance, value): │ │ │ │ │ instance.__dict__[self.field.attname] = value │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class FileField(Field): │ │ │ │ │ # The class to wrap instance attributes in. Accessing the file object off │ │ │ │ │ # the instance will always return an instance of attr_class. │ │ │ │ │ attr_class = FieldFile │ │ │ │ │ │ │ │ │ │ # The descriptor to use for accessing the attribute off of the class. │ │ │ │ │ descriptor_class = FileDescriptor │ │ │ │ │ @@ -419,15 +419,15 @@ │ │ │ │ │ # Clear the image dimensions cache │ │ │ │ │ if hasattr(self, "_dimensions_cache"): │ │ │ │ │ del self._dimensions_cache │ │ │ │ │ super().delete(save) │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class ImageField(FileField): │ │ │ │ │ attr_class = ImageFieldFile │ │ │ │ │ descriptor_class = ImageFileDescriptor │ │ │ │ │ description = _("Image") │ │ │ │ │ │ │ │ │ │ def __init__( │ │ │ │ │ self, │ │ │ │ │ @@ -542,12 +542,12 @@ │ │ │ │ │ return super().formfield( │ │ │ │ │ **{ │ │ │ │ │ "form_class": forms.ImageField, │ │ │ │ │ **kwargs, │ │ │ │ │ } │ │ │ │ │ ) │ │ │ │ │ │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/json.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.fields.json — Django 4.2.13 documentation │ │ │ │ + django.db.models.fields.json — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Django 4.2.13 documentation

    │ │ │ │ +

    Django 4.2.13 documentatie

    │ │ │ │ │ │ │ │ │ │ │ │ + up
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ -

    Source code for django.db.models.fields.json

    │ │ │ │ +  

    Broncode voor django.db.models.fields.json

    │ │ │ │  import json
    │ │ │ │  import warnings
    │ │ │ │  
    │ │ │ │  from django import forms
    │ │ │ │  from django.core import checks, exceptions
    │ │ │ │  from django.db import NotSupportedError, connections, router
    │ │ │ │  from django.db.models import expressions, lookups
    │ │ │ │ @@ -91,15 +92,15 @@
    │ │ │ │  from . import Field
    │ │ │ │  from .mixins import CheckFieldDefaultMixin
    │ │ │ │  
    │ │ │ │  __all__ = ["JSONField"]
    │ │ │ │  
    │ │ │ │  
    │ │ │ │  
    │ │ │ │ -[docs] │ │ │ │ +[documentatie] │ │ │ │ class JSONField(CheckFieldDefaultMixin, Field): │ │ │ │ empty_strings_allowed = False │ │ │ │ description = _("A JSON object") │ │ │ │ default_error_messages = { │ │ │ │ "invalid": _("Value must be valid JSON."), │ │ │ │ } │ │ │ │ _default_hint = ("dict", "{}") │ │ │ │ @@ -720,35 +721,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ + up
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ │ -************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_oo_nn ************ │ │ │ │ │ +************ _DD_jj_aa_nn_gg_oo_ _44_.._22_.._11_33_ _dd_oo_cc_uu_mm_ee_nn_tt_aa_tt_ii_ee ************ │ │ │ │ │ _H_o_m_e | _T_a_b_l_e_ _o_f_ _c_o_n_t_e_n_t_s | _I_n_d_e_x | _M_o_d_u_l_e_s │ │ │ │ │ _u_p │ │ │ │ │ -************ SSoouurrccee ccooddee ffoorr ddjjaannggoo..ddbb..mmooddeellss..ffiieellddss..jjssoonn ************ │ │ │ │ │ +************ BBrroonnccooddee vvoooorr ddjjaannggoo..ddbb..mmooddeellss..ffiieellddss..jjssoonn ************ │ │ │ │ │ import json │ │ │ │ │ import warnings │ │ │ │ │ │ │ │ │ │ from django import forms │ │ │ │ │ from django.core import checks, exceptions │ │ │ │ │ from django.db import NotSupportedError, connections, router │ │ │ │ │ from django.db.models import expressions, lookups │ │ │ │ │ @@ -22,15 +22,15 @@ │ │ │ │ │ from . import Field │ │ │ │ │ from .mixins import CheckFieldDefaultMixin │ │ │ │ │ │ │ │ │ │ __all__ = ["JSONField"] │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -_[_d_o_c_s_] │ │ │ │ │ +_[_d_o_c_u_m_e_n_t_a_t_i_e_] │ │ │ │ │ class JSONField(CheckFieldDefaultMixin, Field): │ │ │ │ │ empty_strings_allowed = False │ │ │ │ │ description = _("A JSON object") │ │ │ │ │ default_error_messages = { │ │ │ │ │ "invalid": _("Value must be valid JSON."), │ │ │ │ │ } │ │ │ │ │ _default_hint = ("dict", "{}") │ │ │ │ │ @@ -658,12 +658,12 @@ │ │ │ │ │ │ │ │ │ │ class KeyTransformFactory: │ │ │ │ │ def __init__(self, key_name): │ │ │ │ │ self.key_name = key_name │ │ │ │ │ │ │ │ │ │ def __call__(self, *args, **kwargs): │ │ │ │ │ return KeyTransform(self.key_name, *args, **kwargs) │ │ │ │ │ -******** QQuuiicckk sseeaarrcchh ******** │ │ │ │ │ -[q ][Go] │ │ │ │ │ +******** SSnneell zzooeekkeenn ******** │ │ │ │ │ +[q ][Zoek] │ │ │ │ │ ******** LLaasstt uuppddaattee:: ******** │ │ │ │ │ -May 08, 2024 │ │ │ │ │ +mei 08, 2024 │ │ │ │ │ _u_p │ │ │ ├── ./usr/share/doc/python-django-doc/html/_modules/django/db/models/fields/related.html │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - django.db.models.fields.related — Django 4.2.13 documentation │ │ │ │ + django.db.models.fields.related — Django 4.2.13 documentatie │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Django 4.2.13 documentation

    │ │ │ │ +

    Django 4.2.13 documentatie

    │ │ │ │ │ │ │ │ │ │ │ │ + up
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    When

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class When(condition=None, then=None, **lookups)[source]
    │ │ │ │ +class When(condition=None, then=None, **lookups)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    A When() object is used to encapsulate a condition and its result for use │ │ │ │ in the conditional expression. Using a When() object is similar to using │ │ │ │ the filter() method. The condition can │ │ │ │ be specified using field lookups, │ │ │ │ Q objects, or Expression │ │ │ │ @@ -154,30 +155,30 @@ │ │ │ │ ... & LessThan(F("registered_on"), date(2015, 1, 1)), │ │ │ │ ... then="account_type", │ │ │ │ ... ) │ │ │ │

    │ │ │ │
    │ │ │ │

    Keep in mind that each of these values can be an expression.

    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    Since the then keyword argument is reserved for the result of the │ │ │ │ When(), there is a potential conflict if a │ │ │ │ Model has a field named then. This can be │ │ │ │ resolved in two ways:

    │ │ │ │
    >>> When(then__exact=0, then=1)
    │ │ │ │  >>> When(Q(then=0), then=1)
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Case

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Case(*cases, **extra)[source]
    │ │ │ │ +class Case(*cases, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    A Case() expression is like the ifelif … │ │ │ │ else statement in Python. Each condition in the provided │ │ │ │ When() objects is evaluated in order, until one evaluates to a │ │ │ │ truthful value. The result expression from the matching When() object │ │ │ │ is returned.

    │ │ │ │ @@ -228,15 +229,15 @@ │ │ │ │ ... default=Value("0%"), │ │ │ │ ... ) │ │ │ │ ... ).values_list("name", "discount") │ │ │ │ <QuerySet [('Jane Doe', '5%'), ('James Smith', '0%'), ('Jack Black', '10%')]> │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    Remember that the conditions are evaluated in order, so in the above │ │ │ │ example we get the correct result even though the second condition matches │ │ │ │ both Jane Doe and Jack Black. This works just like an if … │ │ │ │ elifelse statement in Python.

    │ │ │ │
    │ │ │ │

    Case() also works in a filter() clause. For example, to find gold │ │ │ │ clients that registered more than a month ago and platinum clients that │ │ │ │ @@ -378,37 +379,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

    │ │ │ │
    │ │ │ │ -

    Previous topic

    │ │ │ │ +

    Vorig onderwerp

    │ │ │ │

    Query Expressions

    │ │ │ │ + title="vorig hoofdstuk">Query Expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Next topic

    │ │ │ │ +

    Volgend onderwerp

    │ │ │ │

    Database Functions

    │ │ │ │ + title="volgend hoofdstuk">Database Functions

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │

    Last update:

    │ │ │ │ -

    May 08, 2024

    │ │ │ │ +

    mei 08, 2024

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Warning

    │ │ │ │ +

    Waarschuwing

    │ │ │ │

    A Python value passed to Coalesce on MySQL may be converted to an │ │ │ │ incorrect type unless explicitly cast to the correct database type:

    │ │ │ │
    >>> from django.db.models import DateTimeField
    │ │ │ │  >>> from django.db.models.functions import Cast, Coalesce
    │ │ │ │  >>> from django.utils import timezone
    │ │ │ │  >>> now = timezone.now()
    │ │ │ │  >>> Coalesce('updated', Cast(now, DateTimeField()))
    │ │ │ │ @@ -164,15 +165,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Collate

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Collate(expression, collation)[source]
    │ │ │ │ +class Collate(expression, collation)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Takes an expression and a collation name to query against.

    │ │ │ │

    For example, to filter case-insensitively in SQLite:

    │ │ │ │
    >>> Author.objects.filter(name=Collate(Value("john"), "nocase"))
    │ │ │ │  <QuerySet [<Author: John>, <Author: john>]>
    │ │ │ │  
    │ │ │ │ @@ -183,15 +184,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Greatest

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Greatest(*expressions, **extra)[source]
    │ │ │ │ +class Greatest(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a list of at least two field names or expressions and returns the │ │ │ │ greatest value. Each argument must be of a similar type, so mixing text and │ │ │ │ numbers will result in a database error.

    │ │ │ │

    Usage example:

    │ │ │ │
    class Blog(models.Model):
    │ │ │ │ @@ -211,15 +212,15 @@
    │ │ │ │  >>> comments = Comment.objects.annotate(last_updated=Greatest("modified", "blog__modified"))
    │ │ │ │  >>> annotated_comment = comments.get()
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    annotated_comment.last_updated will be the most recent of blog.modified │ │ │ │ and comment.modified.

    │ │ │ │
    │ │ │ │ -

    Warning

    │ │ │ │ +

    Waarschuwing

    │ │ │ │

    The behavior of Greatest when one or more expression may be null │ │ │ │ varies between databases:

    │ │ │ │
      │ │ │ │
    • PostgreSQL: Greatest will return the largest non-null expression, │ │ │ │ or null if all expressions are null.

    • │ │ │ │
    • SQLite, Oracle, and MySQL: If any expression is null, Greatest │ │ │ │ will return null.

    • │ │ │ │ @@ -228,15 +229,15 @@ │ │ │ │ a sensible minimum value to provide as a default.

      │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    JSONObject

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class JSONObject(**fields)[source]
    │ │ │ │ +class JSONObject(**fields)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Takes a list of key-value pairs and returns a JSON object containing those │ │ │ │ pairs.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models import F
    │ │ │ │  >>> from django.db.models.functions import JSONObject, Lower
    │ │ │ │ @@ -253,22 +254,22 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Least

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Least(*expressions, **extra)[source]
    │ │ │ │ +class Least(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a list of at least two field names or expressions and returns the │ │ │ │ least value. Each argument must be of a similar type, so mixing text and numbers │ │ │ │ will result in a database error.

    │ │ │ │
    │ │ │ │ -

    Warning

    │ │ │ │ +

    Waarschuwing

    │ │ │ │

    The behavior of Least when one or more expression may be null │ │ │ │ varies between databases:

    │ │ │ │
      │ │ │ │
    • PostgreSQL: Least will return the smallest non-null expression, │ │ │ │ or null if all expressions are null.

    • │ │ │ │
    • SQLite, Oracle, and MySQL: If any expression is null, Least │ │ │ │ will return null.

    • │ │ │ │ @@ -277,15 +278,15 @@ │ │ │ │ a sensible maximum value to provide as a default.

      │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    NullIf

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class NullIf(expression1, expression2)[source]
    │ │ │ │ +class NullIf(expression1, expression2)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts two expressions and returns None if they are equal, otherwise │ │ │ │ returns expression1.

    │ │ │ │
    │ │ │ │

    Caveats on Oracle

    │ │ │ │

    Due to an Oracle convention, this │ │ │ │ @@ -308,15 +309,15 @@ │ │ │ │ end_time = models.TimeField(null=True, blank=True) │ │ │ │

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Extract

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Extract(expression, lookup_name=None, tzinfo=None, **extra)[source]
    │ │ │ │ +class Extract(expression, lookup_name=None, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Extracts a component of a date as a number.

    │ │ │ │

    Takes an expression representing a DateField, DateTimeField, │ │ │ │ TimeField, or DurationField and a lookup_name, and returns the part │ │ │ │ of the date referenced by lookup_name as an IntegerField. │ │ │ │ Django usually uses the databases’ extract function, so you may use any │ │ │ │ @@ -391,88 +392,88 @@ │ │ │ │ 1 │ │ │ │

    │ │ │ │
    │ │ │ │
    │ │ │ │

    DateField extracts

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractYear(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractYear(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'year'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractIsoYear(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractIsoYear(expression, tzinfo=None, **extra)[broncode] │ │ │ │

    Returns the ISO-8601 week-numbering year.

    │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'iso_year'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractMonth(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractMonth(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'month'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractDay(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractDay(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'day'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractWeekDay(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractWeekDay(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'week_day'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractIsoWeekDay(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractIsoWeekDay(expression, tzinfo=None, **extra)[broncode] │ │ │ │

    Returns the ISO-8601 week day with day 1 being Monday and day 7 being │ │ │ │ Sunday.

    │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'iso_week_day'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractWeek(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractWeek(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'week'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractQuarter(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractQuarter(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'quarter'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ @@ -528,35 +529,35 @@ │ │ │ │
    │ │ │ │
    │ │ │ │

    DateTimeField extracts

    │ │ │ │

    In addition to the following, all extracts for DateField listed above may │ │ │ │ also be used on DateTimeFields .

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractHour(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractHour(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'hour'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractMinute(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractMinute(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'minute'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExtractSecond(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class ExtractSecond(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'second'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ @@ -655,15 +656,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    Now

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Now[source]
    │ │ │ │ +class Now[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the database server’s current date and time when the query is executed, │ │ │ │ typically using the SQL CURRENT_TIMESTAMP.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Now
    │ │ │ │  >>> Article.objects.filter(published__lte=Now())
    │ │ │ │ @@ -682,15 +683,15 @@
    │ │ │ │  SQLite were added.

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Trunc

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Trunc(expression, kind, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class Trunc(expression, kind, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Truncates a date up to a significant component.

    │ │ │ │

    When you only care if something happened in a particular year, hour, or day, │ │ │ │ but not the exact second, then Trunc (and its subclasses) can be useful to │ │ │ │ filter or aggregate your data. For example, you can use Trunc to calculate │ │ │ │ the number of sales per day.

    │ │ │ │ @@ -699,15 +700,15 @@ │ │ │ │ part, and an output_field that’s either DateTimeField(), │ │ │ │ TimeField(), or DateField(). It returns a datetime, date, or time │ │ │ │ depending on output_field, with fields up to kind set to their minimum │ │ │ │ value. If output_field is omitted, it will default to the output_field │ │ │ │ of expression. A tzinfo subclass, usually provided by zoneinfo, │ │ │ │ can be passed to truncate a value in a specific timezone.

    │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.0: The is_dst parameter indicates whether or not pytz should interpret │ │ │ │ +

    Verouderd sinds versie 4.0: The is_dst parameter indicates whether or not pytz should interpret │ │ │ │ nonexistent and ambiguous datetimes in daylight saving time. By default │ │ │ │ (when is_dst=None), pytz raises an exception for such datetimes.

    │ │ │ │

    The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │
    │ │ │ │

    Given the datetime 2015-06-15 14:30:50.000321+00:00, the built-in kinds │ │ │ │ return:

    │ │ │ │
      │ │ │ │ @@ -771,55 +772,55 @@ │ │ │ │ 2015-06-15 14:40:02.000123 │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    DateField truncation

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncYear(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncYear(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'year'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncMonth(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncMonth(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'month'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncWeek(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncWeek(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │

    Truncates to midnight on the Monday of the week.

    │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'week'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncQuarter(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncQuarter(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'quarter'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │ +

    Verouderd sinds versie 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │
    │ │ │ │

    These are logically equivalent to Trunc('date_field', kind). They truncate │ │ │ │ all parts of the date up to kind which allows grouping or filtering dates │ │ │ │ with less precision. expression can have an output_field of either │ │ │ │ DateField or DateTimeField.

    │ │ │ │

    Since DateFields don’t have a time component, only Trunc subclasses │ │ │ │ that deal with date-parts can be used with DateField:

    │ │ │ │ @@ -859,15 +860,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    DateTimeField truncation

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncDate(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class TruncDate(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'date'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -877,15 +878,15 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    TruncDate casts expression to a date rather than using the built-in SQL │ │ │ │ truncate function. It’s also registered as a transform on DateTimeField as │ │ │ │ __date.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncTime(expression, tzinfo=None, **extra)[source]
    │ │ │ │ +class TruncTime(expression, tzinfo=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ lookup_name = 'time'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -895,54 +896,54 @@ │ │ │ │
    │ │ │ │ │ │ │ │

    TruncTime casts expression to a time rather than using the built-in SQL │ │ │ │ truncate function. It’s also registered as a transform on DateTimeField as │ │ │ │ __time.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncDay(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncDay(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'day'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'hour'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'minute'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'second'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │ +

    Verouderd sinds versie 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │
    │ │ │ │

    These are logically equivalent to Trunc('datetime_field', kind). They │ │ │ │ truncate all parts of the date up to kind and allow grouping or filtering │ │ │ │ datetimes with less precision. expression must have an output_field of │ │ │ │ DateTimeField.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from datetime import date, datetime, timezone
    │ │ │ │ @@ -974,44 +975,44 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    TimeField truncation

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'hour'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'minute'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[source]
    │ │ │ │ +class TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ kind = 'second'
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │ +

    Verouderd sinds versie 4.0: The is_dst parameter is deprecated and will be removed in Django 5.0.

    │ │ │ │
    │ │ │ │

    These are logically equivalent to Trunc('time_field', kind). They truncate │ │ │ │ all parts of the time up to kind which allows grouping or filtering times │ │ │ │ with less precision. expression can have an output_field of either │ │ │ │ TimeField or DateTimeField.

    │ │ │ │

    Since TimeFields don’t have a date component, only Trunc subclasses │ │ │ │ that deal with time-parts can be used with TimeField:

    │ │ │ │ @@ -1064,15 +1065,15 @@ │ │ │ │ y = models.FloatField() │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Abs

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Abs(expression, **extra)[source]
    │ │ │ │ +class Abs(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the absolute value of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Abs
    │ │ │ │  >>> Vector.objects.create(x=-0.5, y=1.1)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_abs=Abs("x"), y_abs=Abs("y")).get()
    │ │ │ │ @@ -1089,15 +1090,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    ACos

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ACos(expression, **extra)[source]
    │ │ │ │ +class ACos(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the arccosine of a numeric field or expression. The expression value │ │ │ │ must be within the range -1 to 1.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import ACos
    │ │ │ │  >>> Vector.objects.create(x=0.5, y=-0.9)
    │ │ │ │ @@ -1115,15 +1116,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    ASin

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ASin(expression, **extra)[source]
    │ │ │ │ +class ASin(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the arcsine of a numeric field or expression. The expression value must │ │ │ │ be in the range -1 to 1.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import ASin
    │ │ │ │  >>> Vector.objects.create(x=0, y=1)
    │ │ │ │ @@ -1141,15 +1142,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    ATan

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ATan(expression, **extra)[source]
    │ │ │ │ +class ATan(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the arctangent of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import ATan
    │ │ │ │  >>> Vector.objects.create(x=3.12, y=6.987)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_atan=ATan("x"), y_atan=ATan("y")).get()
    │ │ │ │ @@ -1166,15 +1167,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    ATan2

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ATan2(expression1, expression2, **extra)[source]
    │ │ │ │ +class ATan2(expression1, expression2, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the arctangent of expression1 / expression2.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import ATan2
    │ │ │ │  >>> Vector.objects.create(x=2.5, y=1.9)
    │ │ │ │  >>> vector = Vector.objects.annotate(atan2=ATan2("x", "y")).get()
    │ │ │ │ @@ -1183,15 +1184,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Ceil

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Ceil(expression, **extra)[source]
    │ │ │ │ +class Ceil(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the smallest integer greater than or equal to a numeric field or │ │ │ │ expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Ceil
    │ │ │ │  >>> Vector.objects.create(x=3.12, y=7.0)
    │ │ │ │ @@ -1209,15 +1210,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Cos

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Cos(expression, **extra)[source]
    │ │ │ │ +class Cos(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the cosine of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Cos
    │ │ │ │  >>> Vector.objects.create(x=-8.0, y=3.1415926)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_cos=Cos("x"), y_cos=Cos("y")).get()
    │ │ │ │ @@ -1234,15 +1235,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Cot

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Cot(expression, **extra)[source]
    │ │ │ │ +class Cot(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the cotangent of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Cot
    │ │ │ │  >>> Vector.objects.create(x=12.0, y=1.0)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_cot=Cot("x"), y_cot=Cot("y")).get()
    │ │ │ │ @@ -1259,15 +1260,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Degrees

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Degrees(expression, **extra)[source]
    │ │ │ │ +class Degrees(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Converts a numeric field or expression from radians to degrees.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Degrees
    │ │ │ │  >>> Vector.objects.create(x=-1.57, y=3.14)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_d=Degrees("x"), y_d=Degrees("y")).get()
    │ │ │ │ @@ -1284,15 +1285,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Exp

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Exp(expression, **extra)[source]
    │ │ │ │ +class Exp(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value of e (the natural logarithm base) raised to the power of │ │ │ │ a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Exp
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=-2.0)
    │ │ │ │ @@ -1310,15 +1311,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Floor

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Floor(expression, **extra)[source]
    │ │ │ │ +class Floor(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the largest integer value not greater than a numeric field or │ │ │ │ expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Floor
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=-2.3)
    │ │ │ │ @@ -1336,15 +1337,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Ln

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Ln(expression, **extra)[source]
    │ │ │ │ +class Ln(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the natural logarithm a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Ln
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=233.0)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_ln=Ln("x"), y_ln=Ln("y")).get()
    │ │ │ │ @@ -1361,15 +1362,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Log

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Log(expression1, expression2, **extra)[source]
    │ │ │ │ +class Log(expression1, expression2, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts two numeric fields or expressions and returns the logarithm of │ │ │ │ the second to base of the first.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Log
    │ │ │ │  >>> Vector.objects.create(x=2.0, y=4.0)
    │ │ │ │ @@ -1379,15 +1380,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Mod

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Mod(expression1, expression2, **extra)[source]
    │ │ │ │ +class Mod(expression1, expression2, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts two numeric fields or expressions and returns the remainder of │ │ │ │ the first divided by the second (modulo operation).

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Mod
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=2.3)
    │ │ │ │ @@ -1397,24 +1398,24 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Pi

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Pi(**extra)[source]
    │ │ │ │ +class Pi(**extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value of the mathematical constant π.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Power

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Power(expression1, expression2, **extra)[source]
    │ │ │ │ +class Power(expression1, expression2, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts two numeric fields or expressions and returns the value of the first │ │ │ │ raised to the power of the second.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Power
    │ │ │ │  >>> Vector.objects.create(x=2, y=-2)
    │ │ │ │ @@ -1424,15 +1425,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Radians

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Radians(expression, **extra)[source]
    │ │ │ │ +class Radians(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Converts a numeric field or expression from degrees to radians.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Radians
    │ │ │ │  >>> Vector.objects.create(x=-90, y=180)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_r=Radians("x"), y_r=Radians("y")).get()
    │ │ │ │ @@ -1449,24 +1450,24 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Random

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Random(**extra)[source]
    │ │ │ │ +class Random(**extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns a random value in the range 0.0 x < 1.0.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Round

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Round(expression, precision=0, **extra)[source]
    │ │ │ │ +class Round(expression, precision=0, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Rounds a numeric field or expression to precision (must be an integer) │ │ │ │ decimal places. By default, it rounds to the nearest integer. Whether half │ │ │ │ values are rounded up or down depends on the database.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Round
    │ │ │ │ @@ -1485,15 +1486,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Sign

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Sign(expression, **extra)[source]
    │ │ │ │ +class Sign(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the sign (-1, 0, 1) of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Sign
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=-2.3)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_sign=Sign("x"), y_sign=Sign("y")).get()
    │ │ │ │ @@ -1510,15 +1511,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Sin

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Sin(expression, **extra)[source]
    │ │ │ │ +class Sin(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the sine of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Sin
    │ │ │ │  >>> Vector.objects.create(x=5.4, y=-2.3)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_sin=Sin("x"), y_sin=Sin("y")).get()
    │ │ │ │ @@ -1535,15 +1536,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Sqrt

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Sqrt(expression, **extra)[source]
    │ │ │ │ +class Sqrt(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the square root of a nonnegative numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Sqrt
    │ │ │ │  >>> Vector.objects.create(x=4.0, y=12.0)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_sqrt=Sqrt("x"), y_sqrt=Sqrt("y")).get()
    │ │ │ │ @@ -1560,15 +1561,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Tan

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Tan(expression, **extra)[source]
    │ │ │ │ +class Tan(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the tangent of a numeric field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Tan
    │ │ │ │  >>> Vector.objects.create(x=0, y=12)
    │ │ │ │  >>> vector = Vector.objects.annotate(x_tan=Tan("x"), y_tan=Tan("y")).get()
    │ │ │ │ @@ -1588,15 +1589,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    Text functions

    │ │ │ │
    │ │ │ │

    Chr

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Chr(expression, **extra)[source]
    │ │ │ │ +class Chr(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a numeric field or expression and returns the text representation of │ │ │ │ the expression as a single character. It works the same as Python’s chr() │ │ │ │ function.

    │ │ │ │

    Like Length, it can be registered as a transform on IntegerField. │ │ │ │ The default lookup name is chr.

    │ │ │ │ @@ -1609,15 +1610,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Concat

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Concat(*expressions, **extra)[source]
    │ │ │ │ +class Concat(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a list of at least two text fields or expressions and returns the │ │ │ │ concatenated text. Each argument must be of a text or char type. If you want │ │ │ │ to concatenate a TextField() with a CharField(), then be sure to tell │ │ │ │ Django that the output_field should be a TextField(). Specifying an │ │ │ │ output_field is also required when concatenating a Value as in the │ │ │ │ @@ -1638,15 +1639,15 @@ │ │ │ │

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Left

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Left(expression, length, **extra)[source]
    │ │ │ │ +class Left(expression, length, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the first length characters of the given text field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Left
    │ │ │ │  >>> Author.objects.create(name="Margaret Smith")
    │ │ │ │  >>> author = Author.objects.annotate(first_initial=Left("name", 1)).get()
    │ │ │ │ @@ -1655,15 +1656,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Length

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Length(expression, **extra)[source]
    │ │ │ │ +class Length(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the number of characters │ │ │ │ the value has. If the expression is null, then the length will also be null.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> # Get the length of the name and goes_by fields
    │ │ │ │  >>> from django.db.models.functions import Length
    │ │ │ │ @@ -1684,15 +1685,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Lower

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Lower(expression, **extra)[source]
    │ │ │ │ +class Lower(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the lowercase │ │ │ │ representation.

    │ │ │ │

    It can also be registered as a transform as described in Length.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Lower
    │ │ │ │ @@ -1703,15 +1704,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    LPad

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class LPad(expression, length, fill_text=Value(' '), **extra)[source]
    │ │ │ │ +class LPad(expression, length, fill_text=Value(' '), **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value of the given text field or expression padded on the left side │ │ │ │ with fill_text so that the resulting value is length characters long. │ │ │ │ The default fill_text is a space.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models import Value
    │ │ │ │ @@ -1724,25 +1725,25 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    LTrim

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class LTrim(expression, **extra)[source]
    │ │ │ │ +class LTrim(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Similar to Trim, but removes only leading │ │ │ │ spaces.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    MD5

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class MD5(expression, **extra)[source]
    │ │ │ │ +class MD5(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the MD5 hash of the │ │ │ │ string.

    │ │ │ │

    It can also be registered as a transform as described in Length.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import MD5
    │ │ │ │ @@ -1753,15 +1754,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Ord

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Ord(expression, **extra)[source]
    │ │ │ │ +class Ord(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the Unicode code point │ │ │ │ value for the first character of that expression. It works similar to Python’s │ │ │ │ ord() function, but an exception isn’t raised if the expression is more │ │ │ │ than one character long.

    │ │ │ │

    It can also be registered as a transform as described in Length. │ │ │ │ @@ -1775,15 +1776,15 @@ │ │ │ │

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Repeat

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Repeat(expression, number, **extra)[source]
    │ │ │ │ +class Repeat(expression, number, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value of the given text field or expression repeated number │ │ │ │ times.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Repeat
    │ │ │ │  >>> Author.objects.create(name="John", alias="j")
    │ │ │ │ @@ -1794,15 +1795,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Replace

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Replace(expression, text, replacement=Value(''), **extra)[source]
    │ │ │ │ +class Replace(expression, text, replacement=Value(''), **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Replaces all occurrences of text with replacement in expression. │ │ │ │ The default replacement text is the empty string. The arguments to the function │ │ │ │ are case-sensitive.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models import Value
    │ │ │ │ @@ -1816,15 +1817,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Reverse

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Reverse(expression, **extra)[source]
    │ │ │ │ +class Reverse(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the characters of that │ │ │ │ expression in reverse order.

    │ │ │ │

    It can also be registered as a transform as described in Length. The │ │ │ │ default lookup name is reverse.

    │ │ │ │

    Usage example:

    │ │ │ │ @@ -1836,15 +1837,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Right

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Right(expression, length, **extra)[source]
    │ │ │ │ +class Right(expression, length, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the last length characters of the given text field or expression.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Right
    │ │ │ │  >>> Author.objects.create(name="Margaret Smith")
    │ │ │ │  >>> author = Author.objects.annotate(last_letter=Right("name", 1)).get()
    │ │ │ │ @@ -1853,55 +1854,55 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    RPad

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class RPad(expression, length, fill_text=Value(' '), **extra)[source]
    │ │ │ │ +class RPad(expression, length, fill_text=Value(' '), **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Similar to LPad, but pads on the right │ │ │ │ side.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    RTrim

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class RTrim(expression, **extra)[source]
    │ │ │ │ +class RTrim(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Similar to Trim, but removes only trailing │ │ │ │ spaces.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    SHA1, SHA224, SHA256, SHA384, and SHA512

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class SHA1(expression, **extra)[source]
    │ │ │ │ +class SHA1(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class SHA224(expression, **extra)[source]
    │ │ │ │ +class SHA224(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class SHA256(expression, **extra)[source]
    │ │ │ │ +class SHA256(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class SHA384(expression, **extra)[source]
    │ │ │ │ +class SHA384(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class SHA512(expression, **extra)[source]
    │ │ │ │ +class SHA512(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the particular hash of │ │ │ │ the string.

    │ │ │ │

    They can also be registered as transforms as described in Length.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import SHA1
    │ │ │ │ @@ -1922,15 +1923,15 @@
    │ │ │ │  

    Oracle doesn’t support the SHA224 function.

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    StrIndex

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class StrIndex(string, substring, **extra)[source]
    │ │ │ │ +class StrIndex(string, substring, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns a positive integer corresponding to the 1-indexed position of the first │ │ │ │ occurrence of substring inside string, or 0 if substring is not │ │ │ │ found.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models import Value as V
    │ │ │ │ @@ -1945,26 +1946,26 @@
    │ │ │ │  >>> authors = Author.objects.annotate(smith_index=StrIndex("name", V("Smith"))).filter(
    │ │ │ │  ...     smith_index__gt=0
    │ │ │ │  ... )
    │ │ │ │  <QuerySet [<Author: Margaret Smith>, <Author: Smith, Margaret>]>
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Warning

    │ │ │ │ +

    Waarschuwing

    │ │ │ │

    In MySQL, a database table’s collation determines │ │ │ │ whether string comparisons (such as the expression and substring of │ │ │ │ this function) are case-sensitive. Comparisons are case-insensitive by │ │ │ │ default.

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Substr

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Substr(expression, pos, length=None, **extra)[source]
    │ │ │ │ +class Substr(expression, pos, length=None, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns a substring of length length from the field or expression starting │ │ │ │ at position pos. The position is 1-indexed, so the position must be greater │ │ │ │ than 0. If length is None, then the rest of the string will be returned.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> # Set the alias to the first 5 characters of the name as lowercase
    │ │ │ │ @@ -1977,15 +1978,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Trim

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Trim(expression, **extra)[source]
    │ │ │ │ +class Trim(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value of the given text field or expression with leading and │ │ │ │ trailing spaces removed.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Trim
    │ │ │ │  >>> Author.objects.create(name="  John  ", alias="j")
    │ │ │ │ @@ -1996,15 +1997,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Upper

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Upper(expression, **extra)[source]
    │ │ │ │ +class Upper(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Accepts a single text field or expression and returns the uppercase │ │ │ │ representation.

    │ │ │ │

    It can also be registered as a transform as described in Length.

    │ │ │ │

    Usage example:

    │ │ │ │
    >>> from django.db.models.functions import Upper
    │ │ │ │ @@ -2021,45 +2022,45 @@
    │ │ │ │  

    There are a number of functions to use in a │ │ │ │ Window expression for computing the rank │ │ │ │ of elements or the Ntile of some rows.

    │ │ │ │
    │ │ │ │

    CumeDist

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class CumeDist(*expressions, **extra)[source]
    │ │ │ │ +class CumeDist(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Calculates the cumulative distribution of a value within a window or partition. │ │ │ │ The cumulative distribution is defined as the number of rows preceding or │ │ │ │ peered with the current row divided by the total number of rows in the frame.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    DenseRank

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class DenseRank(*expressions, **extra)[source]
    │ │ │ │ +class DenseRank(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Equivalent to Rank but does not have gaps.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    FirstValue

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class FirstValue(expression, **extra)[source]
    │ │ │ │ +class FirstValue(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Returns the value evaluated at the row that’s the first row of the window │ │ │ │ frame, or None if no such value exists.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Lag

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Lag(expression, offset=1, default=None, **extra)[source]
    │ │ │ │ +class Lag(expression, offset=1, default=None, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Calculates the value offset by offset, and if no row exists there, returns │ │ │ │ default.

    │ │ │ │

    default must have the same type as the expression, however, this is │ │ │ │ only validated by the database and not in Python.

    │ │ │ │
    │ │ │ │ @@ -2068,25 +2069,25 @@ │ │ │ │ the default parameter.

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    LastValue

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class LastValue(expression, **extra)[source]
    │ │ │ │ +class LastValue(expression, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Comparable to FirstValue, it calculates the last value in a given │ │ │ │ frame clause.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Lead

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Lead(expression, offset=1, default=None, **extra)[source]
    │ │ │ │ +class Lead(expression, offset=1, default=None, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Calculates the leading value in a given frame. Both │ │ │ │ offset and default are evaluated with respect to the current row.

    │ │ │ │

    default must have the same type as the expression, however, this is │ │ │ │ only validated by the database and not in Python.

    │ │ │ │
    │ │ │ │ @@ -2095,40 +2096,40 @@ │ │ │ │ the default parameter.

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    NthValue

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class NthValue(expression, nth=1, **extra)[source]
    │ │ │ │ +class NthValue(expression, nth=1, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Computes the row relative to the offset nth (must be a positive value) │ │ │ │ within the window. Returns None if no row exists.

    │ │ │ │

    Some databases may handle a nonexistent nth-value differently. For example, │ │ │ │ Oracle returns an empty string rather than None for character-based │ │ │ │ expressions. Django doesn’t do any conversions in these cases.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Ntile

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Ntile(num_buckets=1, **extra)[source]
    │ │ │ │ +class Ntile(num_buckets=1, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Calculates a partition for each of the rows in the frame clause, distributing │ │ │ │ numbers as evenly as possible between 1 and num_buckets. If the rows don’t │ │ │ │ divide evenly into a number of buckets, one or more buckets will be represented │ │ │ │ more frequently.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    PercentRank

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class PercentRank(*expressions, **extra)[source]
    │ │ │ │ +class PercentRank(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Computes the relative rank of the rows in the frame clause. This computation is │ │ │ │ equivalent to evaluating:

    │ │ │ │
    (rank - 1) / (total rows - 1)
    │ │ │ │  
    │ │ │ │
    │ │ │ │ @@ -2188,26 +2189,26 @@ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │

    Rank

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Rank(*expressions, **extra)[source]
    │ │ │ │ +class Rank(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Comparable to RowNumber, this function ranks rows in the window. The │ │ │ │ computed rank contains gaps. Use DenseRank to compute rank without │ │ │ │ gaps.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    RowNumber

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class RowNumber(*expressions, **extra)[source]
    │ │ │ │ +class RowNumber(*expressions, **extra)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Computes the row number according to the ordering of either the frame clause │ │ │ │ or the ordering of the whole query if there is no partitioning of the │ │ │ │ window frame.

    │ │ │ │
    │ │ │ │
    │ │ │ │ @@ -2317,37 +2318,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Previous topic

    │ │ │ │ +

    Vorig onderwerp

    │ │ │ │

    Conditional Expressions

    │ │ │ │ + title="vorig hoofdstuk">Conditional Expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Next topic

    │ │ │ │ +

    Volgend onderwerp

    │ │ │ │

    Paginator

    │ │ │ │ + title="volgend hoofdstuk">Paginator

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │

    Last update:

    │ │ │ │ -

    May 08, 2024

    │ │ │ │ +

    mei 08, 2024

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    The Aggregate API is as follows:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Aggregate(*expressions, output_field=None, distinct=False, filter=None, default=None, **extra)[source]
    │ │ │ │ +class Aggregate(*expressions, output_field=None, distinct=False, filter=None, default=None, **extra)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ template
    │ │ │ │

    A class attribute, as a format string, that describes the SQL that is │ │ │ │ generated for this aggregate. Defaults to │ │ │ │ '%(function)s(%(distinct)s%(expressions)s)'.

    │ │ │ │
    │ │ │ │ @@ -553,15 +554,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Value() expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Value(value, output_field=None)[source]
    │ │ │ │ +class Value(value, output_field=None)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    A Value() object represents the smallest possible component of an │ │ │ │ expression: a simple value. When you need to represent the value of an integer, │ │ │ │ boolean, or string within an expression, you can wrap that value within a │ │ │ │ Value().

    │ │ │ │

    You will rarely need to use Value() directly. When you write the expression │ │ │ │ @@ -578,15 +579,15 @@ │ │ │ │ an instance of datetime.datetime as value defaults │ │ │ │ output_field to DateTimeField.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    ExpressionWrapper() expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ExpressionWrapper(expression, output_field)[source]
    │ │ │ │ +class ExpressionWrapper(expression, output_field)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    ExpressionWrapper surrounds another expression and provides access to │ │ │ │ properties, such as output_field, that may not be │ │ │ │ available on other expressions. ExpressionWrapper is necessary when using │ │ │ │ arithmetic on F() expressions with different types as described in │ │ │ │ Using F() with annotations.

    │ │ │ │ @@ -597,15 +598,15 @@ │ │ │ │ else logic in queries. Django natively supports SQL CASE │ │ │ │ expressions. For more details see Conditional Expressions.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Subquery() expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Subquery(queryset, output_field=None)[source]
    │ │ │ │ +class Subquery(queryset, output_field=None)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    You can add an explicit subquery to a QuerySet using the Subquery │ │ │ │ expression.

    │ │ │ │

    For example, to annotate each post with the email address of the author of the │ │ │ │ newest comment on that post:

    │ │ │ │
    >>> from django.db.models import OuterRef, Subquery
    │ │ │ │ @@ -619,25 +620,25 @@
    │ │ │ │      FROM "comment" U0
    │ │ │ │      WHERE U0."post_id" = ("post"."id")
    │ │ │ │      ORDER BY U0."created_at" DESC LIMIT 1
    │ │ │ │  ) AS "newest_commenter_email" FROM "post"
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    The examples in this section are designed to show how to force │ │ │ │ Django to execute a subquery. In some cases it may be possible to │ │ │ │ write an equivalent queryset that performs the same task more │ │ │ │ clearly or efficiently.

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Referencing columns from the outer queryset

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class OuterRef(field)[source]
    │ │ │ │ +class OuterRef(field)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Use OuterRef when a queryset in a Subquery needs to refer to a field │ │ │ │ from the outer query or its transform. It acts like an F expression │ │ │ │ except that the check to see if it refers to a valid field isn’t made until the │ │ │ │ outer queryset is resolved.

    │ │ │ │

    Instances of OuterRef may be used in conjunction with nested instances │ │ │ │ @@ -677,15 +678,15 @@ │ │ │ │ OuterRef cannot be resolved until the queryset is used within a │ │ │ │ Subquery.)

    │ │ │ │
    │ │ │ │
    │ │ │ │

    Exists() subqueries

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Exists(queryset)[source]
    │ │ │ │ +class Exists(queryset)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Exists is a Subquery subclass that uses an SQL EXISTS statement. In │ │ │ │ many cases it will perform better than a subquery since the database is able to │ │ │ │ stop evaluation of the subquery when a first matching row is found.

    │ │ │ │

    For example, to annotate each post with whether or not it has a comment from │ │ │ │ within the last day:

    │ │ │ │ @@ -754,15 +755,15 @@ │ │ │ │ there is an OuterRef, this will not be possible to resolve).

    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │

    Raw SQL expressions

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class RawSQL(sql, params, output_field=None)[source]
    │ │ │ │ +class RawSQL(sql, params, output_field=None)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    Sometimes database expressions can’t easily express a complex WHERE clause. │ │ │ │ In these edge cases, use the RawSQL expression. For example:

    │ │ │ │
    >>> from django.db.models.expressions import RawSQL
    │ │ │ │  >>> queryset.annotate(val=RawSQL("select col from sometable where othercol = %s", (param,)))
    │ │ │ │  
    │ │ │ │ @@ -771,15 +772,15 @@ │ │ │ │ you’re explicitly writing SQL code) and violate the DRY principle, so you │ │ │ │ should avoid them if possible.

    │ │ │ │

    RawSQL expressions can also be used as the target of __in filters:

    │ │ │ │
    >>> queryset.filter(id__in=RawSQL("select id from sometable where col = %s", (param,)))
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Warning

    │ │ │ │ +

    Waarschuwing

    │ │ │ │

    To protect against SQL injection attacks, you must escape any │ │ │ │ parameters that the user can control by using params. params is a │ │ │ │ required argument to force you to acknowledge that you’re not interpolating │ │ │ │ your SQL with user-provided data.

    │ │ │ │

    You also must not quote placeholders in the SQL string. This example is │ │ │ │ vulnerable to SQL injection because of the quotes around %s:

    │ │ │ │
    RawSQL("select col from sometable where othercol = '%s'")  # unsafe!
    │ │ │ │ @@ -795,15 +796,15 @@
    │ │ │ │  by the group by, window functions operate on frames and
    │ │ │ │  partitions, and compute the result for each row.

    │ │ │ │

    You can specify multiple windows in the same query which in Django ORM would be │ │ │ │ equivalent to including multiple expressions in a QuerySet.annotate() call. The ORM doesn’t make use of named windows, │ │ │ │ instead they are part of the selected columns.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Window(expression, partition_by=None, order_by=None, frame=None, output_field=None)[source]
    │ │ │ │ +class Window(expression, partition_by=None, order_by=None, frame=None, output_field=None)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ template
    │ │ │ │

    Defaults to %(expression)s OVER (%(window)s). If only the │ │ │ │ expression argument is provided, the window clause will be blank.

    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -898,29 +899,29 @@ │ │ │ │ documentation for your database as needed.

    │ │ │ │
    │ │ │ │

    Frames

    │ │ │ │

    For a window frame, you can choose either a range-based sequence of rows or an │ │ │ │ ordinary sequence of rows.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ValueRange(start=None, end=None)[source]
    │ │ │ │ +class ValueRange(start=None, end=None)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ frame_type
    │ │ │ │

    This attribute is set to 'RANGE'.

    │ │ │ │
    │ │ │ │ │ │ │ │

    PostgreSQL has limited support for ValueRange and only supports use of │ │ │ │ the standard start and end points, such as CURRENT ROW and UNBOUNDED │ │ │ │ FOLLOWING.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -class RowRange(start=None, end=None)[source]
    │ │ │ │ +class RowRange(start=None, end=None)[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ frame_type
    │ │ │ │

    This attribute is set to 'ROWS'.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -996,15 +997,15 @@ │ │ │ │ but also expose a number of extra methods and attributes listed below. All │ │ │ │ query expressions must inherit from Expression() or a relevant │ │ │ │ subclass.

    │ │ │ │

    When a query expression wraps another expression, it is responsible for │ │ │ │ calling the appropriate methods on the wrapped expression.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Expression[source]
    │ │ │ │ +class Expression[broncode] │ │ │ │
    │ │ │ │
    │ │ │ │ contains_aggregate
    │ │ │ │

    Tells Django that this expression contains an aggregate and that a │ │ │ │ GROUP BY clause needs to be added to the query.

    │ │ │ │
    │ │ │ │ │ │ │ │ @@ -1119,15 +1120,15 @@ │ │ │ │

    nulls_first and nulls_last define how null values are sorted. │ │ │ │ See Using F() to sort null values for example usage.

    │ │ │ │
    │ │ │ │ Changed in Django 4.1:

    In older versions, nulls_first and nulls_last defaulted to │ │ │ │ False.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.1: Passing nulls_first=False or nulls_last=False to asc() │ │ │ │ +

    Verouderd sinds versie 4.1: Passing nulls_first=False or nulls_last=False to asc() │ │ │ │ is deprecated. Use None instead.

    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ desc(nulls_first=None, nulls_last=None)
    │ │ │ │ @@ -1135,15 +1136,15 @@ │ │ │ │

    nulls_first and nulls_last define how null values are sorted. │ │ │ │ See Using F() to sort null values for example usage.

    │ │ │ │
    │ │ │ │ Changed in Django 4.1:

    In older versions, nulls_first and nulls_last defaulted to │ │ │ │ False.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Deprecated since version 4.1: Passing nulls_first=False or nulls_last=False to desc() │ │ │ │ +

    Verouderd sinds versie 4.1: Passing nulls_first=False or nulls_last=False to desc() │ │ │ │ is deprecated. Use None instead.

    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ reverse_ordering()
    │ │ │ │ @@ -1393,37 +1394,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Previous topic

    │ │ │ │ +

    Vorig onderwerp

    │ │ │ │

    Lookup API reference

    │ │ │ │ + title="vorig hoofdstuk">Lookup API reference

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Next topic

    │ │ │ │ +

    Volgend onderwerp

    │ │ │ │

    Conditional Expressions

    │ │ │ │ + title="volgend hoofdstuk">Conditional Expressions

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │

    Last update:

    │ │ │ │ -

    May 08, 2024

    │ │ │ │ +

    mei 08, 2024

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
  • │ │ │ │
    │ │ │ │ -SET_NULL[source]
    │ │ │ │ +SET_NULL[broncode] │ │ │ │

    Set the ForeignKey null; this is only possible if │ │ │ │ null is True.

    │ │ │ │
    │ │ │ │ │ │ │ │
  • │ │ │ │
  • │ │ │ │
    │ │ │ │ -SET_DEFAULT[source]
    │ │ │ │ +SET_DEFAULT[broncode] │ │ │ │

    Set the ForeignKey to its default value; a default for the │ │ │ │ ForeignKey must be set.

    │ │ │ │
    │ │ │ │ │ │ │ │
  • │ │ │ │
  • │ │ │ │
    │ │ │ │ -SET()[source]
    │ │ │ │ +SET()[broncode] │ │ │ │

    Set the ForeignKey to the value passed to │ │ │ │ SET(), or if a callable is passed in, │ │ │ │ the result of calling it. In most cases, passing a callable will be │ │ │ │ necessary to avoid executing queries at the time your models.py is │ │ │ │ imported:

    │ │ │ │
    from django.conf import settings
    │ │ │ │  from django.contrib.auth import get_user_model
    │ │ │ │ @@ -1788,15 +1789,15 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
  • │ │ │ │
  • │ │ │ │
    │ │ │ │ -DO_NOTHING[source]
    │ │ │ │ +DO_NOTHING[broncode] │ │ │ │

    Take no action. If your database backend enforces referential │ │ │ │ integrity, this will cause an IntegrityError unless │ │ │ │ you manually add an SQL ON DELETE constraint to the database field.

    │ │ │ │
    │ │ │ │ │ │ │ │
  • │ │ │ │ │ │ │ │ @@ -1829,15 +1830,15 @@ │ │ │ │
    │ │ │ │
    │ │ │ │

    If limit_choices_to is or returns a Q object, which is useful for complex queries, then it will only have an effect on the choices │ │ │ │ available in the admin when the field is not listed in │ │ │ │ raw_id_fields in the │ │ │ │ ModelAdmin for the model.

    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    If a callable is used for limit_choices_to, it will be invoked │ │ │ │ every time a new form is instantiated. It may also be invoked when a │ │ │ │ model is validated, for example by management commands or the admin. │ │ │ │ The admin constructs querysets to validate its form inputs in various │ │ │ │ edge cases multiple times, so there is a possibility your callable may │ │ │ │ be invoked several times.

    │ │ │ │
    │ │ │ │ @@ -1937,15 +1938,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │

    ManyToManyField

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class ManyToManyField(to, **options)[source]
    │ │ │ │ +class ManyToManyField(to, **options)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    A many-to-many relationship. Requires a positional argument: the class to │ │ │ │ which the model is related, which works exactly the same as it does for │ │ │ │ ForeignKey, including recursive and │ │ │ │ lazy relationships.

    │ │ │ │

    Related objects can be added, removed, or created with the field’s │ │ │ │ @@ -2012,22 +2013,22 @@ │ │ │ │ relationships. However, if you want to manually specify the intermediary │ │ │ │ table, you can use the through option to specify │ │ │ │ the Django model that represents the intermediate table that you want to │ │ │ │ use.

    │ │ │ │

    The most common use for this option is when you want to associate │ │ │ │ extra data with a many-to-many relationship.

    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    If you don’t want multiple associations between the same instances, add │ │ │ │ a UniqueConstraint including the from and to │ │ │ │ fields. Django’s automatically generated many-to-many tables include │ │ │ │ such a constraint.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    Recursive relationships using an intermediary model can’t determine the │ │ │ │ reverse accessors names, as they would be the same. You need to set a │ │ │ │ related_name to at least one of them. If you’d │ │ │ │ prefer Django not to create a backwards relation, set related_name │ │ │ │ to '+'.

    │ │ │ │
    │ │ │ │

    If you don’t specify an explicit through model, there is still an │ │ │ │ @@ -2155,15 +2156,15 @@ │ │ │ │ relationship at the database level.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    OneToOneField

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class OneToOneField(to, on_delete, parent_link=False, **options)[source]
    │ │ │ │ +class OneToOneField(to, on_delete, parent_link=False, **options)[broncode] │ │ │ │
    │ │ │ │ │ │ │ │

    A one-to-one relationship. Conceptually, this is similar to a │ │ │ │ ForeignKey with unique=True, but the │ │ │ │ “reverse” side of the relation will directly return a single object.

    │ │ │ │

    This is most useful as the primary key of a model which “extends” │ │ │ │ another model in some way; Multi-table inheritance is │ │ │ │ @@ -2228,15 +2229,15 @@ │ │ │ │ examples of OneToOneField.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    Field API reference

    │ │ │ │
    │ │ │ │
    │ │ │ │ -class Field[source]
    │ │ │ │ +class Field[broncode] │ │ │ │

    Field is an abstract class that represents a database table column. │ │ │ │ Django uses fields to create the database table (db_type()), to map │ │ │ │ Python types to database (get_prep_value()) and vice-versa │ │ │ │ (from_db_value()).

    │ │ │ │

    A field is thus a fundamental piece in different Django APIs, notably, │ │ │ │ models and querysets.

    │ │ │ │

    In models, a field is instantiated as a class attribute and represents a │ │ │ │ @@ -2275,31 +2276,31 @@ │ │ │ │ behavior.

    │ │ │ │
    │ │ │ │ │ │ │ │

    To map a Field to a database-specific type, Django exposes several │ │ │ │ methods:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -get_internal_type()[source]
    │ │ │ │ +get_internal_type()[broncode] │ │ │ │

    Returns a string naming this field for backend specific purposes. │ │ │ │ By default, it returns the class name.

    │ │ │ │

    See Emulating built-in field types for usage in custom fields.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -db_type(connection)[source]
    │ │ │ │ +db_type(connection)[broncode] │ │ │ │

    Returns the database column data type for the Field, taking │ │ │ │ into account the connection.

    │ │ │ │

    See Custom database types for usage in custom fields.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -rel_db_type(connection)[source]
    │ │ │ │ +rel_db_type(connection)[broncode] │ │ │ │

    Returns the database column data type for fields such as ForeignKey │ │ │ │ and OneToOneField that point to the Field, taking │ │ │ │ into account the connection.

    │ │ │ │

    See Custom database types for usage in custom fields.

    │ │ │ │
    │ │ │ │ │ │ │ │

    There are three main situations where Django needs to interact with the │ │ │ │ @@ -2309,24 +2310,24 @@ │ │ │ │

  • when it loads data from the database (database backend value -> Python │ │ │ │ value)

  • │ │ │ │
  • when it saves to the database (Python value -> database backend value)

  • │ │ │ │ │ │ │ │

    When querying, get_db_prep_value() and get_prep_value() are used:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -get_prep_value(value)[source]
    │ │ │ │ +get_prep_value(value)[broncode] │ │ │ │

    value is the current value of the model’s attribute, and the method │ │ │ │ should return data in a format that has been prepared for use as a │ │ │ │ parameter in a query.

    │ │ │ │

    See Converting Python objects to query values for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -get_db_prep_value(value, connection, prepared=False)[source]
    │ │ │ │ +get_db_prep_value(value, connection, prepared=False)[broncode] │ │ │ │

    Converts value to a backend-specific value. By default it returns │ │ │ │ value if prepared=True and get_prep_value() if is │ │ │ │ False.

    │ │ │ │

    See Converting query values to database values for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │

    When loading data, from_db_value() is used:

    │ │ │ │ @@ -2337,33 +2338,33 @@ │ │ │ │ the reverse of get_prep_value().

    │ │ │ │

    This method is not used for most built-in fields as the database │ │ │ │ backend already returns the correct Python type, or the backend itself │ │ │ │ does the conversion.

    │ │ │ │

    expression is the same as self.

    │ │ │ │

    See Converting values to Python objects for usage.

    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    For performance reasons, from_db_value is not implemented as a │ │ │ │ no-op on fields which do not require it (all Django fields). │ │ │ │ Consequently you may not call super in your definition.

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │

    When saving, pre_save() and get_db_prep_save() are used:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -get_db_prep_save(value, connection)[source]
    │ │ │ │ +get_db_prep_save(value, connection)[broncode] │ │ │ │

    Same as the get_db_prep_value(), but called when the field value │ │ │ │ must be saved to the database. By default returns │ │ │ │ get_db_prep_value().

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -pre_save(model_instance, add)[source]
    │ │ │ │ +pre_save(model_instance, add)[broncode] │ │ │ │

    Method called prior to get_db_prep_save() to prepare the value │ │ │ │ before being saved (e.g. for DateField.auto_now).

    │ │ │ │

    model_instance is the instance this field belongs to and add │ │ │ │ is whether the instance is being saved to the database for the first │ │ │ │ time.

    │ │ │ │

    It should return the value of the appropriate attribute from │ │ │ │ model_instance for this field. The attribute name is in │ │ │ │ @@ -2371,54 +2372,54 @@ │ │ │ │

    See Preprocessing values before saving for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │

    Fields often receive their values as a different type, either from │ │ │ │ serialization or from forms.

    │ │ │ │
    │ │ │ │
    │ │ │ │ -to_python(value)[source]
    │ │ │ │ +to_python(value)[broncode] │ │ │ │

    Converts the value into the correct Python object. It acts as the │ │ │ │ reverse of value_to_string(), and is also called in │ │ │ │ clean().

    │ │ │ │

    See Converting values to Python objects for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │

    Besides saving to the database, the field also needs to know how to │ │ │ │ serialize its value:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -value_from_object(obj)[source]
    │ │ │ │ +value_from_object(obj)[broncode] │ │ │ │

    Returns the field’s value for the given model instance.

    │ │ │ │

    This method is often used by value_to_string().

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -value_to_string(obj)[source]
    │ │ │ │ +value_to_string(obj)[broncode] │ │ │ │

    Converts obj to a string. Used to serialize the value of the field.

    │ │ │ │

    See Converting field data for serialization for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │

    When using model forms, the Field │ │ │ │ needs to know which form field it should be represented by:

    │ │ │ │
    │ │ │ │
    │ │ │ │ -formfield(form_class=None, choices_form_class=None, **kwargs)[source]
    │ │ │ │ +formfield(form_class=None, choices_form_class=None, **kwargs)[broncode] │ │ │ │

    Returns the default django.forms.Field of this field for │ │ │ │ ModelForm.

    │ │ │ │

    By default, if both form_class and choices_form_class are │ │ │ │ None, it uses CharField. If the field has │ │ │ │ choices and choices_form_class │ │ │ │ isn’t specified, it uses TypedChoiceField.

    │ │ │ │

    See Specifying the form field for a model field for usage.

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -deconstruct()[source]
    │ │ │ │ +deconstruct()[broncode] │ │ │ │

    Returns a 4-tuple with enough information to recreate the field:

    │ │ │ │
      │ │ │ │
    1. The name of the field on the model.

    2. │ │ │ │
    3. The import path of the field (e.g. "django.db.models.IntegerField"). │ │ │ │ This should be the most portable version, so less specific may be better.

    4. │ │ │ │
    5. A list of positional arguments.

    6. │ │ │ │
    7. A dict of keyword arguments.

    8. │ │ │ │ @@ -2469,15 +2470,15 @@ │ │ │ │ Field.hidden │ │ │ │

      Boolean flag that indicates if a field is used to back another non-hidden │ │ │ │ field’s functionality (e.g. the content_type and object_id fields │ │ │ │ that make up a GenericForeignKey). The hidden flag is used to │ │ │ │ distinguish what constitutes the public subset of fields on the model from │ │ │ │ all the fields on the model.

      │ │ │ │
      │ │ │ │ -

      Note

      │ │ │ │ +

      Notitie

      │ │ │ │

      Options.get_fields() │ │ │ │ excludes hidden fields by default. Pass in include_hidden=True to │ │ │ │ return hidden fields in the results.

      │ │ │ │
      │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ @@ -2639,37 +2640,37 @@ │ │ │ │
  • Attributes for fields with relations
  • │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Previous topic

    │ │ │ │ +

    Vorig onderwerp

    │ │ │ │

    Models

    │ │ │ │ + title="vorig hoofdstuk">Models

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Next topic

    │ │ │ │ +

    Volgend onderwerp

    │ │ │ │

    Model index reference

    │ │ │ │ + title="volgend hoofdstuk">Model index reference

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │

    Last update:

    │ │ │ │ -

    May 08, 2024

    │ │ │ │ +

    mei 08, 2024

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    The logic here is that if you change the URL structure of your objects, even │ │ │ │ for something small like correcting a spelling error, you don’t want to have to │ │ │ │ track down every place that the URL might be created. Specify it once, in │ │ │ │ get_absolute_url() and have all your other code call that one place.

    │ │ │ │
    │ │ │ │ -

    Note

    │ │ │ │ +

    Notitie

    │ │ │ │

    The string you return from get_absolute_url() must contain only │ │ │ │ ASCII characters (required by the URI specification, RFC 3986#section-2) │ │ │ │ and be URL-encoded, if necessary.

    │ │ │ │

    Code and templates calling get_absolute_url() should be able to use the │ │ │ │ result directly without any further processing. You may wish to use the │ │ │ │ django.utils.encoding.iri_to_uri() function to help with this if you │ │ │ │ are using strings containing characters outside the ASCII range.

    │ │ │ │ @@ -1060,37 +1061,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Previous topic

    │ │ │ │ +

    Vorig onderwerp

    │ │ │ │

    Model Meta options

    │ │ │ │ + title="vorig hoofdstuk">Model Meta options

    │ │ │ │
    │ │ │ │
    │ │ │ │ -

    Next topic

    │ │ │ │ +

    Volgend onderwerp

    │ │ │ │

    QuerySet API reference

    │ │ │ │ + title="volgend hoofdstuk">QuerySet API reference

    │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │

    Last update:

    │ │ │ │ -

    May 08, 2024

    │ │ │ │ +

    mei 08, 2024

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ │