aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-15 14:56:50 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-15 14:56:50 +0100
commitf27987070e40fcf4b017f91c23c4747373e85c9d (patch)
tree7dac1a67b2709f73add6d8ac7c15ec04c30a2b3a /pydis_site/apps
parentSmall styling fixes (diff)
Images sidebar work, and allow fields to be rendered without labels
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/home/templatetags/wiki_extra.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/home/templatetags/wiki_extra.py b/pydis_site/apps/home/templatetags/wiki_extra.py
index ae168ae3..d4e9b266 100644
--- a/pydis_site/apps/home/templatetags/wiki_extra.py
+++ b/pydis_site/apps/home/templatetags/wiki_extra.py
@@ -62,7 +62,7 @@ def get_unbound_field(field: BoundField):
@register.simple_tag
-def render_field(field: Field):
+def render_field(field: Field, render_labels: bool = True):
if isinstance(field, BoundField):
unbound_field = get_unbound_field(field)
else:
@@ -75,7 +75,7 @@ def render_field(field: Field):
raise NotImplementedError(f"Unknown field type: {unbound_field.__class__}")
template_obj: Template = get_template(template_path)
- context = {"field": field, "is_markitup": is_markitup}
+ context = {"field": field, "is_markitup": is_markitup, "render_labels": render_labels}
return mark_safe(template_obj.render(context))