75👍
You can import pymsql
so it presents as MySQLdb. You’ll need to do this before any django code is run, so put this in your manage.py
file
import pymysql
pymysql.install_as_MySQLdb()
1👍
The short answer is no they are not the same.
The engine, in a Django context, is in reference to RDBMS technology. The driver is the library developed to facilitate communication to that actual technology when up and running. Letting Django know what engine to use tells it how to translate the ORM functions from a backend perspective. The developer doesn’t see a change in ORM code but Django will know how to convert those actions to a language the technology understands. The driver then takes those actions (e.g. selects, updates, deletes) and sends them over to a running instance to facilitate the action.
- [Django]-How to translate a model label in Django Admin?
- [Django]-Checking the number of elements in an array in a Django template
- [Django]-Django: save() vs update() to update the database?