def build_assets():
cwd = os.getcwd()<EOL>try:<EOL><INDENT>from webassets.script import GenericArgparseImplementation<EOL>from django_assets.env import get_env<EOL>prog = "<STR_LIT>" % os.path.basename(sys.argv[<NUM_LIT:0>])<EOL>impl = GenericArgparseImplementation(<EOL>env=get_env(), log=LOGGER, no_global_options=True, prog=prog)<EOL>impl.run_with_argv(["<STR_LIT>"])<EOL><DEDENT>except ImportError:<EOL><INDENT>pass<EOL><DEDENT>os.chdir(cwd)<EOL>
Call django_assets ./manage.py assets build if the app is present.