forms.Widget

class Widget(attrs=None) [source] This abstract class cannot be rendered, but provides the basic attribute attrs. You may also implement or override the render() method on custom widgets. attrs A dictionary containing HTML attributes to be set on the rendered widget. >>> from django import forms >>> name = forms.TextInput(attrs={'size': 10, 'title': 'Your name',}) >>> name.render('name', 'A name') '<input title="Your name" type="text" name="name" value="A nam

db.models.FileField.upload_to

FileField.upload_to This attribute provides a way of setting the upload directory and file name, and can be set in two ways. In both cases, the value is passed to the Storage.save() method. If you specify a string value, it may contain strftime() formatting, which will be replaced by the date/time of the file upload (so that uploaded files don’t fill up the given directory). For example: class MyModel(models.Model): # file will be uploaded to MEDIA_ROOT/uploads upload = models.FileFi

core.paginator.Paginator.page()

Paginator.page(number) [source] Returns a Page object with the given 1-based index. Raises InvalidPage if the given page number doesn’t exist.

core.files.uploadedfile.UploadedFile.content_type

UploadedFile.content_type The content-type header uploaded with the file (e.g. text/plain or application/pdf). Like any data supplied by the user, you shouldn’t trust that the uploaded file is actually this type. You’ll still need to validate that the file contains the content that the content-type header claims – “trust but verify.”

postgres.fields.RangeField.base_field

base_field The model field class to use.

postgres.search.SearchQuery

class SearchQuery(value, config=None) [source] SearchQuery translates the terms the user provides into a search query object that the database compares to a search vector. By default, all the words the user provides are passed through the stemming algorithms, and then it looks for matches for all of the resulting terms. SearchQuery terms can be combined logically to provide more flexibility: >>> from django.contrib.postgres.search import SearchQuery >>> SearchQuery('potato'

forms.MultiValueField.fields

fields A tuple of fields whose values are cleaned and subsequently combined into a single value. Each value of the field is cleaned by the corresponding field in fields – the first value is cleaned by the first field, the second value is cleaned by the second field, etc. Once all fields are cleaned, the list of clean values is combined into a single value by compress(). Also takes one extra optional argument:

gis.gdal.Envelope.max_y

max_y The value of the maximum Y coordinate.

forms.MultiValueField.widget

widget Must be a subclass of django.forms.MultiWidget. Default value is TextInput, which probably is not very useful in this case.

auth.models.User.get_short_name()

get_short_name() Returns the first_name.