src/cm/management/commands/set_workspacename.py
changeset 141 3acc965253e2
child 142 9b3438382e53
equal deleted inserted replaced
140:87eec0c11516 141:3acc965253e2
       
     1 from django.core.management.base import LabelCommand, CommandError
       
     2 
       
     3 class Command(LabelCommand):
       
     4     help = "Change workspace name"
       
     5 
       
     6     def handle(self, *labels, **options):
       
     7         if len(labels)!=1:
       
     8             raise CommandError('Enter workspace name')
       
     9         name = labels[0]
       
    10         from cm.models import Configuration
       
    11         Configuration.objects.set_workspace_name(name.decode('utf8'))