Why don’t you use the decouple module? Use it and add it to your gitignore.

 

Sent from Mail for Windows 10

 

From: Anirudh choudhary
Sent: 19 May 2020 13:14
To: django-users@googlegroups.com
Subject: Re: required help to save SECRET_KEY and Third party Private API key

 

thanks for your answer 

 

after your answer, I have tried to edit the ~/.profile file and /etc/profile/ but still, I can't see my key inside my VM instance 

 

i am putting 

 

SECRET_KEY="jhsgdjadtad876s87dsadsad7sa" 

 

in the above file .but when i run the command "env" i can see my key 

 

thankyou 

 

On Tue, May 19, 2020 at 10:54 AM Akshat Zala <akshatz...@gmail.com> wrote:

You can refer the link below:

 

1. https://cloud.google.com/community/tutorials/secrets-manager-python 

On Tuesday, 19 May 2020 10:26:17 UTC+5:30, Anirudh choudhary wrote:

Hello everyone 

 

I am hosting my website on google cloud platform on Ubuntu VM instance. I cannot find a way to set the environment variable in the machine 

 

Like when I type on my local machine os.environ.get("SECRET_KEY") it give me the key but when I type the same command on VM instance it shows me null 

 

I have tried some method like to edit the 

1./etc/environment 

2.~/.bashrc 

but none of the files is giving me the secret Key 

 

waiting for expert answer 

 

thankyou 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0e4dbe3c-7b38-4e61-8e64-f96dc2c44dd3%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL8_rkHAv1qmfW%3DzWao92cHs2jDFsSGNEv21Fg%3D6FF%3DAo8PjuA%40mail.gmail.com.

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5ec39d35.1c69fb81.be2f9.1767%40mx.google.com.

Reply via email to