forms.Field.widget

Field.widget The widget argument lets you specify a Widget class to use when rendering this Field. See Widgets for more information.

core.files.base.ContentFile

class ContentFile(File) [source] The ContentFile class inherits from File, but unlike File it operates on string content (bytes also supported), rather than an actual file. For example: from __future__ import unicode_literals from django.core.files.base import ContentFile f1 = ContentFile("esta sentencia está en español") f2 = ContentFile(b"these are bytes")

template.response.SimpleTemplateResponse.add_post_render_callback()

SimpleTemplateResponse.add_post_render_callback() [source] Add a callback that will be invoked after rendering has taken place. This hook can be used to defer certain processing operations (such as caching) until after rendering has occurred. If the SimpleTemplateResponse has already been rendered, the callback will be invoked immediately. When called, callbacks will be passed a single argument – the rendered SimpleTemplateResponse instance. If the callback returns a value that is not None,

views.generic.edit.FormMixin

class django.views.generic.edit.FormMixin A mixin class that provides facilities for creating and displaying forms. Mixins django.views.generic.base.ContextMixin Methods and Attributes initial A dictionary containing initial data for the form. form_class The form class to instantiate. success_url The URL to redirect to when the form is successfully processed. prefix The prefix for the generated form. get_initial() Retrieve initial data for the form. By default, r

views.generic.dates.BaseDateListView.get_dated_items()

get_dated_items() [source] Returns a 3-tuple containing (date_list, object_list, extra_context). date_list is the list of dates for which data is available. object_list is the list of objects. extra_context is a dictionary of context data that will be added to any context data provided by the MultipleObjectMixin.

views.generic.dates.MonthArchiveView

class MonthArchiveView [source] A monthly archive page showing all objects in a given month. Objects with a date in the future are not displayed unless you set allow_future to True. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseMonthArchiveView django.views.generic.dates.YearMixin django.views.generic.dates.MonthMixin django.views.generic.dates.BaseDateListView django.views.generic.

template.loaders.base.Loader.get_template()

get_template(template_name, skip=None) [source] Returns a Template object for a given template_name by looping through results from get_template_sources() and calling get_contents(). This returns the first matching template. If no template is found, TemplateDoesNotExist is raised. The optional skip argument is a list of origins to ignore when extending templates. This allow templates to extend other templates of the same name. It also used to avoid recursion errors. In general, it is enough

admin.ModelAdmin.get_form()

ModelAdmin.get_form(request, obj=None, **kwargs) [source] Returns a ModelForm class for use in the admin add and change views, see add_view() and change_view(). The base implementation uses modelform_factory() to subclass form, modified by attributes such as fields and exclude. So, for example, if you wanted to offer additional fields to superusers, you could swap in a different base form like so: class MyModelAdmin(admin.ModelAdmin): def get_form(self, request, obj=None, **kwargs):

gis.gdal.Layer.get_geoms()

get_geoms(geos=False) A method that returns a list containing the geometry of each feature in the layer. If the optional argument geos is set to True then the geometries are converted to GEOSGeometry objects. Otherwise, they are returned as OGRGeometry objects: >>> [pt.tuple for pt in layer.get_geoms()] [(-104.609252, 38.255001), (-95.23506, 38.971823), (-95.363151, 29.763374)]

gis.gdal.GDALRaster.warp()

warp(ds_input, resampling='NearestNeighbour', max_error=0.0) New in Django 1.9. Returns a warped version of this raster. The warping parameters can be specified through the ds_input argument. The use of ds_input is analogous to the corresponding argument of the class constructor. It is a dictionary with the characteristics of the target raster. Allowed dictionary key values are width, height, SRID, origin, scale, skew, datatype, driver, and name (filename). By default, the warp functions k