Add local_settings.py
This commit is contained in:
41
example/local_settings.py
Normal file
41
example/local_settings.py
Normal file
@@ -0,0 +1,41 @@
|
||||
import os
|
||||
from django.conf import settings
|
||||
|
||||
import onepasswordconnectsdk
|
||||
from onepasswordconnectsdk.client import Client, new_client
|
||||
|
||||
|
||||
from example.app_config import get_app_config_dict
|
||||
|
||||
|
||||
settings.onepassword_client: Client = new_client(
|
||||
"https://shh.example.com",
|
||||
"token", # Just put the token in local_settings when actually developing
|
||||
)
|
||||
|
||||
ONEPASSWORD_VAULT_ID = "xyz124"
|
||||
external_config = onepasswordconnectsdk.load_dict(
|
||||
settings.onepassword_client, get_app_config_dict(ONEPASSWORD_VAULT_ID)
|
||||
)
|
||||
|
||||
ALLOWED_HOSTS = ["localhost"]
|
||||
SECRET_KEY = external_config["secret_key"]
|
||||
|
||||
EMAIL_BACKEND = "sendgrid_backend.SendgridBackend"
|
||||
SENDGRID_API_KEY = external_config["email_api_key"]
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": external_config["database"],
|
||||
"USER": external_config["username"],
|
||||
"PASSWORD": external_config["password"],
|
||||
"HOST": external_config["server"],
|
||||
"PORT": external_config["port"],
|
||||
"DISABLE_SERVER_SIDE_CURSORS": True,
|
||||
"OPTIONS": {
|
||||
"sslmode": "verify-full",
|
||||
"sslrootcert": os.path.join(settings.BASE_DIR, "ca-certificate.crt"),
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user