Command.__handle__ instead of Command.handle
|Reported by:||hvendelbo||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I can see why the Command class convention is highly desirable. But wouldn't it make more sense to run a command using a call function rather than a handle function?
The current pattern for writing Django Commands has a Javaesque base library dependency. Given how popular commands already are today, it would be desirable to make it easy
to write commands that are independent of Django modules.
A command is a callable object with option_list, help, args attributes is a convention that would be useful in Python in general.
Change History (2)
comment:1 Changed 6 years ago by hvendelbo
- Component changed from Uncategorized to Core framework
- Keywords commands added
- milestone set to 1.0 alpha
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset