<s> import sys , os <EOL> from django . core . management import setup_environ <EOL> sys . path . append ( '<STR_LIT>' ) <EOL> sys . path . append ( '<STR_LIT>' ) <EOL> import settings <EOL> setup_environ ( settings ) <EOL> from summary_data . models import District , Candidate_Overlay <EOL> fundraising_threshold = <NUM_LIT> <EOL> for office in [ '<STR_LIT:H>' ] : <EOL> races = District . objects . filter ( office = office , open_seat = False ) . order_by ( '<STR_LIT>' ) <EOL> for race in races : <EOL> incumbent_party = race . incumbent_party <EOL> primary_challengers = Candidate_Overlay . objects . filter ( district = race , is_incumbent = False , party = incumbent_party , total_receipts__gte = fundraising_threshold ) . exclude ( not_seeking_reelection = True ) <EOL> if primary_challengers : <EOL> print "<STR_LIT>" % ( race . incumbent_name , race . incumbent_party , race . rothenberg_rating_text , race . state , race . office , race . office_district ) <EOL> for challenger in primary_challengers : <EOL> print "<STR_LIT>" % ( challenger . name , challenger . party , challenger . total_receipts , challenger . cash_on_hand , challenger . cash_on_hand_date ) </s>
