Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update instr list & increase instr name lgth #146

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Command(BaseCommand):
OUTPUT_DIR = os.path.join(
settings.STATIC_ROOT, "instruments", "images", "instrument_imgs"
)
CSV_PATH = "startup_data/vim_instruments_with_images-15sept.csv"
CSV_PATH = "startup_data/all_instruments_16aug_2024.csv"

help = "Download images and create thumbnails for instruments"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def create_database_objects(

def handle(self, *args, **options) -> None:
with open(
"startup_data/vim_instruments_with_images-15sept.csv", encoding="utf-8-sig"
"startup_data/all_instruments_16aug_2024.csv",
encoding="utf-8-sig",
) as csvfile:
reader = csv.DictReader(csvfile)
instrument_list: list[dict] = list(reader)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.5 on 2024-08-16 16:37

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("instruments", "0002_instrument_thumbnail"),
]

operations = [
migrations.AlterField(
model_name="instrumentname",
name="name",
field=models.CharField(max_length=100),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class InstrumentName(models.Model):
instrument = models.ForeignKey("Instrument", on_delete=models.PROTECT)
language = models.ForeignKey("Language", on_delete=models.PROTECT)
name = models.CharField(max_length=50, blank=False)
name = models.CharField(max_length=100, blank=False)
source_name = models.CharField(
max_length=50, blank=False, help_text="Who or what called the instrument this?"
) # Stand-in for source data; format TBD
Loading