HttpResponse.tell() [source] This method makes an HttpResponse instance a file-like object.
class Layer Layer is a wrapper for a layer of data in a DataSource object. You never create a Layer object directly. Instead, you retrieve them from a DataSource object, which is essentially a standard Python container of Layer objects. For example, you can access a specific layer by its index (e.g. ds[0] to access the first layer), or you can iterate over all the layers in the container in a for loop. The Layer itself acts as a container for geometric features. Typically, all the features i
DiscoverRunner.run_tests(test_labels, extra_tests=None, **kwargs) Run the test suite. test_labels allows you to specify which tests to run and supports several formats (see DiscoverRunner.build_suite() for a list of supported formats). extra_tests is a list of extra TestCase instances to add to the suite that is executed by the test runner. These extra tests are run in addition to those discovered in the modules listed in test_labels. This method should return the number of tests that failed
models.BaseModelFormSet.deleted_objects
HttpRequest.COOKIES A standard Python dictionary containing all cookies. Keys and values are strings.
save(session_key, session_dict, expire_date) Saves session data for a provided session key, or deletes the session in case the data is empty.
class FlatpageFallbackMiddleware Each time any Django application raises a 404 error, this middleware checks the flatpages database for the requested URL as a last resort. Specifically, it checks for a flatpage with the given URL with a site ID that corresponds to the SITE_ID setting. If it finds a match, it follows this algorithm: If the flatpage has a custom template, it loads that template. Otherwise, it loads the template flatpages/default.html. It passes that template a single context v
mail_managers(subject, message, fail_silently=False, connection=None, html_message=None) [source] django.core.mail.mail_managers() is just like mail_admins(), except it sends an email to the site managers, as defined in the MANAGERS setting.
centroid Returns a Point representing the centroid of this polygon.
SimpleTestCase.modify_settings() [source] It can prove unwieldy to redefine settings that contain a list of values. In practice, adding or removing values is often sufficient. The modify_settings() context manager makes it easy: from django.test import TestCase class MiddlewareTestCase(TestCase): def test_cache_middleware(self): with self.modify_settings(MIDDLEWARE={ 'append': 'django.middleware.cache.FetchFromCacheMiddleware', 'prepend': 'django.middlew
Page 131 of 226