eggs/djangorecipe-0.20-py2.6.egg/djangorecipe/manage.py
author Nishanth Amuluru <nishanth@fossee.in>
Sat, 08 Jan 2011 22:37:31 +0530
changeset 333 eb3a191850a1
parent 307 c6bca38c1cbf
permissions -rw-r--r--
created a view for create task

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)