import os
from dotenv import load_dotenv
# Load .env variables
load_dotenv()
DATABASES = {
'default': {
'ENGINE': os.environ['ENGINE'],
'NAME': os.environ['DB'],
'USER': os.environ['NAME'],
'PASSWORD': os.environ['PASSWORD'],
'HOST': os.environ['HOST'],
'PORT': os.environ['PORT'],
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter