I would like to propose that all commands in core.management be modified to enable command output to be directed to self.stdout and self.stderr so that the command output can be captured and made accessible to an application.
I use a virtual web hosting environment where no shell access is permitted. I would like to set up an administrative web interface which enables commands to be executed and the command output redisplayed to the user. However, as commands currently send output directly to stdout or stderr, the comand output is not readily accessible (Django 1.2.1). Discussions with Russ McGee on Django Users suggested that some commands, for testing system purposes, are now sending to self.stdout and self.stderr, allowing the target to be redefined and the output to be captured. Only dumpdata and loaddata commands have currently been converted in trunk. I am proposing extending this to all commands in core.management, and suggest that this should be promoted as the norm for custom developed commands also. If agreed, the work required to implement would be: a) convert existing commands b) document the feature c) improve documentation of the existing feature allowing applications to construct their own commands d) improve documentation of how to execute commands programatically (as opposed to in a shell) If there is agreement, I am happy to undertake the above although would appreciate a mentor being available for advice from time to time as this would be my first contribution. Longer term, if an administrative web interface to commands is to be provided, we would need to devise an interface that adapted well into the existing administrative interface. However, I see this as a second stage in the process. First we need the command output to be available. Does the above proposal meet with agreement? What say you all? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.