Django Commands

Using previously defined Main classes it’s possible to wrap it as a Django command:

from import Main

class FooMain(Main):
    description = 'Foo main'

    commands = (

class FooDjangoCommand(DjangoCommand):
    main_class = FooMain

This class handles the django commands arguments as well as passing them to run method.

class DjangoCommand(*args, **kwargs)[source]

Wrapper that makes a Django command from a Main class, including parsers only for commands.