def handle(self, *args, **options): fp = form_parser() all_f3xwsked_es = F3X_Summary.objects.filter( total_sched_e__gte=0).values('filing_number') for filing in all_f3xwsked_es: this_filing_number = filing['filing_number'] handle_filing_num(this_filing_number, fp)
def __init__(self): self.fp = form_parser() self.FEClogger=fec_logger()
def __init__(self): self.fp = form_parser()
from django.core.management.base import BaseCommand, CommandError from django.db.models import Sum from outside_spending.models import * from outside_spending.form_parser import form_parser from outside_spending.filing import filing import csv fp = form_parser() dumpfilename = "outside_spending/data/F3X_sbdump.csv" def map_parsed_line(line): ordered_list = (line['form_type'], line['transaction_id_number'], line['expenditure_date'], line['expenditure_amount'], line['entity_type'], line['payee_first_name'], line['payee_last_name'], line['payee_organization_name'], line['payee_street_1'], line['payee_street_2'], line['payee_city'], line['filer_committee_id_number'], line['expenditure_purpose_descrip'], line['beneficiary_committee_name'], line['beneficiary_committee_fec_id'], line['conduit_name'], line['conduit_city'], line['conduit_state'], line['memo_code']) print ordered_list def process_file(filingnum, csvwriter): f1 = filing(filingnum)