diff --git a/articles/forms.py b/articles/forms.py
index 9d8877b..9b58638 100644
--- a/articles/forms.py
+++ b/articles/forms.py
@@ -10,3 +10,24 @@ class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ["username", "email", "content"]
+
+ def as_table(self):
+ "Return this form rendered as HTML
s -- excluding the ."
+ return self._html_output(
+ normal_row="
%(label)s | %(errors)s%(field)s%(help_text)s |
",
+ error_row=(
+ '%s |
'
+ ' |
'
+ ),
+ row_ender="",
+ help_text_html='
%s',
+ errors_on_separate_row=False,
+ )
+
+ def __init__(self, *args, **kwargs):
+ defaults = {
+ "label_suffix": "",
+ }
+ defaults.update(kwargs)
+
+ super().__init__(*args, **defaults)