blob: 6a614113731ce2a7deac075b8d22ca8f43fc2b5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from django.core import management
def main(settings_file):
try:
mod = __import__(settings_file)
components = settings_file.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
except ImportError, e:
import sys
sys.stderr.write("Error loading the settings module '%s': %s"
% (settings_file, e))
return sys.exit(1)
management.execute_manager(mod)
|