'Returns the static files serving handler wrapping the default handler,
if static files should be served. Otherwise just returns the default
handler.'

def get_handler(self, *args, **options):

    handler = super(Command, self).get_handler(*args, **options)
    use_static_handler = options.get('use_static_handler', True)
    insecure_serving = options.get('insecure_serving', False)
    if (use_static_handler and (settings.DEBUG or insecure_serving)):
        return StaticFilesHandler(handler)
    return handler
