示例#1
0
 def handle(self, *args, **options):
     db = DataStore()
     if db.exists():
         db.delete()
         self.stdout.write('Successfully deleted DataStore structure and data.')
     else:
         self.stdout.write('DataStore structure not created. Skipping delete action')
 def handle(self, *args, **options):
     db = DataStore()
     if db.exists():
         self.stdout.write(
             'DataStore structure already created, skipping this action. '
             'If you want to recreate it, run python manage.py delete_datastore first.'
         )
     else:
         db.create()
         self.stdout.write('Successfully created DataStore structure')