Beispiel #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)
Beispiel #2
0
 class Post(micromodels.Model):
     title = micromodels.CharField()
     author = micromodels.ModelField(User)
Beispiel #3
0
 class Post(micromodels.Model):
     title = micromodels.CharField()
     author = micromodels.ModelField(User, related_name="post")
Beispiel #4
0
 class HasAModelField(micromodels.Model):
     first = micromodels.ModelField(IsASubModel)
Beispiel #5
0
class Tweet(micromodels.Model):
    id = micromodels.IntegerField()
    text = micromodels.CharField()
    created_at = micromodels.DateTimeField(format="%a %b %d %H:%M:%S +0000 %Y")
    user = micromodels.ModelField(TwitterUser)
Beispiel #6
0
class Comment(micromodels.Model):
    user = micromodels.ModelField(User)
    updated_at = micromodels.DateTimeField(format=DT_FORMAT)
    body = micromodels.CharField()