Failed to load management commands after freezing by cx_freeze

Since it just searching .py but not .pyc files in function of find_commands() in django/core/management/__init__.py, but after freezing there is no .py files.

After changing this line 
    return [f[:-3] for f in os.listdir(command_dir) if not f.startswith('_') and f.endswith('.py')]
to 
    return [f[:f.rindex('.')] for f in os.listdir(command_dir) if not f.startswith('_') and (f.endswith('.py') or f.endswith('.pyc'))]

it works.