forms.Widget.value_omitted_from_data()

value_omitted_from_data(data, files, name) [source] New in Django 1.10.2. Given data and files dictionaries and this widget’s name, returns whether or not there’s data or files for the widget. The method’s result affects whether or not a field in a model form falls back to its default. Special cases are CheckboxInput and CheckboxSelectMultiple, which always return False because an unchecked checkbox doesn’t appear in the data of an HTML form submission, so it’s unknown whether or not the u

db.models.fields.files.FieldFile.size

FieldFile.size The result of the underlying Storage.size() method.

utils.encoding.smart_text()

smart_text(s, encoding='utf-8', strings_only=False, errors='strict') [source] Returns a text object representing s – unicode on Python 2 and str on Python 3. Treats bytestrings using the encoding codec. If strings_only is True, don’t convert (some) non-string-like objects.

views.generic.base.RedirectView.query_string

query_string Whether to pass along the GET query string to the new location. If True, then the query string is appended to the URL. If False, then the query string is discarded. By default, query_string is False. Methods

db.backends.base.schema.BaseDatabaseSchemaEditor.delete_model()

BaseDatabaseSchemaEditor.delete_model(model) [source] Drops the model’s table in the database along with any unique constraints or indexes it has.

views.generic.dates.YearMixin.get_next_year()

get_next_year(date) [source] Returns a date object containing the first day of the year after the date provided. This function can also return None or raise an Http404 exception, depending on the values of allow_empty and allow_future.

forms.Field.disabled

Field.disabled New in Django 1.9. The disabled boolean argument, when set to True, disables a form field using the disabled HTML attribute so that it won’t be editable by users. Even if a user tampers with the field’s value submitted to the server, it will be ignored in favor of the value from the form’s initial data.

forms.GenericIPAddressField.unpack_ipv4

unpack_ipv4 Unpacks IPv4 mapped addresses like ::ffff:192.0.2.1. If this option is enabled that address would be unpacked to 192.0.2.1. Default is disabled. Can only be used when protocol is set to 'both'.

forms.SelectDateWidget.months

months An optional dict of months to use in the “months” select box. The keys of the dict correspond to the month number (1-indexed) and the values are the displayed months: MONTHS = { 1:_('jan'), 2:_('feb'), 3:_('mar'), 4:_('apr'), 5:_('may'), 6:_('jun'), 7:_('jul'), 8:_('aug'), 9:_('sep'), 10:_('oct'), 11:_('nov'), 12:_('dec') }

forms.BoundField.name

BoundField.name The name of this field in the form: >>> f = ContactForm() >>> print(f['subject'].name) subject >>> print(f['message'].name) message