Skip to Content

Setting up django settings environment within a python script

Found at softwaremaniacs.org

import settings
from django.core.management import setup_environ

setup_environ(settings)

NOTE: Deprecated in Django 1.4 (“Release notes”)