readme update
This commit is contained in:
@@ -273,8 +273,7 @@ For massive load of product data.
|
|||||||
|
|
||||||
CSV headers: `sku,nombre-producto,descripcion,imagen,url,precio,gastos-envio,cond-envio,descuento,stock,tags,categoria,identificadores`
|
CSV headers: `sku,nombre-producto,descripcion,imagen,url,precio,gastos-envio,cond-envio,descuento,stock,tags,categoria,identificadores`
|
||||||
|
|
||||||
Only admin users have access to endoint
|
Number fields must not include other symbols (like currency)
|
||||||
|
|
||||||
|
|
||||||
## GeoIP Setup
|
## GeoIP Setup
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ def load_coop_products(request):
|
|||||||
csv_file = request.FILES['csv_file']
|
csv_file = request.FILES['csv_file']
|
||||||
if csv_file.name.endswith('.csv') is not True:
|
if csv_file.name.endswith('.csv') is not True:
|
||||||
logging.error(f"File {csv_file.name} is not a CSV file")
|
logging.error(f"File {csv_file.name} is not a CSV file")
|
||||||
return Response({"errors":{"details": "File is not CSV type"}})
|
return Response({"errors":{"details": "File is not CSV type"}}, status=status.HTTP_406_NOT_ACCEPTABLE)
|
||||||
|
|
||||||
logging.info(f"Reading contents of {csv_file.name}")
|
logging.info(f"Reading contents of {csv_file.name}")
|
||||||
decoded_file = csv_file.read().decode('utf-8').splitlines()
|
decoded_file = csv_file.read().decode('utf-8').splitlines()
|
||||||
|
|||||||
Reference in New Issue
Block a user