def import_registered_jammers(filename="jammerskillz.csv"): """ Registered jammers are those who have filled out the second form (in BGJ ). They may or may not have a ticket. """ from utils import gf_fieldnames return import_jammers(filename, fieldnames=gf_fieldnames())
def import_all_jammers(sources=[dict(file='jammers.csv')], fieldnames=None): """ Handles the details """ jamsite = JamSite().load().reset() for source in sources: if "url" in source.keys(): url = source['url'] fieldnames = gf_fieldnames(source.get('fields', None)) import_from_url(jamsite, url, fieldnames) else: file = source.get("file", "Catastrophe") fieldnames = gf_fieldnames(source.get('fields', None)) import_from_file(jamsite, file, fieldnames) # Add a touch of human decisions. jamsite.apply_human() return jamsite