diff --git a/backend/accounts/tasks.py b/backend/accounts/tasks.py
index 56cf39a..0b22d94 100644
--- a/backend/accounts/tasks.py
+++ b/backend/accounts/tasks.py
@@ -2,6 +2,7 @@ from celery import shared_task
from backend.core.models import Organization, Document, Risk, Control, DocumentRiskControl
from backend.core.utils import get_top_risk, get_controls_for_risk
from django.shortcuts import get_object_or_404, render
+from .utils import send_payment_email
@shared_task
@@ -49,4 +50,7 @@ def create_document_for_organization(confirmation_email):
controls_content += "\n"
- document.add_segment('body', controls_content)
\ No newline at end of file
+ document.add_segment('body', controls_content)
+
+
+ send_payment_email(confirmation_email)
\ No newline at end of file
diff --git a/backend/core/management/commands/import_template.py b/backend/core/management/commands/import_template.py
index d055293..20074f8 100644
--- a/backend/core/management/commands/import_template.py
+++ b/backend/core/management/commands/import_template.py
@@ -1,5 +1,6 @@
import yaml
from django.core.management.base import BaseCommand
+from django.template import Template, Context
from backend.core.models import DocumentTemplate
class Command(BaseCommand):
@@ -13,7 +14,6 @@ class Command(BaseCommand):
with open(yaml_file_path, 'r') as file:
content = file.read()
- yaml_data = yaml.safe_load(content)
DocumentTemplate.objects.update_or_create(
name="Default Template",
diff --git a/backend/core/templates/document.html b/backend/core/templates/document.html
index f1ec85c..1fa2cc1 100644
--- a/backend/core/templates/document.html
+++ b/backend/core/templates/document.html
@@ -2,35 +2,13 @@
{% block content %}
-
-
-
- {% for segment in segments %}
- {% if segment.segment_type == 'title' %}
- {{ segment.content }}
- {% elif segment.segment_type == 'subtitle' %}
- {{ segment.content }}
- {% elif segment.segment_type == 'h1' %}
- {{ segment.content }}
- {% elif segment.segment_type == 'h2' %}
- {{ segment.content }}
- {% elif segment.segment_type == 'h3' %}
- {{ segment.content }}
- {% elif segment.segment_type == 'quote' %}
- {{ segment.content }}
- {% else %}
- {{ segment.content }}
- {% endif %}
- {% endfor %}
-
-
+ {% if error %}
+ {{ error }}
+ {% endif %}
+
+ {{ rendered_html|safe }}
+