def precompile_python_code(context: Context):
    """
    Pre-compiles python modules
    """
    from compileall import compile_dir

    kwargs = {}
    if context.verbosity < 2:
        kwargs['quiet'] = True
    compile_dir(context.app.django_app_name, **kwargs)
Pre-compiles python modules