To All,

I was able to successfully setup  environment variables in cpanel using the
package python-dotenv.

Here is the instructions that I followed up:

https://help.pythonanywhere.com/pages/environment-variables-for-web-apps/


Thanks Imad to help,

Regards,



El sáb, 19 feb 2022 a las 0:58, Walter Randazzo (<wwranda...@gmail.com>)
escribió:

> Hi Imad,
>
> I've just follow up the steps u suggested with no luck. I think i miss up
> something.
>
> How you set the SECRET_KEY variable in  settings.py file?
>
>
> Thanks in advances,
>
>
>
> El mar, 8 feb 2022 a las 11:16, Walter Randazzo (<wwranda...@gmail.com>)
> escribió:
>
>> Hi Imad,
>>
>> Thanks very much for your help.
>>
>> Ill try that in the next few days also Ill let u know how it goes.
>>
>> Thanks bro!
>>
>>
>>
>>
>> El mar, 8 feb 2022 a las 11:10, imad latch (<imadla...@gmail.com>)
>> escribió:
>>
>>> I think you will have limited abilities without terminal but you can try
>>> it anyway .
>>> check this
>>> https://docs.cpanel.net/cpanel/software/application-manager/82/#add-environment-variables
>>>
>>> and for *passenger_wsgi.py* in your /home/user/django-project/
>>>
>>> import sys, os
>>> INTERP = "/home/user/django-project/django-env/bin/python3"
>>> if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)
>>>
>>> from  project.wsgi import application
>>>
>>> I hope this helps
>>>
>>> On Tuesday, February 8, 2022 at 2:29:00 AM UTC+1 wwran...@gmail.com
>>> wrote:
>>>
>>>> Hi there, good night.
>>>>
>>>> Does anybody know how to set up environment variables in a cpanel
>>>> shared hosting?
>>>>
>>>> I've found the way to declare the variable name and the value through
>>>> the "Setup Python App" section, but  I didn't find the way to retrieve the
>>>> value in the settings file.
>>>>
>>>> Please note that cpanel has no terminal.
>>>>
>>>> Thanks in advance,
>>>>
>>>>
>>>>
>>>> --
>>> 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/7291e6c0-98bc-4d64-8f42-a173f4e8aa0an%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/7291e6c0-98bc-4d64-8f42-a173f4e8aa0an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
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/CAL7Dry7jKnzEVNYBtya2S6MXzQjsTe2%3D%2BmHmFam9n5axGo2yWA%40mail.gmail.com.

Reply via email to