test.TestCase

class TestCase [source] This is the most common class to use for writing tests in Django. It inherits from TransactionTestCase (and by extension SimpleTestCase). If your Django application doesn’t use a database, use SimpleTestCase. The class: Wraps the tests within two nested atomic() blocks: one for the whole class and one for each test. Therefore, if you want to test some specific database transaction behavior, use TransactionTestCase. Checks deferrable database constraints at the end of

auth.models.CustomUser

class models.CustomUser USERNAME_FIELD A string describing the name of the field on the User model that is used as the unique identifier. This will usually be a username of some kind, but it can also be an email address, or any other unique identifier. The field must be unique (i.e., have unique=True set in its definition), unless you use a custom authentication backend that can support non-unique usernames. In the following example, the field identifier is used as the identifying field:

gis.gdal.Layer.field_widths

field_widths Returns a list of the maximum field widths for each of the fields in this layer: >>> layer.field_widths [80, 11, 24, 10]

forms.Select.choices

choices This attribute is optional when the form field does not have a choices attribute. If it does, it will override anything you set here when the attribute is updated on the Field.

admin.ModelAdmin.get_list_display()

ModelAdmin.get_list_display(request) [source] The get_list_display method is given the HttpRequest and is expected to return a list or tuple of field names that will be displayed on the changelist view as described above in the ModelAdmin.list_display section.

http.HttpRequest.session

HttpRequest.session From the SessionMiddleware: A readable and writable, dictionary-like object that represents the current session.

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: