The new djblets.util.compat.django.shortcuts
module features a
version of render()
that works with older and newer versions of
Django. Any existing calls to render()
or render_to_response()
should be updated to use this.
The new djblets.util.compat.django.utils.functional
provides a
backport of SimpleLazyObject
, which supports more special functions
like __iter__
, __contains__
, and more. This is a drop-in replacement
for Django's SimpleLazyObject
.
The new djblets.util.compat.python.past
is intended to provide
re-implementations of old useful capabilities that have been removed
from Python 3.x. For now, it provides cmp
, which Python 3 has removed
in favor of a hard-to-remember comparison expression. For readability,
consistency, and easier development, our version can be used in place of
that expression.