🗃️(backend) export to docx
We can now export our document to a docx file. This is done by converting the html to a docx file using the pypandoc and pandoc library. We added the "format" param to the generate-document endpoint, "format" accept "pdf" or "docx" as value.
This commit is contained in:
@@ -180,6 +180,12 @@ class DocumentGenerationSerializer(serializers.Serializer):
|
||||
required=False,
|
||||
default="html",
|
||||
)
|
||||
format = serializers.ChoiceField(
|
||||
choices=["pdf", "docx"],
|
||||
label=_("Format"),
|
||||
required=False,
|
||||
default="pdf",
|
||||
)
|
||||
|
||||
|
||||
class InvitationSerializer(serializers.ModelSerializer):
|
||||
|
||||
Reference in New Issue
Block a user