core.paginator.Page.object_list

Page.object_list The list of objects on this page.

Outputting PDFs with Django

This document explains how to output PDF files dynamically using Django views. This is made possible by the excellent, open-source ReportLab Python PDF library. The advantage of generating PDF files dynamically is that you can create customized PDFs for different purposes – say, for different users or different pieces of content. For example, Django was used at kusports.com to generate customized, printer-friendly NCAA tournament brackets, as PDF files, for people participating in a March Madne

GeoDjango Installation

Overview In general, GeoDjango installation requires: Python and Django Spatial database Installing Geospatial libraries Details for each of the requirements and installation instructions are provided in the sections below. In addition, platform-specific instructions are available for: Mac OS X Windows Use the Source Because GeoDjango takes advantage of the latest in the open source geospatial software technology, recent versions of the libraries are necessary. If binary packages aren’t av

http.HttpResponse.delete_cookie()

HttpResponse.delete_cookie(key, path='/', domain=None) Deletes the cookie with the given key. Fails silently if the key doesn’t exist. Due to the way cookies work, path and domain should be the same values you used in set_cookie() – otherwise the cookie may not be deleted.

auth.models.User.has_perms()

has_perms(perm_list, obj=None) Returns True if the user has each of the specified permissions, where each perm is in the format "<app label>.<permission codename>". If the user is inactive, this method will always return False. If obj is passed in, this method won’t check for permissions for the model, but for the specific object.

postgres.forms.SplitArrayField.base_field

base_field This is a required argument. It specifies the form field to be repeated.

gis.gdal.SpatialReference.inverse_flattening

inverse_flattening Returns the inverse flattening of the ellipsoid for this spatial reference.

forms.Field.label

Field.label The label argument lets you specify the “human-friendly” label for this field. This is used when the Field is displayed in a Form. As explained in “Outputting forms as HTML” above, the default label for a Field is generated from the field name by converting all underscores to spaces and upper-casing the first letter. Specify label if that default behavior doesn’t result in an adequate label. Here’s a full example Form that implements label for two of its fields. We’ve specified a

gis.forms.MultiLineStringField

class MultiLineStringField

db.models.NullBooleanField

class NullBooleanField(**options) [source] Like a BooleanField, but allows NULL as one of the options. Use this instead of a BooleanField with null=True. The default form widget for this field is a NullBooleanSelect.