﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5222	Ability for end users to register commands with management.py.	dnordberg@…	Adrian Holovaty	"Changeset [5923] added the ability for end users to register commands with management.py. This was rolled out [5923]-[5925] due to breaking call_command().

I've patched init.py to allow users to register commands with management.py without breaking call_command.

A bit of a hack, but it works. Basically, I set a global dict _DJANGO_COMMANDS to hold all default commands and update itself with project specific commands when DJANGO_SETTINGS_MODULE is set.

call_command changes to:
{{{
 def call_command(name, *args, **options):
     """"""
@@ -26,7 +69,7 @@
         call_command('shell', plain=True)
         call_command('sqlall', 'myapp')
     """"""
-    klass = load_command_class(name)
+    klass = getattr(__import__(_DJANGO_COMMANDS[name].__module__, {}, {}, ['Command']), 'Command')()

}}}"		closed	Core (Other)	dev		fixed	management commands		Unreviewed	1	0	0	0	0	0
