pip install -r requirements.txt
Install postgres using docker or from the source
Update settings.py with the correct postgres connection values.
Run python manage.py migrate
to create appropriate tables in the database.
curl http://localhost:8000/articles -H "Authorization: Bearer 70kc8b75ca68amj3xwrayqvy9j46yzr" -H 'Content-Type: application/json'
[
{
"title": "Update rows using postgres",
"description": "Update rows using postgres",
"author_id": 2,
"id": 2
}
]
curl http://localhost:8000/author/articles -H "Authorization: Bearer 70kc8b75ca68amj3xwrayqvy9j46yzrf" -H 'Content-Type: application/json'
[
{
"title": "Insert rows using postgres",
"description": "This blog post will take you through the steps which needs to be followed to insert rows using postgres",
"author_id": 2,
"id": 1
},
{
"title": "Update rows using postgres",
"description": "Update rows using postgres",
"author_id": 2,
"id": 2
}
]