Skip to content

Instantly share code, notes, and snippets.

View tsabat's full-sized avatar

Tim Sabat tsabat

View GitHub Profile
@tsabat
tsabat / settings.py
Created February 7, 2021 22:32 — forked from defulmere/settings.py
How to override an old sqlite3 module with pysqlite3 in django 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': {