Drop unusued models. Keep migration script, but this is now unusable

This commit is contained in:
Yohann D'ANELLO 2021-11-02 12:51:25 +01:00
parent 8c6828564c
commit d2ad52c15a
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 0 additions and 356 deletions

View File

@ -114,71 +114,6 @@ class Book(Medium):
verbose_name_plural = _("books") verbose_name_plural = _("books")
class OldComic(models.Model):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
subtitle = models.CharField(
verbose_name=_('subtitle'),
max_length=255,
blank=True,
)
external_url = models.URLField(
verbose_name=_('external URL'),
blank=True,
)
side_identifier = models.CharField(
verbose_name=_('side identifier'),
max_length=255,
)
authors = models.ManyToManyField(
'Author',
verbose_name=_('authors'),
)
number_of_pages = models.PositiveIntegerField(
verbose_name=_('number of pages'),
blank=True,
null=True,
)
publish_date = models.DateField(
verbose_name=_('publish date'),
blank=True,
null=True,
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
if self.subtitle:
return "{} : {}".format(self.title, self.subtitle)
else:
return self.title
class Meta:
verbose_name = _("comic")
verbose_name_plural = _("comics")
ordering = ['title', 'subtitle']
class Comic(Book): class Comic(Book):
class Meta: class Meta:
verbose_name = _("comic") verbose_name = _("comic")
@ -186,68 +121,6 @@ class Comic(Book):
ordering = ['title', 'subtitle'] ordering = ['title', 'subtitle']
class OldManga(models.Model):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
subtitle = models.CharField(
verbose_name=_('subtitle'),
max_length=255,
blank=True,
)
external_url = models.URLField(
verbose_name=_('external URL'),
blank=True,
)
side_identifier = models.CharField(
verbose_name=_('side identifier'),
max_length=255,
)
authors = models.ManyToManyField(
'Author',
verbose_name=_('authors'),
)
number_of_pages = models.PositiveIntegerField(
verbose_name=_('number of pages'),
blank=True,
null=True,
)
publish_date = models.DateField(
verbose_name=_('publish date'),
blank=True,
null=True,
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
return self.title
class Meta:
verbose_name = _("manga")
verbose_name_plural = _("mangas")
ordering = ['title']
class Manga(Book): class Manga(Book):
class Meta: class Meta:
verbose_name = _("manga") verbose_name = _("manga")
@ -255,68 +128,6 @@ class Manga(Book):
ordering = ['title', 'subtitle'] ordering = ['title', 'subtitle']
class OldNovel(models.Model):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
subtitle = models.CharField(
verbose_name=_('subtitle'),
max_length=255,
blank=True,
)
external_url = models.URLField(
verbose_name=_('external URL'),
blank=True,
)
side_identifier = models.CharField(
verbose_name=_('side identifier'),
max_length=255,
)
authors = models.ManyToManyField(
'Author',
verbose_name=_('authors'),
)
number_of_pages = models.PositiveIntegerField(
verbose_name=_('number of pages'),
blank=True,
null=True,
)
publish_date = models.DateField(
verbose_name=_('publish date'),
blank=True,
null=True,
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
return self.title
class Meta:
verbose_name = _("novel")
verbose_name_plural = _("novels")
ordering = ['title', 'subtitle']
class Novel(Book): class Novel(Book):
class Meta: class Meta:
verbose_name = _("novel") verbose_name = _("novel")
@ -324,45 +135,6 @@ class Novel(Book):
ordering = ['title', 'subtitle'] ordering = ['title', 'subtitle']
class OldVinyl(models.Model):
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
side_identifier = models.CharField(
verbose_name=_('side identifier'),
max_length=255,
)
rpm = models.PositiveIntegerField(
verbose_name=_('rounds per minute'),
choices=[
(33, _('33 RPM')),
(45, _('45 RPM')),
],
)
authors = models.ManyToManyField(
'Author',
verbose_name=_('authors'),
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
return self.title
class Meta:
verbose_name = _("vinyl")
verbose_name_plural = _("vinyls")
ordering = ['title']
class Vinyl(Medium): class Vinyl(Medium):
rpm = models.PositiveIntegerField( rpm = models.PositiveIntegerField(
verbose_name=_('rounds per minute'), verbose_name=_('rounds per minute'),
@ -378,37 +150,6 @@ class Vinyl(Medium):
ordering = ['title'] ordering = ['title']
class OldCD(models.Model):
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
side_identifier = models.CharField(
verbose_name=_('side identifier'),
max_length=255,
)
authors = models.ManyToManyField(
'Author',
verbose_name=_('authors'),
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
return self.title
class Meta:
verbose_name = _("CD")
verbose_name_plural = _("CDs")
ordering = ['title']
class CD(Medium): class CD(Medium):
class Meta: class Meta:
verbose_name = _("CD") verbose_name = _("CD")
@ -416,57 +157,6 @@ class CD(Medium):
ordering = ['title'] ordering = ['title']
class OldReview(models.Model):
title = models.CharField(
verbose_name=_('title'),
max_length=255,
)
number = models.PositiveIntegerField(
verbose_name=_('number'),
)
year = models.PositiveIntegerField(
verbose_name=_('year'),
null=True,
blank=True,
default=None,
)
month = models.PositiveIntegerField(
verbose_name=_('month'),
null=True,
blank=True,
default=None,
)
day = models.PositiveIntegerField(
verbose_name=_('day'),
null=True,
blank=True,
default=None,
)
double = models.BooleanField(
verbose_name=_('double'),
default=False,
)
present = models.BooleanField(
verbose_name=_("present"),
help_text=_("Tell that the medium is present in the Mediatek."),
default=False,
)
def __str__(self):
return self.title + "" + str(self.number)
class Meta:
verbose_name = _("review")
verbose_name_plural = _("reviews")
ordering = ['title', 'number']
class Review(Borrowable): class Review(Borrowable):
number = models.PositiveIntegerField( number = models.PositiveIntegerField(
verbose_name=_('number'), verbose_name=_('number'),
@ -584,52 +274,6 @@ class Emprunt(models.Model):
ordering = ['-date_emprunt'] ordering = ['-date_emprunt']
class OldGame(models.Model):
DURATIONS = (
('-1h', '-1h'),
('1-2h', '1-2h'),
('2-3h', '2-3h'),
('3-4h', '3-4h'),
('4h+', '4h+'),
)
title = models.CharField(
max_length=255,
verbose_name=_("name"),
)
owner = models.ForeignKey(
'users.User',
on_delete=models.PROTECT,
verbose_name=_("owner"),
)
duration = models.CharField(
choices=DURATIONS,
max_length=255,
verbose_name=_("duration"),
)
players_min = models.IntegerField(
validators=[MinValueValidator(1)],
verbose_name=_("minimum number of players"),
)
players_max = models.IntegerField(
validators=[MinValueValidator(1)],
verbose_name=_('maximum number of players'),
)
comment = models.CharField(
max_length=255,
blank=True,
verbose_name=_('comment'),
)
def __str__(self):
return str(self.title)
class Meta:
verbose_name = _("game")
verbose_name_plural = _("games")
ordering = ['title']
class Game(Borrowable): class Game(Borrowable):
DURATIONS = ( DURATIONS = (
('-1h', '-1h'), ('-1h', '-1h'),