Skip to content

Commit

Permalink
Setup Export
Browse files Browse the repository at this point in the history
- Add QuestionnaireExport
- Add Basic XLSForm export
  • Loading branch information
thenav56 committed Sep 10, 2023
1 parent 78a4a43 commit 3f5a4fa
Show file tree
Hide file tree
Showing 22 changed files with 880 additions and 37 deletions.
Empty file added apps/export/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions apps/export/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class ExportConfig(AppConfig):
name = "apps.export"
19 changes: 19 additions & 0 deletions apps/export/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import strawberry

from utils.strawberry.enums import get_enum_name_from_django_field

from .models import QuestionnaireExport


# Questionnaire
QuestionnaireExportTypeEnum = strawberry.enum(QuestionnaireExport.Type, name='QuestionnaireExportTypeEnum')
QuestionnaireExportStatusEnum = strawberry.enum(QuestionnaireExport.Status, name='QuestionnaireExportStatusEnum')


enum_map = {
get_enum_name_from_django_field(field): enum
for field, enum in (
(QuestionnaireExport.type, QuestionnaireExportTypeEnum),
(QuestionnaireExport.status, QuestionnaireExportStatusEnum),
)
}
Empty file.
Loading

0 comments on commit 3f5a4fa

Please sign in to comment.