示例#1
0
 class Types(models.TextChoices):
     BLUNT = "BL", laz("Blunt")
     PIERCE = "PI", laz("Pierce")
     SLASH = "SL", laz("Slash")
     EVADE = "EV", laz("Evade")
     BLOCK = "BO", laz("Block")
     BLOCKCOUNTER = "CB", laz("Block Counter")
     PIERCECOUNTER = "CP", laz("Pierce Counter")
     SLASHCOUNTER = "CS", laz("Slash Counter")
     EVADECOUNTER = "CE", laz("Evade Counter")
     BLUNTCOUNTER = "CC", laz("Blunt Counter")
示例#2
0
 def clean_sepal_width(self):
     data = self.cleaned_data['sepal_width']
     if data < 0:
         raise ValidationError(
             laz('Invalid entry - negative number (sepal width)'))
     return data
示例#3
0
 def clean_petal_length(self):
     data = self.cleaned_data['petal_length']
     if data < 0:
         raise ValidationError(
             laz('Inavlid entry - negative number (petal length)'))
     return data
示例#4
0
 class RarityChoice(models.TextChoices):
     PAPERBACK = "P", laz("Paperback")
     HARDCOVER = "H", laz("Hardcover")
     LIMITED = "L", laz("Limited")
     OBJETDART = "O", laz("Objet d'art")
     EGO = "E", laz("EGO")
示例#5
0
 class CardTypes(models.TextChoices):
     MELEE = "M", laz("Melee")
     RANGED = "R", laz("Ranged")