-
Token-Based Authentication: Users receive and use unique tokens to securely access and authenticate with API endpoints..
-
Authorization: All types of requests are authorized to ensure only authenticated users can access the services.
-
Projects Mangement The Projects Management API provides endpoints for creating, updating, and listing projects. Authenticated users can create and modify projects using the
POST
andPUT
requests, respectively, while theGET
endpoint allows them to retrieve a list of all projects or detailed information about a specific project using its primary key (pk
). -
Timesheet Management: The Timesheet Management API enables users to create, update, and retrieve timesheets. Authenticated users can create timesheets using a
POST
request, update their own timesheets with aPUT
request, and retrieve a list of all their timesheets or details of a specific timesheet using the respectiveGET
endpoints. Permissions are enforced to ensure users can only modify their own timesheets and on weekly basis. -
User Management: The User Authentication API facilitates user registration, login, and logout functionalities. Users can register by sending a
POST
request to the registration endpoint, log in using valid credentials through the login endpoint, and log out with a valid refresh token via the logout endpoint. JSON Web Tokens (JWT) are used for secure authentication and authorization. -
Note: Note: All endpoints are decorated with @api_view(["POST"]) and @permission_classes([IsAuthenticated]) to ensure authentication and the use of proper HTTP methods. HTTP status codes are appropriately used to indicate the outcome of each operation (e.g., HTTP_201_CREATED for successful creations, HTTP_400_BAD_REQUEST for validation errors). Proper naming conventions and modularization have been applied to keep the code organized and readable. All Serializers are utilized for data validation and serialization, promoting code reusability and maintaining consistency.
- Django 5.0: A high-level Python web framework.
- Django Rest Framework (DRF): A powerful and flexible toolkit for building Web APIs.
- SQLite database: A lightweight, file-based database engine.
- Token-based Authentication using
rest_framework_simplejwt
: Token-based authentication for securing API endpoints.
- Clone the Repository:
git clone https://github.com/adityaShar24/Django-Timesheet-Management-API.git
- Navigate to the project directory:
cd src
- Create and activate a virtual environment (optional but recommended)
python -m venv venv source venv/bin/activate On Windows, use `venv\Scripts\activate`
- Install project Dependencies:
pip install -r requirements.txt
- Apply Database Migrations (Step1):
python manage.py makemigrations
- Apply Database Migrations (Step2):
python manage.py migrate
- Create Superuser:
python manage.py createsuperuser username: admin password: admin
- Run Development Server:
python manage.py runserver
Feel free to contribute to enhance the functionality of Todo-Application. Follow the contribution guidelines for more details.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Special thanks to the Django community and contributors for making this project possible.
Happy task managing! 😊