This is a Django-based Todo API that allows users to register, login, create, update, delete todos, and refresh access tokens using JWT authentication.
Follow the instructions below to get started with the Todo API.
- Python 3.x
- Django
- Django Rest Framework
- Virtual Environment (Optional but recommended)
-
Clone the repository:
git clone https://github.com/muhammedshibilm/todo-api.git
-
Navigate to the project directory:
cd todo-api
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate
-
Start the server:
python manage.py runserver
- Endpoint URL:
https://todoapi-teal.vercel.app/api/register/
- Method: POST
- Request Body:
{ "username": "raju", "email": "abc@gmail.com", "password": "123" }
- Endpoint URL:
https://todoapi-teal.vercel.app/api/login/
- Method: POST
- Request Body:
{ "username": "raju", "password": "123" }
- Endpoint URL:
https://todoapi-teal.vercel.app/api/token/refresh/
- Method: POST
- Request Body:
{ "refresh": "<your_refresh_token>" }
- Endpoint URL:
https://todoapi-teal.vercel.app/api/todos/create/
- Method: POST
- Request Body:
{ "title": "Check emails", "completed": false }
- Endpoint URL:
https://todoapi-teal.vercel.app/api/todos/
- Method: GET
- Endpoint URL:
https://todoapi-teal.vercel.app/api/todos/edit/<id>/
- Method: PUT or PATCH
- Request Body:
{ "title": "Check github", "completed": true }
- Endpoint URL:
https://todoapi-teal.vercel.app/api/todos/delete/<id>/
- Method: DELETE
Contributions are welcome! Please feel free to submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to Django and Django Rest Framework for making API development easier.
- Inspiration from TodoMVC for the Todo app concept.