예제 #1
0
class ISStringReferenceModel(models.Model):
    related_things = RelatedSetField('ISOther')
    related_list = RelatedListField('ISOther', related_name="ismodel_list_string")
    limted_related = RelatedSetField('RelationWithoutReverse', limit_choices_to={'name': 'banana'}, related_name="+")
    children = RelatedSetField("self", related_name="+")

    class Meta:
        app_label = "djangae"
예제 #2
0
class ISModel(models.Model):
    related_things = RelatedSetField(ISOther)
    related_list = RelatedListField(ISOther, related_name="ismodel_list")
    limted_related = RelatedSetField(RelationWithoutReverse, limit_choices_to={'name': 'banana'}, related_name="+")
    children = RelatedSetField("self", related_name="+")

    class Meta:
        app_label = "djangae"
예제 #3
0
class Post(models.Model):
    content = models.TextField()
    tags = RelatedSetField('Tag', related_name='posts')
    ordered_tags = RelatedListField('Tag')
예제 #4
0
class RelatedListFieldModel(models.Model):
    related_list_field = RelatedListField(CharFieldModel)
예제 #5
0
class IterableFieldsWithValidatorsModel(models.Model):
    set_field = SetField(models.CharField(max_length=100), min_length=2, max_length=3, blank=False)
    list_field = ListField(models.CharField(max_length=100), min_length=2, max_length=3, blank=False)
    related_set = RelatedSetField(ISOther, min_length=2, max_length=3, blank=False)
    related_list = RelatedListField(ISOther, related_name="iterable_list", min_length=2, max_length=3, blank=False)
예제 #6
0
class IterableRelatedWithNonIntPkModel(models.Model):
    related_set = RelatedListField(StringPkModel, related_name="+")
    related_list = RelatedListField(StringPkModel, related_name="+")
예제 #7
0
class IterableRelatedModel(models.Model):
    related_set = RelatedListField(ISOther, related_name="+")
    related_list = RelatedListField(ISOther, related_name="+")