Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Sabat tsabat

View GitHub Profile
@tsabat
tsabat / settings.py
Created Feb 7, 2021 — forked from defulmere/settings.py
How to override an old sqlite3 module with pysqlite3 in django settings.py
View settings.py
# first: pip install pysqlite3-binary
# then in settings.py:
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
DATABASES = {
'default': {