X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/eaf0711613bea8181528d8911b30ef7976b7bb42..c2e8051452fa55db096553cbe5ae622fc363d481:/src/contact/forms.py diff --git a/src/contact/forms.py b/src/contact/forms.py index ff1687adb..ee44e4b19 100644 --- a/src/contact/forms.py +++ b/src/contact/forms.py @@ -1,3 +1,4 @@ +import json from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.files.uploadedfile import UploadedFile @@ -56,7 +57,7 @@ class ContactForm(forms.Form): body.setdefault(f.form_tag, []).append(sub_body) contact = Contact.objects.create( - body=body, + body=json.dumps(body), ip=request.META['REMOTE_ADDR'], contact=self.cleaned_data['contact'], form_tag=self.form_tag)