|
@@ -11,14 +11,14 @@ class CosmohomeView(viewsets.ViewSet):
|
|
@classmethod
|
|
@classmethod
|
|
@action(methods=['get'], detail=False, url_path='generate/xml')
|
|
@action(methods=['get'], detail=False, url_path='generate/xml')
|
|
def generate_xml(cls, request: Request, *args, **kwargs) -> HttpResponse:
|
|
def generate_xml(cls, request: Request, *args, **kwargs) -> HttpResponse:
|
|
- filepath = settings.BASE_DIR / "artifacts/cosmohome_products.xml"
|
|
|
|
|
|
+ filepath = "artifacts/cosmohome_products.xml"
|
|
final_xml = generate_xml_task(filepath)
|
|
final_xml = generate_xml_task(filepath)
|
|
return HttpResponse('ok')
|
|
return HttpResponse('ok')
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
@action(methods=['get'], detail=False, url_path='stats')
|
|
@action(methods=['get'], detail=False, url_path='stats')
|
|
def generate_xml(cls, request: Request, *args, **kwargs) -> JsonResponse:
|
|
def generate_xml(cls, request: Request, *args, **kwargs) -> JsonResponse:
|
|
- filepath = settings.BASE_DIR / "artifacts/cosmohome_products.xml"
|
|
|
|
|
|
+ filepath = "artifacts/cosmohome_products.xml"
|
|
stats = generate_stats(filepath)
|
|
stats = generate_stats(filepath)
|
|
return JsonResponse(stats)
|
|
return JsonResponse(stats)
|
|
|
|
|