A robust and scalable ToDo application backend built using Python and Django. This project provides users with the ability to manage tasks efficiently through CRUD operations, with secure authentication and a seamless API integration for frontend clients.
- Task Management: Create, read, update, and delete tasks with ease.
- User Authentication: Secure login and token-based authentication using Django Rest Framework's token authentication system.
- RESTful API: API endpoints for seamless interaction with frontend clients or external systems.
- Scalable and Secure: Optimized database interactions using Django ORM and secure user authentication mechanisms.
- Backend Framework: Django
- Programming Language: Python
- API Framework: Django Rest Framework (DRF)
- Database: SQLite (default), easily replaceable with PostgreSQL or MySQL
- Version Control: Git and GitHub
Follow these steps to set up the project on your local machine:
-
Clone the Repository
git clone https://github.com/human-coder-mj/The_Todo.git cd The_Todo
-
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Apply Migrations
python manage.py makemigrations python manage.py migrate
-
Run the Server
python manage.py runserver
-
Access the Application
Open your browser and navigate to
http://127.0.0.1:8000/
.
The application provides the following API endpoints:
Endpoint | Method | Description |
---|---|---|
/api/todos/ |
GET | Retrieve all tasks |
/api/todos/<id>/ |
GET | Retrieve a specific task |
/api/todos/ |
POST | Create a new task |
/api/todos/<id>/ |
PUT | Update a task |
/api/todos/<id>/ |
DELETE | Delete a task |
/api/users/ |
GET | Retrieve all users |
/api/users/<id>/ |
GET | Retrieve a specific user |
/api/register/ |
POST | Register a new user |
Authentication is required for all endpoints. Use the /api/auth/login/
and /api/auth/register/
endpoints for authentication.
The_Todo/
├── manage.py # Django management script
├── todoList/ # Project settings and configurations
├── apis/ # Main application code
│ ├── migrations/ # Database migrations
│ ├── models.py # Data models
│ ├── views.py # API views
│ ├── serializers.py # API serializers
│ └── urls.py # Application URLs
└── requirements.txt # Project dependencies
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
. - Commit your changes:
git commit -m 'Add YourFeature'
. - Push to the branch:
git push origin feature/YourFeature
. - Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.