class documentation

class SimpleLazyObject(LazyObject):

Known subclasses: django.utils.text.Truncator

View In Hierarchy

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.

Method __copy__ Undocumented
Method __deepcopy__ Undocumented
Method __init__ Pass in a callable that returns the object to be wrapped.
Method __repr__ Undocumented
Method ​_setup Must be implemented by subclasses to initialize the wrapped object.
Instance Variable ​_wrapped Undocumented

Inherited from LazyObject:

Method __delattr__ Undocumented
Method __reduce__ Undocumented
Method __setattr__ Undocumented
Class Variable __bool__ Undocumented
Class Variable __bytes__ Undocumented
Class Variable __class__ Undocumented
Class Variable __contains__ Undocumented
Class Variable __delitem__ Undocumented
Class Variable __dir__ Undocumented
Class Variable __eq__ Undocumented
Class Variable __getattr__ Undocumented
Class Variable __getitem__ Undocumented
Class Variable __gt__ Undocumented
Class Variable __hash__ Undocumented
Class Variable __iter__ Undocumented
Class Variable __len__ Undocumented
Class Variable __lt__ Undocumented
Class Variable __ne__ Undocumented
Class Variable __setitem__ Undocumented
Class Variable __str__ Undocumented
def __copy__(self):
def __deepcopy__(self, memo):
def __init__(self, func):

Pass in a callable that returns the object to be wrapped.

If copies are made of the resulting SimpleLazyObject, which can happen in various circumstances within Django, then you must ensure that the callable can be safely run more than once and will return the same value.

def __repr__(self):

Undocumented

def _setup(self):
Must be implemented by subclasses to initialize the wrapped object.
_wrapped =