Example #1
0
class Issue(micromodels.Model):
    number = micromodels.IntegerField()
    title = micromodels.CharField()
    state = micromodels.CharField()
    body = micromodels.CharField()
    created_at = micromodels.DateTimeField(format=DT_FORMAT)
    updated_at = micromodels.DateTimeField(format=DT_FORMAT)
    closed_at = micromodels.DateTimeField(format=DT_FORMAT)
    labels = micromodels.ModelCollectionField(Label)
    user = micromodels.ModelField(User)
    comments = micromodels.IntegerField()
    milestone = micromodels.ModelField(Milestone)
Example #2
0
 class User(micromodels.Model):
     name = micromodels.CharField()
     posts = micromodels.ModelCollectionField(Post, related_name="author")
Example #3
0
 class User(micromodels.Model):
     name = micromodels.CharField()
     posts = micromodels.ModelCollectionField(Post)
Example #4
0
 class HasAModelCollectionField(micromodels.Model):
     first = micromodels.ModelCollectionField(IsASubModel)