Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/studygyaan/how-to-connect-mysql-database-in-django-project
How to Connect MySQL Database in Django Project
https://github.com/studygyaan/how-to-connect-mysql-database-in-django-project
django django-database django-mysql django-rest-framework
Last synced: 14 days ago
JSON representation
How to Connect MySQL Database in Django Project
- Host: GitHub
- URL: https://github.com/studygyaan/how-to-connect-mysql-database-in-django-project
- Owner: studygyaan
- Created: 2019-07-29T19:02:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T20:34:57.000Z (over 1 year ago)
- Last Synced: 2024-11-06T05:20:22.694Z (2 months ago)
- Topics: django, django-database, django-mysql, django-rest-framework
- Language: Python
- Homepage: https://studygyaan.com/django/how-to-connect-mysql-database-in-django-project
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to Connect MySQL Database in Django Project
## Tutorial Link - http://studygyaan.com/django/how-to-export-excel-file-with-django
In this tutorial, you will learn how to Export Excel Spreadsheet with Django. You will learn how to do read-write operations on excel sheets. Styling Excel spreadsheet with XLWT Library. And writing to Existing Excel Workbook using XLWT.
### Setup
1. Create a folder and put all the files inside it.
2. Create a virtual environtment - `virtualenv env`
3. Activate VirtualENV - `source env/bin/activate`
4. Run requirements.txt - `pip3 install -r requirements.txt`
5. Run the Application - `python3 manage.py runserver`
6. Go to - http://localhost:8000/### Change Database Credentials with your Database - `blog/settings.py`
```
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'your_database_name', # example - blog_data
'USER': 'your_mysql_user',
'PASSWORD': 'your_mysql_password',
'HOST': 'localhost',
'PORT': '80',
}
}
```