mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-08 18:10:20 +02:00
Translate models in english
This commit is contained in:
@ -3,7 +3,7 @@ from sys import stdin
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.management import BaseCommand
|
||||
from media.models import BD, FutureMedia, Manga, Roman
|
||||
from media.models import Comic, FutureMedium, Manga, Novel
|
||||
from media.validators import isbn_validator
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
type_str = options["media_type"]
|
||||
|
||||
media_classes = [BD, Manga, Roman, FutureMedia]
|
||||
media_classes = [Comic, Manga, Novel, FutureMedium]
|
||||
|
||||
file = options["input"]
|
||||
isbns = []
|
||||
@ -70,7 +70,7 @@ class Command(BaseCommand):
|
||||
if isbn_exists:
|
||||
continue
|
||||
|
||||
FutureMedia.objects.create(isbn=isbn, type=type_str)
|
||||
FutureMedium.objects.create(isbn=isbn, type=type_str)
|
||||
self.stdout.write(self.style.SUCCESS("ISBN {isbn} imported"
|
||||
.format(isbn=isbn)))
|
||||
imported += 1
|
||||
|
Reference in New Issue
Block a user