[Django]-How to print BASE_DIR from settings.py from django app in terminal?

16👍

You should print the attribute of the imported module:

print settings.BASE_DIR

Or import this variable from the module:

from settings import BASE_DIR

print BASE_DIR

26👍

These commands will help:

python manage.py shell

Then in python shell type:

from django.conf import settings
print(settings.BASE_DIR)

Leave a comment