def startapp(app_name, directory):
 project_dir = os.path.normpath(os.path.join(directory, '..'))
 project_name = os.path.basename(project_dir)
 if (app_name == os.path.basename(directory)):
  sys.stderr.write(style.ERROR(('Error: You cannot create an app with the same name (%r) as your project.\n' % app_name)))
  sys.exit(1)
 _start_helper('app', app_name, directory, project_name)

def startapp ( app_name , directory ) : project_dir = os . path . normpath ( os . path . join ( directory , '..' ) ) project_name = os . path . basename ( project_dir ) if ( app_name == os . path . basename ( directory ) ) : sys . stderr . write ( style . ERROR ( ( 'Error: You cannot create an app with the same name (%r) as your project.\n' % app_name ) ) ) sys . exit ( 1 ) _start_helper ( 'app' , app_name , directory , project_name )
creates a django app for the given app_name in the given directory .