From 0107d86a27eeb025b145deb83ec75d41b7b7a799 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 4 Feb 2021 10:27:02 +0000 Subject: [PATCH] readme update --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14d16a5..e072c58 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ This README aims to document functionality of backend as well as required steps - [Location Data](#location-data) - [Endpoints](#endpoints) - [Data Load](#data-load) +- [Development Utils](#development-utils) ## First Steps @@ -100,8 +101,11 @@ Refresh expired token endpoint: `/api/v1/token/refresh/` Endpoint url: `/api/v1/users/` +To get info on authenticated user: `/api/v1/my_user/` + Authenticated users cannot create new users -User are inactive by default + +User are active by default To create user: ```json @@ -118,10 +122,13 @@ To create user: Endpoint url: `/api/v1/companies/` +To get company linked to authenticated user: `/api/v1/my_company/` + ### Products Endpoint url: `/api/v1/products/` +To get products linked to authenticated user: `/api/v1/my_products/` ### History @@ -166,3 +173,14 @@ For massive load of product data. CSV headers: `id,nombre-producto,descripcion,imagen,url,precio,gastos-envio,cond-envio,descuento,stock,tags,categoria,identificadores` Only admin users have access to endoint + + +## Development Utils + +### Fake product load + +To create a dataset of fake companies and products: + +`python manage.py addtestdata` + +Creates 10 Companies, with 100 products each.