#!/usr/bin/env python

from django.core.management import execute_manager
import imp
try:
    imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
    import sys
    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
    sys.exit(1)

import settings

if __name__ == "__main__":
    execute_manager(settings)
"""

import os, sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
"""
@@ -20,494 +20,8 @@
 on%0A%0A
-from django.core.management import execute_manager%0Aimport imp%0Atry:%0A    imp.find_module('settings') # Assumed to be in the same directory.%0Aexcept ImportError:%0A    import sys%0A    sys.stderr.write(%22Error: Can't find the file 'settings.py' in the directory containing %25r. It appears you've customized things.%5CnYou'll have to run django-admin.py, passing it your settings module.%5Cn%22 %25 __file__)%0A    sys.exit(1)%0A%0Aimport settings%0A%0Aif __name__ == %22__main__%22:%0A    execute_manager(settings)%0A%22%22%22%0A%0A
 impo
@@ -116,27 +116,8 @@
 %22, %22
-%7B%7B project_name %7D%7D.
 sett
@@ -234,7 +234,4 @@
 gv)%0A
-%22%22%22

update manage.py to avoid a module import error when the current directory name contains periods