This is a simple REST API for managing parent and child information. It is built using the Django and Django Rest Framework.
- Clone the repository to your local machine:
https://github.com/eliashossain001/Parent-Child-API.git
- Install the dependencies:
pip install -r requirements.txt
- Create the database:
python manage.py migrate
- Create a superuser account:
python manage.py createsuperuser
- Run the development server::
python manage.py runserver
The API endpoint will look like this: http://localhost:8000/.
- GET /parents/ - Returns a list of all parents.
- POST /parents/ - Creates a new parent.
- GET /children/ - Returns a list of all children.
- POST /children/ - Creates a new child.
- GET /children/{id}/ - Returns the details of a specific child.
- PUT /children/{id}/ - Updates the details of a specific child.
- DELETE /children/{id}/ - Deletes a specific child.
To run the tests, use the following command:
python manage.py test
This will run the test suite and output the results in the console.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.