<s> from django . contrib . auth . models import User <EOL> from django . core . management . base import BaseCommand <EOL> from django . utils . translation import ugettext as _ <EOL> from optparse import make_option <EOL> from onadata . libs . utils . briefcase_client import BriefcaseClient <EOL> class Command ( BaseCommand ) : <EOL> help = _ ( "<STR_LIT>" ) <EOL> option_list = BaseCommand . option_list + ( <EOL> make_option ( '<STR_LIT>' , <EOL> help = _ ( "<STR_LIT>" ) ) , <EOL> make_option ( '<STR_LIT>' , '<STR_LIT>' , <EOL> help = _ ( "<STR_LIT>" ) ) , <EOL> make_option ( '<STR_LIT>' , '<STR_LIT>' , <EOL> help = _ ( "<STR_LIT>" ) ) , <EOL> make_option ( '<STR_LIT>' , <EOL> help = _ ( "<STR_LIT>" ) ) , <EOL> ) <EOL> def handle ( self , * args , ** kwargs ) : <EOL> url = kwargs . get ( '<STR_LIT:url>' ) <EOL> username = kwargs . get ( '<STR_LIT:username>' ) <EOL> password = kwargs . get ( '<STR_LIT:password>' ) <EOL> to = kwargs . get ( '<STR_LIT:to>' ) <EOL> user = User . objects . get ( username = to ) <EOL> bc = BriefcaseClient ( username = username , password = password , <EOL> user = user , url = url ) <EOL> bc . download_xforms ( include_instances = True ) </s>
