1
from django import forms
2
from threadedcomments.models import DEFAULT_MAX_COMMENT_LENGTH
3
from threadedcomments.models import ThreadedComment
4
from django.utils.translation import ugettext_lazy as _
7
class ThreadedCommentForm(forms.ModelForm):
9
Form which can be used to validate data for a new ThreadedComment.
10
It consists of just two fields: ``comment``, and ``markup``.
12
The ``comment`` field is the only one which is required.
15
comment = forms.CharField(
17
max_length=DEFAULT_MAX_COMMENT_LENGTH,
22
model = ThreadedComment
23
fields = ('comment', 'markup')