#NEWLINE# def get_project_directory( self , name , target ) : #NEWLINE# #INDENT# "\n        This code is copied verbatim from Django's\n        TemplateCommand.handle(), but with the directory creation\n        code removed.\n        " #NEWLINE# if ( target is None ) : #NEWLINE# #INDENT# top_dir = os . path . join ( os . getcwd ( ) , name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# top_dir = os . path . abspath ( os . path . expanduser ( target ) ) #NEWLINE# if ( not os . path . exists ( top_dir ) ) : #NEWLINE# #INDENT# raise CommandError ( ( "Destination directory '%s' does not exist, please create it first." % top_dir ) ) #NEWLINE# #UNINDENT# #UNINDENT# return target