Members is a simple Django app to make crud operation using apis
curl -O https://github.com/amankumarjain/team_member_management/blob/development/members-0.1.tar.gz
pip install members-0.1.tar.gz
Change your INSTALLED_APPS settings file
- INSTALLED_APPS = [
... 'members',
]
Include the members URLconf in your project urls.py like this:
from members.urls import routers as member_routers url("^api/v1/", include(member_routers.urls)),
Install and create virtual env like this:
sudo apt-get install python3-pip pip3 install virtualenv virtualenv {project_name}
Activate virtual env like this:
source {path/to/virtualenv}/bin/activate
Clone repository:
git clone https://github.com/amankumarjain/team_member_management.git
- Inside virtualenv run pip install -r requirements.txt to download all related packages.
- Run ./manage.py runserver 0.0.0.0:8080 in development server
https://www.codersbyte.xyz/docs/
This will create a new member instance:
curl -X POST \ "https://www.codersbyte.xyz/api/v1/members/" \ -H 'content-type: application/json' \ -d '{"first_name":"Aman", "last_name":"Jain", "phone_number":"8867998100", "email":"[email protected]", "role": 1}'
Return a list of all the existing members:
curl -X GET \ https://www.codersbyte.xyz/api/v1/members/ \ -H 'content-type: application/json' \
Return the given member:
curl -X GET \ "https://www.codersbyte.xyz/api/v1/members/31376e06-69a5-47fd-b357-b603cbfb9fba/" \ -H 'content-type: application/json' \
Update the given member:
curl -X PUT \ "https://www.codersbyte.xyz/api/v1/members/" \ -H 'content-type: application/json' \ -d '{"first_name":"Aman", "last_name":"Jain", "phone_number":"8867998100", "email":"[email protected]", "role": 1}'
Update partial field for given member:
curl -X PATCH \ "https://www.codersbyte.xyz/api/v1/members/" \ -H 'content-type: application/json' \ -d '{"first_name":"Aman", "last_name":"Jain", "phone_number":"8867998100", "email":"[email protected]", "role": 1}'