From 9bb7b7bdfaf4130e1fa8e5f9baf93e9f977f7807 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 29 Jul 2020 23:58:25 +0200 Subject: upload signed documents --- client/migrations/0026_document_signed_doc.py | 18 ++++++++++++++++++ client/models.py | 2 ++ client/templates/client/index.html | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 client/migrations/0026_document_signed_doc.py (limited to 'client') diff --git a/client/migrations/0026_document_signed_doc.py b/client/migrations/0026_document_signed_doc.py new file mode 100644 index 0000000..f3b6747 --- /dev/null +++ b/client/migrations/0026_document_signed_doc.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2020-07-29 19:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('client', '0025_documenttype_custom_group'), + ] + + operations = [ + migrations.AddField( + model_name='document', + name='signed_doc', + field=models.FileField(default=None, null=True, upload_to='documents/'), + ), + ] diff --git a/client/models.py b/client/models.py index 4d8ae83..7c47cee 100644 --- a/client/models.py +++ b/client/models.py @@ -71,6 +71,8 @@ class Document(models.Model): medical_data = models.ForeignKey( MedicalData, default=None, on_delete=models.PROTECT, null=True) + signed_doc = models.FileField(default=None, upload_to='documents/', null=True) + class Meta: permissions = [ ("approved", "The user is approved") diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 45a7e90..fd8316b 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -310,7 +310,7 @@
- + {% if doc.5 %} {% endif %}
@@ -319,7 +319,7 @@
- + {% if doc.6 %}{% endif %}
-- cgit v1.2.1