gis.gdal.OGRGeometry.wkb_size

wkb_size Returns the size of the WKB buffer needed to hold a WKB representation of this geometry: >>> OGRGeometry('POINT(1 2)').wkb_size 21

views.decorators.csrf.csrf_protect()

csrf_protect(view) Decorator that provides the protection of CsrfViewMiddleware to a view. Usage: from django.views.decorators.csrf import csrf_protect from django.shortcuts import render @csrf_protect def my_view(request): c = {} # ... return render(request, "a_template.html", c) If you are using class-based views, you can refer to Decorating class-based views.

postgres.fields.RangeField

class RangeField(**options) [source] Base class for model range fields. base_field The model field class to use. range_type The psycopg2 range type to use. form_field The form field class to use. Should be a subclass of django.contrib.postgres.forms.BaseRangeField.

forms.Form.changed_data

Form.changed_data The changed_data attribute returns a list of the names of the fields whose values in the form’s bound data (usually request.POST) differ from what was provided in initial. It returns an empty list if no data differs. >>> f = ContactForm(request.POST, initial=data) >>> if f.has_changed(): ... print("The following fields changed: %s" % ", ".join(f.changed_data))

gis.gdal.OGRGeometry.overlaps()

overlaps(other) Returns True if this geometry overlaps the other, otherwise returns False.

gis.geos.WKBWriter.write_hex()

write_hex(geom) Returns WKB of the geometry in hexadecimal. Example: >>> from django.contrib.gis.geos import Point, WKBWriter >>> pnt = Point(1, 1) >>> wkb_w = WKBWriter() >>> wkb_w.write_hex(pnt) '0101000000000000000000F03F000000000000F03F'

admin.AdminSite.disable_action()

AdminSite.disable_action(name) [source] If you need to disable a site-wide action you can call AdminSite.disable_action(). For example, you can use this method to remove the built-in “delete selected objects” action: admin.site.disable_action('delete_selected') Once you’ve done the above, that action will no longer be available site-wide. If, however, you need to re-enable a globally-disabled action for one particular model, simply list it explicitly in your ModelAdmin.actions list: # Globa

forms.MultipleChoiceField

class MultipleChoiceField(**kwargs) [source] Default widget: SelectMultiple Empty value: [] (an empty list) Normalizes to: A list of Unicode objects. Validates that every value in the given list of values exists in the list of choices. Error message keys: required, invalid_choice, invalid_list The invalid_choice error message may contain %(value)s, which will be replaced with the selected choice. Takes one extra required argument, choices, as for ChoiceField.

gis.gdal.Layer.get_fields()

get_fields() A method that returns a list of the values of a given field for each feature in the layer: >>> layer.get_fields('Name') ['Pueblo', 'Lawrence', 'Houston']

db.models.functions.datetime.ExtractMinute

class ExtractMinute(expression, tzinfo=None, **extra) [source] lookup_name = 'minute'