test.Response.content

content The body of the response, as a bytestring. This is the final page content as rendered by the view, or any error message.

postgres.aggregates.Corr

class Corr(y, x) [source] Returns the correlation coefficient as a float, or None if there aren’t any matching rows.

forms.BoundField.value()

BoundField.value() [source] Use this method to render the raw value of this field as it would be rendered by a Widget: >>> initial = {'subject': 'welcome'} >>> unbound_form = ContactForm(initial=initial) >>> bound_form = ContactForm(data={'subject': 'hi'}, initial=initial) >>> print(unbound_form['subject'].value()) welcome >>> print(bound_form['subject'].value()) hi

test.RequestFactory

class RequestFactory [source] The RequestFactory shares the same API as the test client. However, instead of behaving like a browser, the RequestFactory provides a way to generate a request instance that can be used as the first argument to any view. This means you can test a view function the same way as you would test any other function – as a black box, with exactly known inputs, testing for specific outputs. The API for the RequestFactory is a slightly restricted subset of the test clien

test.runner.DiscoverRunner.test_runner

DiscoverRunner.test_runner This is the class of the low-level test runner which is used to execute the individual tests and format the results. By default it is set to unittest.TextTestRunner. Despite the unfortunate similarity in naming conventions, this is not the same type of class as DiscoverRunner, which covers a broader set of responsibilities. You can override this attribute to modify the way tests are run and reported.

forms.DurationField

class DurationField(**kwargs) [source] Default widget: TextInput Empty value: None Normalizes to: A Python timedelta. Validates that the given value is a string which can be converted into a timedelta. Error message keys: required, invalid. Accepts any format understood by parse_duration().

utils.translation.deactivate_all()

deactivate_all() [source] Makes the active translation object a NullTranslations() instance. This is useful when we want delayed translations to appear as the original string for some reason.

core.files.File.name

name The name of the file including the relative path from MEDIA_ROOT.

http.HttpResponseGone

class HttpResponseGone [source] Acts just like HttpResponse but uses a 410 status code.

db.models.Model.get_absolute_url()

Model.get_absolute_url() Define a get_absolute_url() method to tell Django how to calculate the canonical URL for an object. To callers, this method should appear to return a string that can be used to refer to the object over HTTP. For example: def get_absolute_url(self): return "/people/%i/" % self.id While this code is correct and simple, it may not be the most portable way to to write this kind of method. The reverse() function is usually the best approach. For example: def get_abso