<s> import os <EOL> import sys <EOL> from optparse import OptionParser <EOL> from django . conf import settings <EOL> from django . core . management import call_command <EOL> def main ( ) : <EOL> """<STR_LIT>""" <EOL> parser = OptionParser ( ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , type = "<STR_LIT:int>" , default = <NUM_LIT:1> ) <EOL> options , args = parser . parse_args ( ) <EOL> try : <EOL> app_path = args [ <NUM_LIT:0> ] <EOL> except IndexError : <EOL> print "<STR_LIT>" <EOL> raise SystemExit <EOL> else : <EOL> if app_path . endswith ( "<STR_LIT:/>" ) : <EOL> app_path = app_path [ : - <NUM_LIT:1> ] <EOL> parent_dir , app_name = os . path . split ( app_path ) <EOL> sys . path . insert ( <NUM_LIT:0> , parent_dir ) <EOL> settings . configure ( ** { <EOL> "<STR_LIT>" : options . DATABASE_ENGINE , <EOL> "<STR_LIT>" : options . DATABASE_NAME , <EOL> "<STR_LIT>" : options . DATABASE_USER , <EOL> "<STR_LIT>" : options . DATABASE_PASSWORD , <EOL> "<STR_LIT>" : options . SITE_ID , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ) , <EOL> "<STR_LIT>" : ( <EOL> os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" ) , <EOL> ) , <EOL> "<STR_LIT>" : ( <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> app_name , <EOL> ) , <EOL> } ) <EOL> call_command ( "<STR_LIT:test>" ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
