test.skipIfDBFeature()

skipIfDBFeature(*feature_name_strings) [source] Skip the decorated test or TestCase if all of the named database features are supported. For example, the following test will not be executed if the database supports transactions (e.g., it would not run under PostgreSQL, but it would under MySQL with MyISAM tables): class MyTests(TestCase): @skipIfDBFeature('supports_transactions') def test_transaction_behavior(self): # ... conditional test code pass

utils.feedgenerator.SyndicationFeed.add_item()

add_item(title, link, description, author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, enclosure=None, categories=(), item_copyright=None, ttl=None, updateddate=None, enclosures=None, **kwargs) [source] Adds an item to the feed. All args are expected to be Python unicode objects except pubdate and updateddate, which are datetime.datetime objects, enclosure, which is an Enclosure instance, and enclosures, which is a list of Enclosure instances.

forms.DateTimeInput

class DateTimeInput [source] Date/time input as a simple text box: <input type='text' ...> Takes same arguments as TextInput, with one more optional argument: format The format in which this field’s initial value will be displayed. If no format argument is provided, the default format is the first format found in DATETIME_INPUT_FORMATS and respects Format localization. By default, the microseconds part of the time value is always set to 0. If microseconds are required, use a subc

forms.MultiWidget.widgets

widgets An iterable containing the widgets needed. And one required method:

forms.BoundField.form

BoundField.form The Form instance this BoundField is bound to.

forms.Form.has_changed()

Form.has_changed() Use the has_changed() method on your Form when you need to check if the form data has been changed from the initial data. >>> data = {'subject': 'hello', ... 'message': 'Hi there', ... 'sender': 'foo@example.com', ... 'cc_myself': True} >>> f = ContactForm(data, initial=data) >>> f.has_changed() False When the form is submitted, we reconstruct it and provide the original data so that the comparison can be done: >>&g

forms.Form.clean()

Form.clean() Implement a clean() method on your Form when you must add custom validation for fields that are interdependent. See Cleaning and validating fields that depend on each other for example usage.

forms.BoundField.auto_id

BoundField.auto_id The HTML ID attribute for this BoundField. Returns an empty string if Form.auto_id is False.

forms.DecimalField.decimal_places

decimal_places The maximum number of decimal places permitted.

views.generic.dates.WeekMixin.get_week()

get_week() [source] Returns the week for which this view will display data, as a string. Tries the following sources, in order: The value of the WeekMixin.week attribute. The value of the week argument captured in the URL pattern The value of the week GET query argument. Raises a 404 if no valid week specification can be found.