﻿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
25278	call_command should allow the first param to be a module	Mike Lissner	nobody	"The current API for the call_command function is:

   call_command(name, *args, **options)

Where `name` is a string, args is a list, and options is a dict. So in my tests.py, I have a line of code like:

    call_command('my_custom_command')

This works pretty well, but it limits my ability to rename the command. If instead I were able to write:

    from my_app.management.commands import my_custom_command
    call_command(my_custom_command)

That would mean that my IDE could automatically update this code if I ever renamed the file. (Most IDEs I'm familiar with can do refactoring of module and file names, but fall down if those names are in strings or comments.)

In call_command, a simple test could be made to convert the module to a string if needed, and then run as it does presently. To me, this makes sense as the recommended API for call_command. 

If others agree, I think we should treat this in the documentation the same way as we do the initialization of ForeignKey, where you can either write:

    my_key = models.ForeignKey('Book') 

or 

    from my_app.models import Book
    my_key = models.ForeignKey(Book)

With the emphasis being on the latter."	New feature	closed	Core (Management commands)	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
