diff --git a/webapp/forms.py b/webapp/forms.py index 7c29bf2..35757f1 100644 --- a/webapp/forms.py +++ b/webapp/forms.py @@ -4,7 +4,8 @@ from django import forms from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError -from webapp.models import OhlhafvChallenge, KaehmyForm +from webapp.models import OhlhafvChallenge, KaehmyForm, KaehmyMessage + class KaehmyForm_Form(forms.ModelForm): @@ -27,6 +28,13 @@ class KaehmyForm_Form(forms.ModelForm): raise ValidationError(_('Invalid value')) +class KaehmyCommentForm(forms.ModelForm): + + class Meta: + model = KaehmyMessage + fields = ['name', 'email', 'message', 'parent'] + + class OhlhafvForm(forms.ModelForm): """Class representing Ohlhafv form.""" diff --git a/webapp/templates/error.html b/webapp/templates/error.html new file mode 100644 index 0000000..ccb932f --- /dev/null +++ b/webapp/templates/error.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block navigation %} +{% endblock navigation %} + +{% block content %} +
{{ application.text }}
- - {% trans "Show comments" %} ({{ application.comment_count }}) - -{{ message.message }}