Backports of functionality from Django 1.11’s django.utils.functional.
Note that this module is not considered API-stable. Changes may be made that remove or alter functionality in the future. Please use at your own risk.
- class LazyObject[source]¶
A wrapper for another class that can be used to delay instantiation of the wrapped class.
By subclassing, you have the opportunity to intercept and alter the instantiation. If you don’t need to do that, use SimpleLazyObject.
- class SimpleLazyObject(func)[source]¶
A lazy object initialized from any function.
Designed for compound objects of unknown type. For builtins or objects of known type, use django.utils.functional.lazy.