readme update

This commit is contained in:
Sam
2021-01-26 12:50:29 +00:00
parent 9c88019700
commit b385767232
2 changed files with 20 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ This README aims to document functionality of backend as well as required steps
- [First Steps](#first-steps) - [First Steps](#first-steps)
- [Location Data](#location-data) - [Location Data](#location-data)
- [Endpoints](#endpoints)
## First Steps ## First Steps
@@ -34,3 +35,19 @@ python manage.py migrate
## Location data ## Location data
To load initial location data use: `python manage.py addgeo` To load initial location data use: `python manage.py addgeo`
## Endpoints
- `/api/v1/users/`: User information
- `/api/v1/companies/`: Company information
- `/api/v1/products/`: Product information
- `/api/v1/history/`: Historical records about product importation
- `/api/v1/stats/`: logs about user interaction with products links
Location ednpoints:
- `/api/v1/countries/`
- `/api/v1/regions/`
- `/api/v1/provinces/`
- `/api/v1/cities/`

View File

@@ -6,6 +6,9 @@ User = get_user_model()
# Create your models here. # Create your models here.
class StatsLog(models.Model): class StatsLog(models.Model):
"""
Keep track of interactions between user and product links
"""
model = models.ForeignKey(ContentType, on_delete=models.DO_NOTHING, null=True) model = models.ForeignKey(ContentType, on_delete=models.DO_NOTHING, null=True)
user = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True) user = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True)