Hello there,
Do we have a reason to have the both _render()
and render()
methods? In django.template, _render()
is not used anywhere else.
Code reference:
~/django$ grep -r "\._render(" . -A 2 -B 2
./django/forms/widgets.py- """Render the widget as an HTML string."""
./django/forms/widgets.py- context = self.get_context(name, value, attrs)
./django/forms/widgets.py: return self._render(self.template_name, context, renderer)
./django/forms/widgets.py-
./django/forms/widgets.py- def _render(self, template_name, context, renderer=None):
--
./django/forms/boundfield.py- def tag(self, wrap_label=False):
./django/forms/boundfield.py- context = {'widget': self.data, 'wrap_label': wrap_label}
./django/forms/boundfield.py: return self.parent_widget._render(self.template_name, context, self.renderer)
./django/forms/boundfield.py-
./django/forms/boundfield.py- @property
--
./django/template/loader_tags.py- # Call Template._render explicitly so the parser context stays
./django/template/loader_tags.py- # the same.
./django/template/loader_tags.py: return compiled_parent._render(context)
./django/template/loader_tags.py-
./django/template/loader_tags.py-
--
./django/template/base.py- with context.bind_template(self):
./django/template/base.py- context.template_name = self.name
./django/template/base.py: return self._render(context)
./django/template/base.py- else:
./django/template/base.py: return self._render(context)
./django/template/base.py-
./django/template/base.py- def compile_nodelist(self):