﻿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
25736	Define management commands via function	Olivier Le Thanh Duong	nobody	"Creating a new management command currently require a lot of boilerplate to remember, a small part of it is having to subclass a command. This is often overkill when you just have a function and don't need complex arguments parsing.

So I'm proposing to allow using function for Command.

I'm attaching an idea of an implementation but I'm not really set on it. This would allow to write:


{{{
    from django.core.management.base import LabelCommand

    def print_label(label):
        ""Help message""
        print label

    Command = LabelCommand.from_func(print_label, can_import_settings=False)
}}}

Proposed implementation: https://github.com/django/django/compare/master...olethanh:ticket_27536?expand=1"	New feature	closed	Core (Management commands)	dev	Normal	wontfix			Unreviewed	1	1	1	1	0	0
