def put_websites(websites): """ adds Website records to DB from a list of xml website tags Keyword arguments: websites -- list of website xml tags no return """ group_list = [] website_list = [] if websites is not None: for website in websites: url = get_text(website.find('url')) group = get_text(website.find('group')) group = Faculty4.addResearchGroup(group) group_list.append(group) authors = website.findall('author') author_list = put_names(authors) website_list.append(Faculty4.addWebsite(url, group, author_list)) for g in group_list: db.put(g) return website_list
def put_research_groups(research_groups): """ makes DB ResearchGroup objects, associating them with their person Keyword arguments: research_groups -- list of research_area xml tags Return: list of objects """ l = [] if research_groups is not None: for research_group in research_groups: l.append(Faculty4.addResearchGroup(get_text(research_group))) return l