#NEWLINE# def handle( self , * args , **options ) : #NEWLINE# #INDENT# if ( self . script_name == 'django-admin.py' ) : #NEWLINE# #INDENT# raise CommandError ( 'This command does not work when used with django-admin.py.\nPlease run it with the manage.py of the root directory of your project.\n' ) #NEWLINE# #UNINDENT# self . install_dir = ( args [ 0 ] if args else self . project_dir ) #NEWLINE# if ( not os . path . exists ( args . install_dir ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'The web site directory [%s] does not exist !' % self . install_dir ) ) #NEWLINE# #UNINDENT# if ( not os . path . isdir ( self . install_dir ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'The web site directory [%s] is not a directory !' % self . install_dir ) ) #NEWLINE# #UNINDENT# self . install_dir = os . path . normcase ( os . path . abspath ( self . install_dir ) ) #NEWLINE# print ( ( 'Using installation directory %s' % self . install_dir ) ) #NEWLINE# self . web_config = os . path . join ( self . install_dir , 'web.config' ) #NEWLINE# if ( options [ 'site_name' ] == '' ) : #NEWLINE# #INDENT# options [ 'site_name' ] = os . path . split ( self . install_dir ) [ 1 ] #NEWLINE# #UNINDENT# if ( not os . path . exists ( self . appcmd ) ) : #NEWLINE# #INDENT# raise CommandError ( 'It seems that IIS is not installed on your machine' ) #NEWLINE# #UNINDENT# if ( not self . check_config_section_exists ( self . FASTCGI_SECTION ) ) : #NEWLINE# #INDENT# raise CommandError ( ( 'Failed to detect the CGI module with the following message:\n%s' % self . last_command_error ) ) #NEWLINE# #UNINDENT# if options [ 'delete' ] : #NEWLINE# #INDENT# self . delete ( args , options ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . install ( args , options )