You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set an environment variables for my api_key and api_secret using Python decouple in settings.py
From decouple import config
API_KEY = config('API_KEY)
API_SECRET = config('API_SECRET')
While in the .env file I added the key and secret as shown below
API_KEY=***********
API_SECRET=*********
While in my views.py I'm using api_key and api_secret but I don't really know how to call the API key and secret from settings.py when I removed it from settings.py and I added it to views.py I got a type error saying bytes or bytearray expected but got str
Pls how can I call the this api_key and secret from settings.py since I have set up an environment variable already
The text was updated successfully, but these errors were encountered:
I have set an environment variables for my api_key and api_secret using Python decouple in settings.py
From decouple import config
API_KEY = config('API_KEY)
API_SECRET = config('API_SECRET')
While in the .env file I added the key and secret as shown below
API_KEY=***********
API_SECRET=*********
While in my views.py I'm using api_key and api_secret but I don't really know how to call the API key and secret from settings.py when I removed it from settings.py and I added it to views.py I got a type error saying bytes or bytearray expected but got str
Pls how can I call the this api_key and secret from settings.py since I have set up an environment variable already
The text was updated successfully, but these errors were encountered: