This repository contains the source code for a simple To-Do application built with Django. The project demonstrates the use of Django's models, views, templates, and forms to perform CRUD (Create, Read, Update, Delete) operations. It's an ideal beginner-friendly project to learn and practice Django fundamentals.
- Add new tasks
- View all tasks in a list
- Mark tasks as complete or incomplete
- Edit existing tasks
- Delete tasks
- User-friendly interface with Bootstrap
- Backend: Django (Python)
- Database: SQLite (default Django database)
- Frontend: HTML, CSS, and Bootstrap
django-todo-app/
│
├── todo/
│ ├── migrations/ # Database migrations
│ ├── templates/ # HTML templates for the app
│ │ ├── base.html # Base template for all pages
│ │ ├── index.html # Home page template
│ │ └── form.html # Template for adding/editing tasks
│ ├── static/ # Static files (CSS, images, etc.)
│ ├── models.py # Task model definition
│ ├── views.py # Logic for handling requests and responses
│ ├── urls.py # URL routing for the app
│ └── admin.py # Django admin customization
│
├── manage.py # Django project management script
├── db.sqlite3 # SQLite database file
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- Python 3.x installed
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/your-username/django-todo-app.git cd django-todo-app
-
Create a virtual environment:
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py migrate
-
Run the server:
python manage.py runserver
-
Open your browser and navigate to:
http://127.0.0.1:8000
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add your message here"
- Push to the branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE
file for details.
- Django documentation: https://docs.djangoproject.com/
- Bootstrap framework: https://getbootstrap.com/
Let me know if there’s anything you’d like to add or modify!