Reference GIS QuerySet API Reference Spatial Lookups
Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box overlaps or is above the lookup geometry’s bounding box. Example: PostGIS equivalent:
246 sections in Django 5.1 Search all versions →
Reference GIS QuerySet API Reference Spatial Lookups
Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box overlaps or is above the lookup geometry’s bounding box. Example: PostGIS equivalent:
Reference GIS QuerySet API Reference Spatial Lookups
Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box overlaps or is below the lookup geometry’s bounding box. Example: PostGIS equivalent:
Reference GIS QuerySet API Reference Spatial Lookups
Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box is strictly above the lookup geometry’s bounding box. Example: PostGIS equivalent:
Reference GIS QuerySet API Reference Spatial Lookups
Availability: PostGIS, PGRaster (Conversion) Tests if the geometry field’s bounding box is strictly below the lookup geometry’s bounding box. Example: PostGIS equivalent:
Reference GeoDjango Installation Platform-specific instructionsWindows
From within the Stack Builder (to run outside of the installer, Start ‣ PostgreSQL 15 ‣ Application Stack Builder), select PostgreSQL 15 (x64) on port 5432 from the drop down menu and click next.
Reference PostgreSQL specific database constraints ExclusionConstraint
ExclusionConstraint.include A list or tuple of the names of the fields to be included in the covering exclusion constraint as non-key columns.
Reference Databases Oracle notes
The Oracle backend stores TextFields as NCLOB columns. Oracle imposes some limitations on the usage of such LOB columns in general: LOB columns may not be used as primary keys. LOB columns may not be used in indexes.
Reference Form fields Built-in Field classes
classTypedChoiceField(**kwargs)[source] : Just like a ChoiceField, except TypedChoiceField takes two extra arguments, coerce and empty_value.
Reference Widgets Base widget classes
Here’s an example widget which subclasses [`MultiWidget`](#django.forms.MultiWidget) to display a date with the day, month, and year in different select boxes.
Reference Widgets Built-in widgetsSelector and checkbox widgets
classRadioSelect[source] : - template_name: 'django/forms/widgets/radio.html' - option_template_name: 'django/forms/widgets/radio_option.html'
Reference Widgets Built-in widgetsSelector and checkbox widgets
classCheckboxSelectMultiple[source] : - template_name: 'django/forms/widgets/checkbox_select.html' - option_template_name: 'django/forms/widgets/checkbox_option.html' Like RadioSelect, you can loop over the individual checkboxes for the widget’s choices.
Reference Conditional Expressions Advanced queries
When a conditional expression returns a boolean value, it is possible to use it directly in filters.
Reference Constraints reference UniqueConstraint
UniqueConstraint.include A list or tuple of the names of the fields to be included in the covering unique index as non-key columns.
Reference Model index reference Index options
Index.include A list or tuple of the names of the fields to be included in the covering index as non-key columns.
Reference QuerySet API reference QuerySet APIOperators that return new QuerySets
Combines two QuerySets using the SQL AND operator in a manner similar to chaining filters. The following are equivalent: SQL equivalent:
Reference QuerySet API reference QuerySet APIOperators that return new QuerySets
Combines two QuerySets using the SQL OR operator. The following are equivalent: SQL equivalent: | is not a commutative operation, as different (though equivalent) queries may be generated.
Reference QuerySet API reference QuerySet APIOperators that return new QuerySets
Combines two QuerySets using the SQL XOR operator. A XOR expression matches rows that are matched by an odd number of operands. The following are equivalent: SQL equivalent: NOTE: XOR is natively supported on MariaDB and MySQL.
Reference QuerySet API reference QuerySet APIMethods that do not return QuerySets
count() acount() Asynchronous version: acount() Returns an integer representing the number of objects in the database matching the QuerySet.
Reference QuerySet API reference QuerySet APIField lookups
Exact match. If the value provided for comparison is None, it will be interpreted as an SQL NULL (see isnull for more details).
Reference QuerySet API reference QuerySet APIField lookups
Case-insensitive exact match. If the value provided for comparison is None, it will be interpreted as an SQL NULL (see isnull for more details). Example: SQL equivalents: Note the first query will match 'Beatles Blog', 'beatles blog', 'BeAtLes BLoG', etc.