Commit 888aaffb authored by John Red Medrano's avatar John Red Medrano

removed unused codes on ETL endpoint

parent ccee2ad3
......@@ -114,39 +114,6 @@ class BatchUploadViewSet(viewsets.ModelViewSet):
return self.get_paginated_response(message)
@action(
detail=False, methods=['get'],
url_path='pdf-instruction', name='how to upload bulk users'
)
def testpdf(self, request, code=None):
F = open(os.path.join(settings.EMAIL_TEMPLATES_ROOT, 'RMS-NEWUSER.html'), 'r')
result = BytesIO()
pdf = pisa.pisaDocument(F, result)
updated_file = ContentFile(result.getvalue())
updated_file.name = "cr_download.pdf"
my_folder = os.path.join(settings.MEDIA_ROOT, f'cr/{request.user.code}')
if os.path.isdir(my_folder):
shutil.rmtree(my_folder)
user_folder = os.mkdir(my_folder)
completeName = os.path.join(os.path.join(settings.MEDIA_ROOT, f'cr/{request.user.code}'), updated_file.name)
file1 = open(completeName, "w+")
# response = HttpResponse(open(my_folder, 'rb'), content_type='application/zip')
# response['Content-Disposition'] = 'attachment; filename=any_name_you_like.zip'
# return response
message = status_message_response(
200,
'success',
'test',
"sss"
)
return Response(message)
# return sender.to_pdf()
@action(
detail=False, methods=['get'],
url_path='user-instruction', name='how to upload bulk users'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment