I want to use the global doctstring in my command help. This a working example:
"""
This is a global description.
Usage:
Use it like so::
$ python my_fancy_script <my_fancy_name>
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import django.core.management as management
logger = logging.getLogger(__name__)
class Command(management.base.BaseCommand):
"""
This is a local doc.
"""
args = '<work_db_name>'
help = globals()['__doc__']
This feels hacky and I was wondering is there is another way to specifically use the global docstring. Once you do
help = '__doc__'
the local description, that is, the Command
's docstring will be used.