2024-01-19

Goal

Busy with the Twitch Stream today, worked on developing how to select fighters.

Notes

Needed to Django Bulk Upload for names in the Fighters App.

from fighters.models import FighterName
import json
from itertools import islice

with open(r"C:\Users\Billy\Documents\HitHub\bulk_uploads\Fighters\fighter_names.json", "r") as f:
    fighter_name_data = json.load(f)



# Build up the objects data
objs = []
for _, name_data in fighter_name_data.items():
    objs.append(FighterName(
        text = name_data["title"],
        type = name_data["type"],
        rarity = name_data["rarity"],
    ))

FighterName.objects.bulk_create(objs)

Results

  • Created a new Django Model for Names (Prefix / Suffix / Base Name)

Next Time


Previous Note 2024-01-08 Next Note 2024-01-20