From 3f47d520c170799e14b3edda773a0d703adf4982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Wed, 10 Nov 2021 17:28:51 +0100 Subject: [PATCH] Debug `MailLogRelation` --- .../0007_alter_maillogrelation_value.py | 18 ++++++++++++++++++ scipost_django/mails/models.py | 2 +- .../templates/email/prescreening_failed.html | 6 +++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 scipost_django/mails/migrations/0007_alter_maillogrelation_value.py diff --git a/scipost_django/mails/migrations/0007_alter_maillogrelation_value.py b/scipost_django/mails/migrations/0007_alter_maillogrelation_value.py new file mode 100644 index 000000000..de9e3e0ff --- /dev/null +++ b/scipost_django/mails/migrations/0007_alter_maillogrelation_value.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.5 on 2021-11-10 16:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mails', '0006_auto_20190220_1633'), + ] + + operations = [ + migrations.AlterField( + model_name='maillogrelation', + name='value', + field=models.TextField(blank=True), + ), + ] diff --git a/scipost_django/mails/models.py b/scipost_django/mails/models.py index 1e953bc6b..079e3a29f 100644 --- a/scipost_django/mails/models.py +++ b/scipost_django/mails/models.py @@ -73,7 +73,7 @@ class MailLogRelation(models.Model): mail = models.ForeignKey('mails.MailLog', on_delete=models.CASCADE, related_name='context') name = models.CharField(max_length=254) - value = models.CharField(max_length=254, blank=True) + value = models.TextField(blank=True) content_type = models.ForeignKey(ContentType, blank=True, null=True, on_delete=models.CASCADE) object_id = models.PositiveIntegerField(blank=True, null=True) diff --git a/scipost_django/templates/email/prescreening_failed.html b/scipost_django/templates/email/prescreening_failed.html index e1737753d..c6974a49c 100644 --- a/scipost_django/templates/email/prescreening_failed.html +++ b/scipost_django/templates/email/prescreening_failed.html @@ -4,12 +4,16 @@ <p>by {{ object.author_list }}</p> <p>has unfortunately not passed the pre-screening stage.</p> {% if message_for_authors %} - {{ message_for_authors|linebreaks }} + <p>You will find more details in the "message for authors" below.</p> {% endif %} <p>In view of this, we are unable to proceed further with the handling of your manuscript. We hope you can easily find an alternative publishing venue.</p> <p>Despite this unsuccessful outcome, we thank you very much for your contribution, and hope to be able to be of service to you in the future.</p> <p>Sincerely,</p> <p>The SciPost Team.</p> +{% if message_for_authors %} + <h4>Message for authors</h4> + {{ message_for_authors|linebreaks }} +{% endif %} {% include 'email/_footer.html' %} -- GitLab