<s> import os <EOL> import subprocess <EOL> from django . conf import settings <EOL> from django . core . management . base import BaseCommand <EOL> ROOT = os . path . realpath ( <EOL> os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , '<STR_LIT:..>' , '<STR_LIT:..>' ) ) <EOL> def path ( * parts ) : <EOL> return os . path . join ( ROOT , * parts ) <EOL> class Command ( BaseCommand ) : <EOL> help = '<STR_LIT>' <EOL> def handle ( self , * args , ** kwargs ) : <EOL> try : <EOL> os . makedirs ( path ( '<STR_LIT>' ) ) <EOL> except OSError : <EOL> pass <EOL> try : <EOL> os . makedirs ( path ( '<STR_LIT>' ) ) <EOL> except OSError : <EOL> pass <EOL> files = os . listdir ( path ( '<STR_LIT>' ) ) <EOL> for f in files : <EOL> if f . endswith ( '<STR_LIT>' ) : <EOL> tpl = f [ : - <NUM_LIT:5> ] <EOL> cmd = '<STR_LIT>' % ( <EOL> settings . NUNJUCKS_PRECOMPILE_BIN , <EOL> path ( '<STR_LIT>' ) , <EOL> path ( '<STR_LIT>' % tpl ) ) <EOL> subprocess . call ( cmd , shell = True ) </s>
