def add_trip_event(trip_id): """grabs the data from addEventForm in trip_details.js file""" new_event_name = request.form.get('eventFormInput') new_event_date = request.form.get('eventDateInput') new_event_details = request.form.get('eventDescriptionInput') data = {'new_event_name': new_event_name, 'new_event_date': new_event_date, 'new_event_details': new_event_details} newEvent = crud.create_event(trip_id=trip_id, event_name=new_event_name, event_date=new_event_date, event_details=new_event_details) return jsonify(data)
def create_new_event(trip_id): """shows a form to create a new event and adds it to trip_details page""" destination = crud.get_trip_name(trip_id) name_of_event = request.form.get('event_name') new_event_object = crud.create_event(trip_id=trip_id, event_name=name_of_event) if new_event_object: flash(f"You've added {name_of_event} to your trip to {destination}.") else: flash("Sorry, we couldn't add your trip. Please try again.") return redirect(f'/trips/{trip_id}/event/new')
def new_event(): """Return a new event""" user_id1 = request.form.get("user_id") user_id = int(user_id1) event_title = request.form.get("event_title") description = request.form.get("description") date = request.form.get("date") event = crud.create_event(user_id, event_title, description, date) event_item = { 'event_id': event.event_id, 'event_title': event.event_title, 'description': event.description, 'date': event.date, } return jsonify(event_item)
def create_new_event(): """Creates a new event""" if session.get("user"): host_id = session["user"] city = request.json.get("city") state = request.json.get("state") eventDate = request.json.get("eventDate") startTime = request.json.get("startTime") endTime = request.json.get("endTime") # attendee = crud.get_user_by_id(host_id) new_event = crud.create_event(host_id, city, eventDate, startTime, endTime, state) crud.create_event_attendee(host_id, new_event.id) return jsonify ({"success": f"Your event has successfully been created for {eventDate} at {startTime}"}) else: return jsonify ({"error": "There was an error creating this event."})
def events(): """Rendering event template """ user = crud.get_user_by_email(session['email']) user_id = user.user_id phone = user.phone_number event_title = request.form.get('event_title') event_text = request.form.get('reminder_text') # event_time = request.form.get('event-time') #for future use event_time = datetime.now() # created_at = event_time.astimezone(get_localzone()) # reminder_status = request.form.get('reminder') reminder_status = "Sent" print('reminder_status', reminder_status) # if event_time: #for future use # created_at = datetime.strptime(str(event_time), "%Y-%m-%d %H:%M:%S.%f") # event = crud.create_event(user_id,event_title,event_text,reminder_status, created_at) if request.method == "POST": event = crud.create_event(user_id, event_title, event_text, reminder_status, event_time) if reminder_status == 'Sent': print('For testing: ******************yes******************') # twilio(phone,event_text) event_dict = {} event_objects = crud.get_event_by_user_id(user_id) for index, obj in enumerate(event_objects): event_dict[index] = {} event_dict[index]['event_title'] = obj.event_title, event_dict[index]['reminder_status'] = obj.reminder_status event_dict[index]['created_at'] = obj.created_at print(event_dict) return render_template('events.html', event_dict=event_dict)
new_users.append(new_user) # Create fake events for testing new_events = [] for n in range(6): host_id = n + 1 city = f"City {n}" state = f"S{n}" event_date = f"2021-02-1{n}" start_time = f"1{n}:00" end_time = f"20:1{n}" new_event = crud.create_event(host_id, city, event_date, start_time, end_time, state) new_events.append(new_event) # Create fake user_events for testing for n in range(4): random_user = choice(new_users) event = new_event crud.create_event_attendee(random_user.id, event.id) # Create fake event_books for testing random_book = choice(new_books) crud.create_event_book(event, random_book) # CHANGE # Create fake categories for testing new_categories = []
crud.create_user(fname, lname, email, password, phone, image) #**** --------- Events Data --------- ****# #**** ------------------------------- ****# with open('data/events.json') as e: events_data = json.loads(e.read()) for event in events_data: event_type = event['event_type'] event_name = event['event_name'] event_start_date = datetime.strptime(event['event_start_date'],'%Y-%m-%d %H:%M') event_end_date = datetime.strptime(event['event_end_date'],'%Y-%m-%d %H:%M') event_description = event['event_description'] event_photo = event['event_photo'] crud.create_event(event_type, event_name, event_start_date, event_end_date, event_description, event_photo)
def get_create_user_events(): """Creates, adds, removes, or returns user's events, hosting and attending""" if request.method == "POST": if session.get("user_id"): host_id = session["user_id"] city = request.json.get("city") state = request.json.get("state") eventDate = request.json.get("eventDate") startTime = request.json.get("startTime") endTime = request.json.get("endTime") new_event = crud.create_event(host_id, city, eventDate, startTime, endTime, state) # Add host as an attendee of the event crud.create_event_attendee(host_id, new_event.id) return jsonify({ "success": f"Your event has successfully been created for {eventDate} at {startTime}" }) else: return jsonify( {"error": "There was an error creating this event."}) elif request.method == "GET": if session.get("user_id"): user_id = session["user_id"] users_events = crud.get_all_events_for_user(user_id) # A list of the user's event objects if users_events: users_events_dict = { "hosting": { "past": [], "upcoming": [] }, "attending": { "past": [], "upcoming": [] } } for event in users_events: events_books = crud.get_all_events_books(event.id) events_books = [ event_book.to_dict() for event_book in events_books ] books = crud.get_all_books_for_event(event.id) books = [book.to_dict() for book in books] host = crud.get_user_by_id(event.host_id) event = event.to_dict() event["books"] = books event["events_books"] = events_books event["host"] = f"{host.first_name} {host.last_name}" today = date.today() if event["host_id"] == user_id: if today <= event["event_date"]: users_events_dict["hosting"]["upcoming"].append( event) else: users_events_dict["hosting"]["past"].append(event) else: if today <= event["event_date"]: users_events_dict["attending"]["upcoming"].append( event) else: users_events_dict["attending"]["past"].append( event) if len(users_events_dict["hosting"]["upcoming"]) == 0: users_events_dict["hosting"]["upcoming"] = None if len(users_events_dict["hosting"]["past"]) == 0: users_events_dict["hosting"]["past"] = None elif len(users_events_dict["attending"]["upcoming"]) == 0: users_events_dict["attending"]["upcoming"] = None elif len(users_events_dict["attending"]["past"]) == 0: users_events_dict["attending"]["past"] = None return jsonify(users_events_dict) else: return jsonify({ "hosting": { "past": None, "upcoming": None }, "attending": { "past": None, "upcoming": None } }) else: return jsonify( {'error': 'User must be logged in to view their events.'}) user_id = session.get("user_id") event_id = request.json.get("event") event = crud.get_event_by_id(event_id) user = crud.get_user_by_id(user_id) attendees = crud.get_all_attendees(event_id) if request.method == "DELETE": if user not in attendees: return jsonify({"error": "You are not attending this event"}) crud.remove_attendee_from_event(user_id, event_id) return jsonify({ "success": f"You are no longer attending the {event.city} book club on {event.event_date}" }) elif request.method == "PUT": if user in attendees: return jsonify({"error": "You are already attending this event"}) crud.create_event_attendee(user_id, event_id) return jsonify({ "success": f"You are now attending the {event.city} book club on {event.event_date}!" })
def test_data(): #create books for testing harry_potter = crud.create_book( "oxxszQEACAAJ", "Harry Potter and the Half-Blood Prince", "J. K. Rowling", "Harry Potter, now sixteen-years-old, begins his sixth year at school in the midst of the battle between good and evil which has heated up with the return of the Dark Lord Voldemort.", 652, "http://books.google.com/books/content?id=oxxszQEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api" ) neverwhere = crud.create_book( "yuCUZ3km3qIC", "Neverwhere", "Neil Gaiman", "Richard Mayhew is a young man with a good heart and an ordinarylife, which is changed forever when he stops to help a girl he finds bleeding on a London sidewalk. His small act of kindness propels him into a world he never dreamed existed. There are people who fall through the cracks, and Richard has become one of them. And he must learn to survive in this city of shadows and darkness, monsters and saints, murderers and angels, if he is ever to return to the London that he knew.", 400, "http://books.google.com/books/content?id=yuCUZ3km3qIC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) bees = crud.create_book( "FiIXot_e10sC", "The Secret Life of Bees", "Sue Monk Kidd", "After her \"stand-in mother,\" a bold black woman named Rosaleen, insults the three biggest racists in town, Lily Owens joins Rosaleen on a journey to Tiburon, South Carolina, where they are taken in by three black, bee-keeping sisters.", 317, "http://books.google.com/books/content?id=FiIXot_e10sC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) hidden = crud.create_book( "bxahDwAAQBAJ", "Hidden Valley Road", "Robert Kolker", "OPRAH’S BOOK CLUB PICK #1 NEW YORK TIMES BESTSELLER ONE OF THE NEW YORK TIMES TOP TEN BOOKS OF THE YEAR ONE OF THE WALL STREET JOURNAL TOP TEN BOOKS OF THE YEAR PEOPLE'S #1 BEST BOOK OF THE YEAR Named a BEST BOOK OF THE YEAR by The New York Times, The Washington Post, NPR, TIME, Slate, Smithsonian, The New York Post, and Amazon The heartrending story of a midcentury American family with twelve children, six of them diagnosed with schizophrenia, that became science's great hope in the quest to understand the disease. Don and Mimi Galvin seemed to be living the American dream. After World War II, Don's work with the Air Force brought them to Colorado, where their twelve children perfectly spanned the baby boom: the oldest born in 1945, the youngest in 1965. In those years, there was an established script for a family like the Galvins--aspiration, hard work, upward mobility, domestic harmony--and they worked hard to play their parts. But behind the scenes was a different story: psychological breakdown, sudden shocking violence, hidden abuse. By the mid-1970s, six of the ten Galvin boys, one after another, were diagnosed as schizophrenic. How could all this happen to one family? What took place inside the house on Hidden Valley Road was so extraordinary that the Galvins became one of the first families to be studied by the National Institute of Mental Health. Their story offers a shadow history of the science of schizophrenia, from the era of institutionalization, lobotomy, and the schizophrenogenic mother to the search for genetic markers for the disease, always amid profound disagreements about the nature of the illness itself. And unbeknownst to the Galvins, samples of their DNA informed decades of genetic research that continues today, offering paths to treatment, prediction, and even eradication of the disease for future generations. With clarity and compassion, bestselling and award-winning author Robert Kolker uncovers one family's unforgettable legacy of suffering, love, and hope.", 400, "http://books.google.com/books/content?id=bxahDwAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) crawdads = crud.create_book( "CGVDDwAAQBAJ", "Where the Crawdads Sing", "Delia Owens", "#1 New York Times Bestseller A Reese Witherspoon x Hello Sunshine Book Club Pick \"I can't even express how much I love this book! I didn't want this story to end!\"--Reese Witherspoon \"Painfully beautiful.\"--The New York Times Book Review \"Perfect for fans of Barbara Kingsolver.\"--Bustle For years, rumors of the \"Marsh Girl\" have haunted Barkley Cove, a quiet town on the North Carolina coast. So in late 1969, when handsome Chase Andrews is found dead, the locals immediately suspect Kya Clark, the so-called Marsh Girl. But Kya is not what they say. Sensitive and intelligent, she has survived for years alone in the marsh that she calls home, finding friends in the gulls and lessons in the sand. Then the time comes when she yearns to be touched and loved. When two young men from town become intrigued by her wild beauty, Kya opens herself to a new life--until the unthinkable happens. Perfect for fans of Barbara Kingsolver and Karen Russell, Where the Crawdads Sing is at once an exquisite ode to the natural world, a heartbreaking coming-of-age story, and a surprising tale of possible murder. Owens reminds us that we are forever shaped by the children we once were, and that we are all subject to the beautiful and violent secrets that nature keeps.", 384, "http://books.google.com/books/content?id=CGVDDwAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) wind = crud.create_book( "BcG2dVRXKukC", "The Name of the Wind", "Patrick Rothfuss", "'This is a magnificent book' Anne McCaffrey 'I was reminded of Ursula K. Le Guin, George R. R. Martin, and J. R. R. Tolkein, but never felt that Rothfuss was imitating anyone' THE TIMES 'I have stolen princesses back from sleeping barrow kings. I burned down the town of Trebon. I have spent the night with Felurian and left with both my sanity and my life. I was expelled from the University at a younger age than most people are allowed in. I tread paths by moonlight that others fear to speak of during day. I have talked to Gods, loved women, and written songs that make the minstrels weep. My name is Kvothe. You may have heard of me' So begins the tale of Kvothe - currently known as Kote, the unassuming innkeepter - from his childhood in a troupe of traveling players, through his years spent as a near-feral orphan in a crime-riddled city, to his daringly brazen yet successful bid to enter a difficult and dangerous school of magic. In these pages you will come to know Kvothe the notorious magician, the accomplished thief, the masterful musician, the dragon-slayer, the legend-hunter, the lover, the thief and the infamous assassin.", 672, "http://books.google.com/books/content?id=BcG2dVRXKukC&printsec=frontcover&img=1&zoom=1&source=gbs_api" ) addie = crud.create_book( "vH3LDwAAQBAJ", "The Invisible Life of Addie LaRue", "V. E. Schwab", "AN INSTANT NEW YORK TIMES BESTSELLER USA TODAY BESTSELLER NATIONAL INDIE BESTSELLER THE WASHINGTON POST BESTSELLER #1 Indie Next Pick and #1 LibraryReads Pick - October 2020 Recommended by Entertainment Weekly, Real Simple, NPR, Slate, and Oprah Magazine A “Best Of” Book From: CNN *Amazon Editors * Goodreads * Bustle * PopSugar * BuzzFeed * Barnes & Noble * Kirkus Reviews * Lambda Literary * Nerdette * The Nerd Daily * Polygon * Library Reads * io9 * Smart Bitches Trashy Books * LiteraryHub * Medium * BookBub * The Mary Sue * Chicago Tribune * NY Daily News * SyFy Wire * Powells.com * Bookish * Book Riot * In the vein of The Time Traveler’s Wife and Life After Life, The Invisible Life of Addie LaRue is New York Times bestselling author V. E. Schwab’s genre-defying tour de force. A Life No One Will Remember. A Story You Will Never Forget. France, 1714: in a moment of desperation, a young woman makes a Faustian bargain to live forever—and is cursed to be forgotten by everyone she meets. Thus begins the extraordinary life of Addie LaRue, and a dazzling adventure that will play out across centuries and continents, across history and art, as a young woman learns how far she will go to leave her mark on the world. But everything changes when, after nearly 300 years, Addie stumbles across a young man in a hidden bookstore and he remembers her name. At the Publisher's request, this title is being sold without Digital Rights Management Software (DRM) applied.", 480, "http://books.google.com/books/content?id=vH3LDwAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) mistborn = crud.create_book( "t_ZYYXZq4RgC", "Mistborn", "Brandon Sanderson", "From #1 New York Times bestselling author Brandon Sanderson, the Mistborn series is a heist story of political intrigue and magical, martial-arts action. For a thousand years the ash fell and no flowers bloomed. For a thousand years the Skaa slaved in misery and lived in fear. For a thousand years the Lord Ruler, the \"Sliver of Infinity,\" reigned with absolute power and ultimate terror, divinely invincible. Then, when hope was so long lost that not even its memory remained, a terribly scarred, heart-broken half-Skaa rediscovered it in the depths of the Lord Ruler's most hellish prison. Kelsier \"snapped\" and found in himself the powers of a Mistborn. A brilliant thief and natural leader, he turned his talents to the ultimate caper, with the Lord Ruler himself as the mark. Kelsier recruited the underworld's elite, the smartest and most trustworthy allomancers, each of whom shares one of his many powers, and all of whom relish a high-stakes challenge. Only then does he reveal his ultimate dream, not just the greatest heist in history, but the downfall of the divine despot. But even with the best criminal crew ever assembled, Kel's plan looks more like the ultimate long shot, until luck brings a ragged girl named Vin into his life. Like him, she's a half-Skaa orphan, but she's lived a much harsher life. Vin has learned to expect betrayal from everyone she meets, and gotten it. She will have to learn to trust, if Kel is to help her master powers of which she never dreamed. This saga dares to ask a simple question: What if the hero of prophecy fails? Other Tor books by Brandon Sanderson The Cosmere The Stormlight Archive The Way of Kings Words of Radiance Edgedancer (Novella) Oathbringer The Mistborn trilogy Mistborn: The Final Empire The Well of Ascension The Hero of Ages Mistborn: The Wax and Wayne series Alloy of Law Shadows of Self Bands of Mourning Collection Arcanum Unbounded Other Cosmere novels Elantris Warbreaker The Alcatraz vs. the Evil Librarians series Alcatraz vs. the Evil Librarians The Scrivener's Bones The Knights of Crystallia The Shattered Lens The Dark Talent The Rithmatist series The Rithmatist Other books by Brandon Sanderson The Reckoners Steelheart Firefight Calamity At the Publisher's request, this title is being sold without Digital Rights Management Software (DRM) applied.", 544, "http://books.google.com/books/content?id=t_ZYYXZq4RgC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) kings = crud.create_book( "QVn-CgAAQBAJ", "The Way of Kings", "Brandon Sanderson", "Introduces the world of Roshar through the experiences of a war-weary royal compelled by visions, a highborn youth condemned to military slavery, and a woman who is desperate to save her impoverished house.", 1007, "http://books.google.com/books/content?id=QVn-CgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) evelyn = crud.create_book( "PxNcDwAAQBAJ", "The 7 1⁄2 Deaths of Evelyn Hardcastle", "Stuart Turton", "\"Agatha Christie meets Groundhog Day...quite unlike anything I've ever read, and altogether triumphant.\"—A. J. Finn, #1 New York Times-bestselling author of The Woman in the Window The Rules of Blackheath Evelyn Hardcastle will be murdered at 11:00 p.m. There are eight days, and eight witnesses for you to inhabit. We will only let you escape once you tell us the name of the killer. Understood? Then let's begin... *** Evelyn Hardcastle will die. Every day until Aiden Bishop can identify her killer and break the cycle. But every time the day begins again, Aiden wakes up in the body of a different guest. And some of his hosts are more helpful than others. For fans of Claire North and Kate Atkinson, The 71⁄2 Deaths of Evelyn Hardcastle is a breathlessly addictive novel that follows one man's race against time to find a killer—but an astonishing time-turning twist means that nothing and no one are quite what they seem. Praise for The 7 1⁄2 Deaths of Evelyn Hardcastle: Costa First Novel Award 2018 Winner One of Stylist Magazine's 20 Must-Read Books of 2018 One of Harper's Bazaar's 10 Must-Read Books of 2018 One of Guardian's Best Books of 2018", 480, "http://books.google.com/books/content?id=PxNcDwAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api" ) #create users for testing new_users = [] hunter = crud.create_user("Hunter", "Laine", "*****@*****.**", "test") haley = crud.create_user("Haley", "Laine", "*****@*****.**", "test") connor = crud.create_user("Connor", "Laine", "*****@*****.**", "test") steven = crud.create_user("Steven", "Laine", "*****@*****.**", "test") mary = crud.create_user("Mary", "Laine", "*****@*****.**", "test") jake = crud.create_user("Jake", "Laine", "*****@*****.**", "test") # Create fake events for testing event_1 = crud.create_event(1, "Pleasanton", "2021-03-26", "18:00", "20:00", "CA") event_2 = crud.create_event(2, "Berkeley", "2021-03-19", "19:00", "21:00", "CA") event_3 = crud.create_event(3, "San Francisco", "2021-04-09", "20:00", "22:00", "CA") event_4 = crud.create_event(4, "Remote", "2021-04-22", "18:00", "20:00") event_5 = crud.create_event(5, "Lafayette", "2021-04-14", "17:00", "19:00", "CA") event_6 = crud.create_event(6, "Oakland", "2021-05-05", "18:00", "20:00", "CA") # Create fake events_attendees for testing crud.create_event_attendee(hunter.id, event_1.id) crud.create_event_attendee(haley.id, event_1.id) crud.create_event_attendee(mary.id, event_2.id) crud.create_event_attendee(steven.id, event_2.id) crud.create_event_attendee(hunter.id, event_3.id) crud.create_event_attendee(connor.id, event_3.id) crud.create_event_attendee(jake.id, event_4.id) crud.create_event_attendee(haley.id, event_4.id) crud.create_event_attendee(hunter.id, event_5.id) crud.create_event_attendee(steven.id, event_5.id) crud.create_event_attendee(mary.id, event_6.id) crud.create_event_attendee(jake.id, event_6.id) crud.create_event_attendee(connor.id, event_3.id) crud.create_event_attendee(haley.id, event_2.id) crud.create_event_attendee(steven.id, event_1.id) # Create fake event_books for testing crud.create_event_book(event_1, evelyn) crud.create_event_book(event_2, harry_potter) crud.create_event_book(event_3, wind) crud.create_event_book(event_4, bees) crud.create_event_book(event_5, mistborn) crud.create_event_book(event_6, kings) crud.create_event_book(event_1, harry_potter) crud.create_event_book(event_2, mistborn) crud.create_event_book(event_3, crawdads) crud.create_event_book(event_4, neverwhere) crud.create_event_book(event_5, hidden) crud.create_event_book(event_6, evelyn) crud.create_event_book(event_1, addie) crud.create_event_book(event_2, wind) crud.create_event_book(event_3, harry_potter) crud.create_event_book(event_4, hidden) crud.create_event_book(event_5, crawdads) crud.create_event_book(event_6, addie) crud.create_event_book(event_1, bees) crud.create_event_book(event_2, evelyn) crud.create_event_book(event_3, addie) crud.create_event_book(event_4, crawdads) crud.create_event_book(event_5, neverwhere) crud.create_event_book(event_6, mistborn) # Create fake categories for testing hunter_cat_1 = crud.create_category(1, "Book Club") hunter_cat_2 = crud.create_category(1, "Want to Read") hunter_cat_3 = crud.create_category(1, "My Favorite Books") haley_cat_1 = crud.create_category(2, "Book Club") haley_cat_2 = crud.create_category(2, "Thrillers") haley_cat_3 = crud.create_category(2, "Beach Reads") connor_cat_1 = crud.create_category(3, "Non-Fiction") connor_cat_2 = crud.create_category(3, "Learn Something New") connor_cat_3 = crud.create_category(3, "My Favorite Books") steven_cat_1 = crud.create_category(4, "Want to Read") steven_cat_2 = crud.create_category(4, "Books to Recommend") steven_cat_3 = crud.create_category(4, "My Favorite Books") mary_cat_1 = crud.create_category(5, "Book Club") mary_cat_2 = crud.create_category(5, "Beach Reads") mary_cat_3 = crud.create_category(5, "Classics") jake_cat_1 = crud.create_category(6, "Historical Fiction") jake_cat_2 = crud.create_category(6, "Classics") jake_cat_3 = crud.create_category(6, "My Favorite Books") # Create fake book_categories for testing crud.create_book_category(hidden, hunter_cat_1) crud.create_book_category(addie, hunter_cat_1) crud.create_book_category(wind, hunter_cat_2) crud.create_book_category(kings, hunter_cat_2) crud.create_book_category(mistborn, hunter_cat_2) crud.create_book_category(wind, hunter_cat_3) crud.create_book_category(harry_potter, hunter_cat_3) crud.create_book_category(addie, haley_cat_1) crud.create_book_category(hidden, haley_cat_1) crud.create_book_category(wind, haley_cat_2) crud.create_book_category(evelyn, haley_cat_2) crud.create_book_category(mistborn, haley_cat_2) crud.create_book_category(bees, haley_cat_3) crud.create_book_category(crawdads, haley_cat_3) crud.create_book_category(addie, connor_cat_1) crud.create_book_category(hidden, connor_cat_1) crud.create_book_category(wind, connor_cat_1) crud.create_book_category(evelyn, connor_cat_2) crud.create_book_category(mistborn, connor_cat_2) crud.create_book_category(bees, connor_cat_3) crud.create_book_category(crawdads, connor_cat_3) crud.create_book_category(addie, steven_cat_1) crud.create_book_category(hidden, steven_cat_1) crud.create_book_category(wind, steven_cat_1) crud.create_book_category(evelyn, steven_cat_2) crud.create_book_category(mistborn, steven_cat_2) crud.create_book_category(bees, steven_cat_3) crud.create_book_category(crawdads, steven_cat_3) crud.create_book_category(addie, mary_cat_1) crud.create_book_category(neverwhere, mary_cat_1) crud.create_book_category(wind, mary_cat_1) crud.create_book_category(evelyn, mary_cat_2) crud.create_book_category(mistborn, mary_cat_2) crud.create_book_category(bees, mary_cat_3) crud.create_book_category(crawdads, mary_cat_3) crud.create_book_category(harry_potter, jake_cat_1) crud.create_book_category(hidden, jake_cat_1) crud.create_book_category(wind, jake_cat_1) crud.create_book_category(evelyn, jake_cat_2) crud.create_book_category(mistborn, jake_cat_2) crud.create_book_category(bees, jake_cat_3) crud.create_book_category(kings, jake_cat_3)