From 9a3d3dcbca9395c00e55d6ee4909ba9b9a4752f8 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 10 Oct 2012 01:05:40 +0200 Subject: Django 1.4 migration - Begining work on FormWizard migration: person creation --- ishtar/ishtar_base/management/commands/generate_rights.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'ishtar/ishtar_base/management/commands/generate_rights.py') diff --git a/ishtar/ishtar_base/management/commands/generate_rights.py b/ishtar/ishtar_base/management/commands/generate_rights.py index 9bf2776a8..75b1cf807 100644 --- a/ishtar/ishtar_base/management/commands/generate_rights.py +++ b/ishtar/ishtar_base/management/commands/generate_rights.py @@ -17,6 +17,8 @@ # See the file COPYING for details. +import sys + from django.core.management.base import BaseCommand, CommandError from django.core.exceptions import ObjectDoesNotExist @@ -40,7 +42,8 @@ class Command(BaseCommand): except ObjectDoesNotExist: wizard_obj = models.Wizard.objects.create(url_name=url_name) wizard_obj.save() - self.stdout.write('* Wizard "%s" added\n' % url_name) + #self.stdout.write('* Wizard "%s" added\n' % url_name) + sys.stdout.write('* Wizard "%s" added\n' % url_name) wizard_steps[url_name] = [] for idx, step_url_name in enumerate(wizard.form_list.keys()): form = wizard.form_list[step_url_name] @@ -59,7 +62,10 @@ class Command(BaseCommand): 'url_name':step_url_name}) step_obj = models.WizardStep.objects.create(**step_values) step_obj.save() - self.stdout.write('* Wizard step "%s" added\n' \ + #self.stdout.write('* Wizard step "%s" added\n' \ + # % unicode(form.form_label)) + sys.stdout.write('* Wizard step "%s" added\n' \ % unicode(form.form_label)) wizard_steps[url_name].append(step_url_name) - self.stdout.write('Successfully regeneration of wizard rights\n') + #self.stdout.write('Successfully regeneration of wizard rights\n') + sys.stdout.write('Successfully regeneration of wizard rights\n') -- cgit v1.2.3