This is a Todo List program built with Django, which allows users to record and manage their daily tasks. The program provides a user-friendly interface to prevent forgetting important tasks. It also includes a REST API to retrieve data from the program. The project is Dockerized for easy deployment and management.
- Todo List Management: Users can create, update, and delete tasks in their todo list.
- User Authentication: The program uses the Django
AbstractBaseUserto customize the user model, providing secure user authentication. - Docker Support: The project includes a Docker structure for easy deployment and management.
- API Support: The app includes a REST API that allows users to interact with the app's functionality programmatically. The API documentation can be found at
http://127.0.0.1:8000/swagger/. - Email Verification: The app uses the
smtp4develement in the Docker file format to send emails and verify user accounts. - Testing: The app includes unit tests written with
pytestto ensure the correctness of different parts of the app. - Random Data Generation: The app utilizes the
fakerlibrary to create random data for testing and populating the database. - Performance Testing: The app includes an API tolerance threshold that allows testing the performance using artificial traffic generated by Locust. The performance testing can be accessed at
http://127.0.0.1:8089/. - Background Tasks: The app explores the use of background tasks in Django projects by integrating with Brokers like Redis and using the Celery module to create and manage different tasks.
- Caching: The app implements caching of information in different views using Redis to improve performance.
- Clone this repository to your local machine:
bash git clone https://github.com/reza72rg/TodoApp
- Install the required dependencies:
bash pip install -r requirements.txt
- Set up the database by running migrations:
bash python manage.py migrate
- Start the development server:
bash python manage.py runserver
-
Open the program in your web browser at
http://127.0.0.1:8000. -
Build the Docker image by running the following command in the base directory:
docker build -t todoapp . -
Once the image is built, you need to run the container. Use the following command:
docker-compose up --build.
The API documentation can be found at http://127.0.0.1:8000/api/v1/ and http://127.0.0.1:8000/accounts/api/v1/, providing details on how to interact with the REST API endpoints.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License.
- Special thanks to [Ali Bigdali] for their assistance and feedback during the development of this project.
Using Locust, the API tolerance threshold is created and its performance is checked by generating artificial traffic on the site. It can be tested at the address http://127.0.0.1:8089/.
- Django LTS
- Function Based View
- Django RestFramework
- User authentication
- Black
- Flake8
- Responsive Design
- Bootstrap5
Project it self has the user creation form but still in order to use the admin you need to create a super user.you can use the createsuperuser option to make a super user.
python manage.py createsuperuserAnd lastly let's make the App run. We just need to start the server now and then we can start using our simple todo App. Start the server by following command
python manage.py runserverOnce the server is up and running, head over to http://127.0.0.1:8000 for the App.
If you want your code to be check by pep8 and all the guide lines, there are two packages added to requirements in order to check and reformat code. you can use it by this command:
black -l 79 . && flake8A simple view of the project model schema.
- refactor javascript codes in list.html
- leave comments for codes
- add unit tests
- add heroku config files
- complete the documentation
- create a video tutorial
Feel free to let me know if there are any problems or any request you have for this repo.
