fix relationship one Stamp to many Countrys

This commit is contained in:
koksnuss 2020-04-25 15:57:33 +02:00
parent db88488c26
commit c164b7521d

View File

@ -47,8 +47,6 @@ class Country(Model):
euro_member_since = PositiveSmallIntegerField('Währungsmitglied seit', default=year_now) euro_member_since = PositiveSmallIntegerField('Währungsmitglied seit', default=year_now)
stamps = ForeignKey('Stamp', on_delete=CASCADE, null=True, blank=True)
def __str__(self): def __str__(self):
return f"{self.name} - {self.name_iso}, Mitglied seit {self.euro_member_since}" return f"{self.name} - {self.name_iso}, Mitglied seit {self.euro_member_since}"
@ -64,13 +62,14 @@ class Stamp(Model):
comment = TextField('Kommentar', default='', blank=True) comment = TextField('Kommentar', default='', blank=True)
country = ForeignKey('Country', on_delete=CASCADE, null=True, blank=True)
def __str__(self): def __str__(self):
return f"{self.name_short} - {self.name} {self.comment}" return f"{self.name_short} - {self.name} {self.comment}"
class Coin(Model): class Coin(Model):
value = PositiveSmallIntegerField('Wert', default=100) value = PositiveSmallIntegerField('Wert', default=100)