1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-08 06:50:19 +02:00

Translate models in english

This commit is contained in:
2021-10-23 18:31:03 +02:00
parent 2a17a32d4c
commit 52ecd59bf6
21 changed files with 210 additions and 155 deletions

View File

@ -2,7 +2,7 @@ from argparse import FileType
from sys import stdin
from django.core.management import BaseCommand
from media.models import Auteur, Vinyle
from media.models import Author, Vinyl
class Command(BaseCommand):
@ -36,9 +36,9 @@ class Command(BaseCommand):
title = vinyle[1 if rpm == 33 else 2]
authors_str = vinyle[2 if rpm == 33 else 1]\
.split('|' if rpm == 33 else ';')
authors = [Auteur.objects.get_or_create(name=author)[0]
authors = [Author.objects.get_or_create(name=author)[0]
for author in authors_str]
vinyle, created = Vinyle.objects.get_or_create(
vinyle, created = Vinyl.objects.get_or_create(
title=title,
side_identifier=side,
rpm=rpm,