Dodata opcija da yaml template da moze da koristi html i django template

This commit is contained in:
2025-02-19 16:09:42 +01:00
parent 5a0c4df816
commit b128ce6915
4 changed files with 70 additions and 77 deletions

View File

@@ -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",