Feat: Add default PDF layout option as fallback to ENV

This commit is contained in:
Silvia Bigler
2025-01-26 11:47:14 +01:00
committed by shamoon
parent 96d1a43da7
commit 6b398a6c62
7 changed files with 118 additions and 80 deletions

View File

@@ -15,12 +15,13 @@ class Migration(migrations.Migration):
name="pdf_layout",
field=models.PositiveIntegerField(
choices=[
(0, "System default"),
(1, "Text, then HTML"),
(2, "HTML, then text"),
(3, "HTML only"),
(4, "Text only"),
],
default=1,
default=0,
verbose_name="pdf layout",
),
),

View File

@@ -116,6 +116,7 @@ class MailRule(document_models.ModelWithOwner):
EVERYTHING = 2, _("Process all files, including 'inline' attachments.")
class PdfLayout(models.IntegerChoices):
DEFAULT = 0, _("System default")
TEXT_HTML = 1, _("Text, then HTML")
HTML_TEXT = 2, _("HTML, then text")
HTML_ONLY = 3, _("HTML only")