djangowebfaction

Hiding secure django settings info on webfaction


I am trying to hide secure info like database password of a django application on webfaction.
But I could not find how and where to set these infos using environmental variables?


Solution

  • Add them to your bash_profile.

    Once you SSH in run:

    nano ~/.bash_profile
    

    Then add your desired variables and save it. Example:

    export DATABASE_URL=postgres://username:password@host:port/databasename
    

    This will create an environment variable named DATABASE_URL with the contents of your string. To test, run echo $DATABASE_URL in your terminal.