1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-09 10: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

@ -3,7 +3,7 @@ from sys import stdin
from django.core.management import BaseCommand
from media.forms import generate_side_identifier
from media.models import Roman, Auteur
from media.models import Novel, Author
class Command(BaseCommand):
@ -28,10 +28,10 @@ class Command(BaseCommand):
continue
title = book[1]
authors = [Auteur.objects.get_or_create(name=n)[0]
authors = [Author.objects.get_or_create(name=n)[0]
for n in book[0].split(';')]
side_identifier = generate_side_identifier(title, authors)
roman = Roman.objects.create(
roman = Novel.objects.create(
title=title,
side_identifier=side_identifier,
)