Django command: How to insert newline in the help text?
Question: I was looking to do something like this, but for a Django management command:
[Python argparse: How to insert newline in the help
text?](http://stackoverflow.com/questions/3853722/python-argparse-how-to-
insert-newline-in-the-help-text)


Answer: You can do the following to set the formatter_class on the ArgumentParser
Django creates for you:

    
    
    from argparse import RawTextHelpFormatter
    from django.core.management.base import BaseCommand
    
    
    class Command(BaseCommand):
        def create_parser(self, *args, **kwargs):
            parser = super(Command, self).create_parser(*args, **kwargs)
            parser.formatter_class = RawTextHelpFormatter
            return parser
    

