I'm using Django 2 with Python 3.7
I want to import some settings from a file local_settings.py so I can include that file in a .gitignore so I don't share my secret keys on github.
I have the folder tree set up like this:
settings.py has this at the end:
try:
from local_settings import *
except ImportError:
pass
ORDERS = '@catsinuniform.myshopify.com/admin/orders.json'
PRODUCTS = '@catsinuniform.myshopify.com/admin/products.json'
SHOPIFY_SECRET_KEY = ''
SHOPIFY_PWORD = ''
ORDERS_URL = f"https://{SHOPIFY_SECRET_KEY}:{SHOPIFY_PWORD}{ORDERS}"
PRODUCTS_URL = f"https://{SHOPIFY_SECRET_KEY}:{SHOPIFY_PWORD}{PRODUCTS}"
I would also like to put my SECRET_KEY in local_settings.py
This isn't working and I can't find why not? Is it my Python version or Django?