예제 #1
0
class JotBit(models.Model):
    url_slug = models.Column(models.Unicode(40), index=True, unique=True)
    title = models.Column(models.Unicode(140), default=u'')
    text = models.Column(models.UnicodeText, default=u'')
    date_created = models.Column(models.DateTime, default="now()")

    def __init__(self, *pargs, **kargs):
        if 'name' not in kargs:
            self.url_slug = gen_name()
        super(JotBit, self).__init__(*pargs, **kargs)
예제 #2
0
 class SampleModel(models.Model):
     text = models.Column(models.Text)
예제 #3
0
 class TestModelForForm(models.Model):
     text = models.Column(models.Text())
예제 #4
0
 class SampleModel(models.Model):
     data = models.Column(models.MutationDict.as_mutable(models.JSONEncodedDict))
예제 #5
0
 class SampleModel(models.Model):
     data = models.Column(models.ZipPickleType)
예제 #6
0
 class SampleModel(models.Model):
     data = models.Column(models.JSONEncodedDict)
예제 #7
0
 class SampleModel(models.Model):
     text = models.Column(models.ASCII)