Migrate from basictag to simple_tag
Review Request #7910 — Created Jan. 25, 2016 and submitted — Latest diff uploaded
Now that
@basictag
is becoming deprecated in Djblets 0.10, we are
migrating all usage of@basictag
to Django's@Library.simple_tag
decorator. To ensure that everything works correcty, unit tests have
been added to test all tags that previously used@basictag
to
ensure that they will continue to render correctly.Several testing utilities have been added in this patch to facilitate
this migration. First off is theMemoryTemplateLoader
, which loads
template sources from an in-memory string. This is to be used in
conjunction with the context managers provided by
djblets.template.loaders.util
:
add_template_loader
, which temporarily adds a template source
loader; andreplace_template_loaders
, which temporarily replaces all the
template source loaders.
Ran unit tests.
Diff Revision 2
This is not the most recent revision of the diff. The latest diff is revision 5. See what's changed.
djblets/extensions/templatetags/djblets_extensions.py |
---|
djblets/extensions/templatetags/tests.py |
---|
djblets/gravatars/templatetags/gravatars.py |
---|
djblets/gravatars/templatetags/tests.py |
---|
djblets/template/loaders/memory.py |
---|
djblets/template/loaders/util.py |
---|
djblets/util/templatetags/djblets_email.py |
---|
djblets/util/templatetags/djblets_utils.py |
---|
djblets/util/templatetags/tests.py |
---|