Access The Value In Settings Django

[Solved] Access The Value In Settings Django | Python Frameworks Django - Code Explorer | www.yomemimo.com
Question : access the value in settings django

Answered by : santhosh-kumar-dhanasekaran

#settings.py
EMAIL_PASS = "FOO"
# in any file
from django.conf import settings
email_password = settings.EMAIL_PASS #to access that variable.

Source : https://stackoverflow.com/questions/7867797/how-do-i-reference-a-django-settings-variable-in-my-models-py | Last Update : Sun, 10 Jan 21

Answers related to access the value in settings django

Code Explorer Popular Question For Python Frameworks Django