From d20c71fd3bea17ab88f45985196e266668620615 Mon Sep 17 00:00:00 2001
From: Andrea Lepori
Date: Tue, 11 Jan 2022 15:01:43 +0100
Subject: increase max char count for additional fields
---
client/models.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'client')
diff --git a/client/models.py b/client/models.py
index cd3cf88..e01fe1f 100644
--- a/client/models.py
+++ b/client/models.py
@@ -15,7 +15,7 @@ class DocumentType(models.Model):
medical_data = models.BooleanField(default=False)
custom_data = models.BooleanField(default=False)
custom_message = models.BooleanField(default=False)
- custom_message_text = models.CharField(default="", max_length=250)
+ custom_message_text = models.CharField(default="", max_length=2048)
staff_only = models.BooleanField(default=False)
max_instances = models.IntegerField(default=0)
name = models.CharField(default="", max_length=250)
@@ -88,15 +88,15 @@ class Document(models.Model):
class KeyVal(models.Model):
container = models.ForeignKey(
Document, db_index=True, on_delete=models.CASCADE)
- key = models.CharField(max_length=240, db_index=True)
- value = models.CharField(max_length=240, db_index=True)
+ key = models.CharField(max_length=2048, db_index=True)
+ value = models.CharField(max_length=2048, db_index=True)
class Keys(models.Model):
container = models.ForeignKey(
DocumentType, db_index=True, on_delete=models.CASCADE)
- key = models.CharField(max_length=240, db_index=True)
- key_extra = models.CharField(max_length=1024, default="")
+ key = models.CharField(max_length=2048, db_index=True)
+ key_extra = models.CharField(max_length=2048, default="")
class UserCode(models.Model):
--
cgit v1.2.1
From 76ce07ad01474f8da04a877a6e6f0895a5829c89 Mon Sep 17 00:00:00 2001
From: Andrea Lepori
Date: Tue, 11 Jan 2022 15:03:32 +0100
Subject: create db migrations
---
client/migrations/0014_auto_20220111_1503.py | 38 ++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 client/migrations/0014_auto_20220111_1503.py
(limited to 'client')
diff --git a/client/migrations/0014_auto_20220111_1503.py b/client/migrations/0014_auto_20220111_1503.py
new file mode 100644
index 0000000..99c7c18
--- /dev/null
+++ b/client/migrations/0014_auto_20220111_1503.py
@@ -0,0 +1,38 @@
+# Generated by Django 3.1.4 on 2022-01-11 14:03
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('client', '0013_keys_key_extra'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='documenttype',
+ name='custom_message_text',
+ field=models.CharField(default='', max_length=2048),
+ ),
+ migrations.AlterField(
+ model_name='keys',
+ name='key',
+ field=models.CharField(db_index=True, max_length=2048),
+ ),
+ migrations.AlterField(
+ model_name='keys',
+ name='key_extra',
+ field=models.CharField(default='', max_length=2048),
+ ),
+ migrations.AlterField(
+ model_name='keyval',
+ name='key',
+ field=models.CharField(db_index=True, max_length=2048),
+ ),
+ migrations.AlterField(
+ model_name='keyval',
+ name='value',
+ field=models.CharField(db_index=True, max_length=2048),
+ ),
+ ]
--
cgit v1.2.1
From 77dfb2dd619863cf2a18893aa5f3de03b7eaa006 Mon Sep 17 00:00:00 2001
From: Andrea Lepori
Date: Tue, 11 Jan 2022 15:21:12 +0100
Subject: correct linebreaks written in python
---
client/templates/client/approve_doc_pdf.html | 2 +-
client/templates/client/doc_create.html | 6 +++---
client/templates/client/doc_edit.html | 2 +-
client/templates/client/index.html | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
(limited to 'client')
diff --git a/client/templates/client/approve_doc_pdf.html b/client/templates/client/approve_doc_pdf.html
index 3ed4d86..ae993f0 100644
--- a/client/templates/client/approve_doc_pdf.html
+++ b/client/templates/client/approve_doc_pdf.html
@@ -29,7 +29,7 @@
Inoltre accetto e prendo nota della seguente clausula aggiuntiva:
- {{doc.document_type.custom_message_text}}
+ {{doc.document_type.custom_message_text | linebreaksbr}}
{% endif %}
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index ce5f39d..c1db432 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -98,9 +98,9 @@
-
-
- {{custom_message_text}}
+
+
+ {{custom_message_text | linebreaksbr}}
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index a9cc056..3af3584 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -56,7 +56,7 @@
- {{custom_message_text}}
+ {{custom_message_text | linebreaksbr}}
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index e31ce34..1885dd1 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -76,7 +76,7 @@
Inoltre accetto e prendo nota della seguente clausula aggiuntiva:
- {{doc.document_type.custom_message_text}}
+ {{doc.document_type.custom_message_text | linebreaksbr}}
{% endif %}
--
cgit v1.2.1
From 1f17a13b6f8069d04fc4d172e5a891fc3e7a7c7d Mon Sep 17 00:00:00 2001
From: Andrea Lepori
Date: Tue, 11 Jan 2022 15:52:19 +0100
Subject: remove linebrakes on approve doc pdf
---
client/templates/client/approve_doc_pdf.html | 3 ---
1 file changed, 3 deletions(-)
(limited to 'client')
diff --git a/client/templates/client/approve_doc_pdf.html b/client/templates/client/approve_doc_pdf.html
index ae993f0..db1478e 100644
--- a/client/templates/client/approve_doc_pdf.html
+++ b/client/templates/client/approve_doc_pdf.html
@@ -35,9 +35,6 @@
-
-
-