Migrate from basictag to simple_tag
Review Request #7910 — Created Jan. 25, 2016 and submitted
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.
- Change Summary:
-
PEP8
- Diff:
-
Revision 2 (+404 -28)
-
Tool: PEP8 Style Checker Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py Tool: Pyflakes Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py
-
- Change Summary:
-
PEP8
- Diff:
-
Revision 3 (+403 -28)
-
Tool: PEP8 Style Checker Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py Tool: Pyflakes Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py
- Change Summary:
-
Don't use
Mock
. Address David's issues. - Diff:
-
Revision 4 (+400 -28)
-
Tool: Pyflakes Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py Tool: PEP8 Style Checker Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py
-
- Change Summary:
-
PEP8
- Diff:
-
Revision 5 (+401 -28)
-
Tool: PEP8 Style Checker Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py Tool: Pyflakes Processed Files: djblets/util/templatetags/tests.py djblets/extensions/templatetags/djblets_extensions.py djblets/template/loaders/util.py djblets/gravatars/templatetags/tests.py djblets/extensions/templatetags/tests.py djblets/util/templatetags/djblets_utils.py djblets/template/loaders/memory.py djblets/util/templatetags/djblets_email.py djblets/gravatars/templatetags/gravatars.py