src/cm/management/commands/set_workspacename.py
changeset 141 3acc965253e2
child 142 9b3438382e53
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/management/commands/set_workspacename.py	Wed Feb 03 15:09:30 2010 +0100
@@ -0,0 +1,11 @@
+from django.core.management.base import LabelCommand, CommandError
+
+class Command(LabelCommand):
+    help = "Change workspace name"
+
+    def handle(self, *labels, **options):
+        if len(labels)!=1:
+            raise CommandError('Enter workspace name')
+        name = labels[0]
+        from cm.models import Configuration
+        Configuration.objects.set_workspace_name(name.decode('utf8'))