Am 30.11.18 um 18:50 schrieb Sandip Nath:
> I am a newbie to Django. Using Postgresql for CRUD operations. Although its
> working but I need to write the password of my Postgresql server in the
> settings.py. How can I hide that without hampering the operation?
>
In your settings.py, you could write something like:
from my_site import localconfig
DEBUG = localconfig.DEBUG
SECRET_KEY = localconfig.SECRET_KEY
# Rest of normal settings.py file
# ...
and in a minmal my_site/localconfig.py file:
DEBUG = True
SECRET_KEY = '...'
For completeness, be aware that some people consider local config files an anti
pattern. Personally, I've never found the arguments convincing, but use at your
own discretion.
Best regards,
Carsten