None

Reading Django Settings

March 16, 2010

To get hold of Django settings at runtime, use the following:

from django.conf import settings

and then refer to the setting using:

print settings.DATABASE_NAME

This ensures that you pick up the correct settings, for example if you're using WSGI and your settings file isn't called settings.py

Tags: django settings