django get settings 1

django get settings

from django.conf import settings 


# NOTE - VARIABLE should be in capital letter. 
# It will not work otherwise.

Here is what the above code is Doing:
1. It’s importing the file from the project’s root directory.
2. It’s accessing the VARIABLE_NAME variable from the file.
3. It’s assigning the value of the VARIABLE_NAME variable to the VARIABLE variable.

Similar Posts