--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/management/commands/create_manager.py Wed Feb 03 15:09:30 2010 +0100
@@ -0,0 +1,16 @@
+from django.core.management.base import LabelCommand, CommandError
+
+class Command(LabelCommand):
+ help = "Create manager"
+
+ def handle(self, *labels, **options):
+ if len(labels)!=5:
+ raise CommandError("Enter manager's email, username, password, first_name, last_name")
+ email = labels[0]
+ username = labels[1]
+ password = labels[2]
+ first_name = labels[3]
+ last_name = labels[4]
+
+ from cm.models import UserProfile
+ UserProfile.objects._create_manager(email, username, password, first_name, last_name)
\ No newline at end of file
--- /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'))