Skip to content

Commit

Permalink
refactor: organising excel base templates used for bulk upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lordgrim18 committed Dec 13, 2023
1 parent 308c2e8 commit 620bb1c
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/dashboard/karma_voucher/karma_voucher_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ class VoucherBaseTemplateAPI(APIView):
authentication_classes = [CustomizePermission]

def get(self, request):
wb = load_workbook('./api/dashboard/karma_voucher/assets/voucher_base_template.xlsx')
wb = load_workbook('./excel-templates/voucher_base_template.xlsx')
ws = wb['Data Definitions']
hashtags = TaskList.objects.all().values_list('hashtag', flat=True)
data = {
Expand Down
2 changes: 1 addition & 1 deletion api/dashboard/organisation/organisation_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class OrganisationBaseTemplateAPI(APIView):
authentication_classes = [CustomizePermission]

def get(self, request):
wb = load_workbook('./api/dashboard/organisation/assets/organisation_base_template.xlsx')
wb = load_workbook('./excel-templates/organisation_base_template.xlsx')
ws = wb['Data Definitions']
affiliations = OrgAffiliation.objects.all().values_list('title', flat=True)
districts = District.objects.all().values_list('name', flat=True)
Expand Down
2 changes: 1 addition & 1 deletion api/dashboard/roles/dash_roles_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class RoleBaseTemplateAPI(APIView):
authentication_classes = [CustomizePermission]

def get(self, request):
wb = load_workbook("./api/dashboard/roles/assets/role_base_template.xlsx")
wb = load_workbook("./excel-templates/role_base_template.xlsx")
ws = wb["Data Definitions"]

roles = Role.objects.all().values_list("title", flat=True)
Expand Down
2 changes: 1 addition & 1 deletion api/dashboard/task/dash_task_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ class TaskBaseTemplateAPI(APIView):
authentication_classes = [CustomizePermission]

def get(self, request):
wb = load_workbook('./api/dashboard/task/assets/task_base_template.xlsx')
wb = load_workbook('./excel-templates/task_base_template.xlsx')
ws = wb['Data Definitions']
levels = Level.objects.all().values_list('name', flat=True)
channels = Channel.objects.all().values_list('name', flat=True)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 620bb1c

Please sign in to comment.