-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add QuestionnaireExport - Add Basic XLSForm export
- Loading branch information
Showing
22 changed files
with
880 additions
and
37 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.