https://github.com/yash08123/todo-django
A simple todo app built with django
https://github.com/yash08123/todo-django
bootstrap css django django-framework django-project html
Last synced: 3 months ago
JSON representation
A simple todo app built with django
- Host: GitHub
- URL: https://github.com/yash08123/todo-django
- Owner: yash08123
- Created: 2025-01-05T15:23:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-05T15:57:50.000Z (over 1 year ago)
- Last Synced: 2025-01-07T20:38:12.811Z (over 1 year ago)
- Topics: bootstrap, css, django, django-framework, django-project, html
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django Todo App
A simple Todo application built with Django, featuring user authentication and MySQL database integration.
## Features
- User authentication (signup, login, logout)
- Create, read, update, and delete (CRUD) operations for todos
- User-specific todo lists
- MySQL database for data storage
- Bootstrap for responsive UI
## Prerequisites
- Python 3.x
- Django 5.1.4
- MySQL Server
- MySQL client for Python (`mysqlclient`)
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/yash08123/ToDo_Django.git
cd todo_project
```
2. **Create a virtual environment:**
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
3. **Install the dependencies:**
```bash
pip install -r requirements.txt
```
4. **Set up the MySQL database:**
- Log into MySQL as root:
```bash
mysql -u root -p
```
- Create the database and user:
```sql
CREATE DATABASE todo_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'todo_user'@'localhost' IDENTIFIED BY 'todo_password';
GRANT ALL PRIVILEGES ON todo_db.* TO 'todo_user'@'localhost';
FLUSH PRIVILEGES;
```
5. **Configure the database in `settings.py`:**
Update the `DATABASES` section in `todo_project/todo_project/settings.py` with your MySQL credentials:
```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'todo_db',
'USER': 'root',
'PASSWORD': 'your_password',
'HOST': 'localhost',
'PORT': '3306',
'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
}
}
```
6. **Run migrations:**
```bash
python manage.py makemigrations
python manage.py migrate
```
7. **Create a superuser:**
```bash
python manage.py createsuperuser
```
8. **Run the development server:**
```bash
python manage.py runserver
```
9. **Access the application:**
Open your web browser and go to `http://127.0.0.1:8000/`.
## Usage
- Sign up for a new account or log in with an existing account.
- Add, complete, or delete todos.
- View your todo list.
## Troubleshooting
- If you encounter a `django.db.utils.OperationalError: (1045, "Access denied for user...")`, ensure your MySQL credentials in `settings.py` are correct and that the MySQL server is running.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements.
## Contact
For any questions or issues, please contact [yashnagarkar124@gmail.com](mailto:yashnagarkar124@gmail.com).