示例#1
0
class OptionalRangedIntegerListModel(models.Model):

    values = CollectionField(
        item_type=int,
        validators=[ItemMinValueValidator(1), ItemMaxValueValidator(5)],
        blank=True
    )
示例#2
0
class ChoiceStringListModel(models.Model):

    values = CollectionField(
        choices=(
            ('aaa', "AAA"),
            ('bbb', "BBB"),
            ('ccc', "CCC"),
            ('ddd', "DDD"),
        )
    )
示例#3
0
class OptionalGroupedChoiceStringListModel(models.Model):

    values = CollectionField(
        blank=True,
        choices=(
            (
                'Group A',
                (
                    ('a1', "A1"),
                    ('a2', "A2"),
                )
            ),
            (
                'Group B',
                (
                    ('b1', "B1"),
                    ('b2', "B2"),
                )
            )
        )
    )
示例#4
0
class OptionalGroupedChoiceIntegerListModel(models.Model):

    values = CollectionField(
        item_type=int, blank=True,
        choices=(
            (
                'Group 1',
                (
                    (11, "1-1"),
                    (12, "1-2"),
                )
            ),
            (
                'Group 2',
                (
                    (21, "2-1"),
                    (22, "2-2"),
                )
            )
        )
    )
示例#5
0
class Imbuements(models.Model):
    imbuements = CollectionField()
示例#6
0
class OptionalIntegerTupleModel(models.Model):

    values = CollectionField(
        item_type=int, collection_type=tuple, blank=True
    )
示例#7
0
class DefaultIntegerTupleModel(models.Model):

    values = CollectionField(
        item_type=int, collection_type=tuple, blank=True, default=(-1,)
    )
示例#8
0
class IntegerTupleModel(models.Model):

    values = CollectionField(item_type=int, collection_type=tuple)
示例#9
0
class StringListModel(models.Model):

    values = CollectionField()
示例#10
0
class CompletedQuestLines(models.Model):
    quests = CollectionField()
示例#11
0
class DecimalSetModel(models.Model):

    values = CollectionField(item_type=decimal.Decimal, collection_type=set)
示例#12
0
class DefaultStringListModel(models.Model):

    values = CollectionField(blank=True, default=default_string_list)
示例#13
0
class SortedUniqueStringListModel(models.Model):

    values = CollectionField(sort=True, unique_items=True)
示例#14
0
class Max5ItemsStringListModel(models.Model):

    values = CollectionField(max_items=5)
示例#15
0
class Max10CharsStringListModel(models.Model):

    values = CollectionField(max_length=10)
示例#16
0
class Charms(models.Model):
    charms = CollectionField()
示例#17
0
class CompletedCyclopediaMapAreas(models.Model):
    areas = CollectionField()
示例#18
0
class DefaultDecimalSetModel(models.Model):

    values = CollectionField(
        item_type=decimal.Decimal, collection_type=set,
        blank=True, default=default_decimal_set
    )
示例#19
0
class BestiaryProgress(models.Model):
    u"""Collection of BestiaryEntry instances."""
    entries = CollectionField()
示例#20
0
class SortedDecimalListModel(models.Model):

    values = CollectionField(item_type=decimal.Decimal, sort=True)