盈多

models.py 762B

    # -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from models_ext.basemodels import BaseModelMixin from shortuuidfield import ShortUUIDField class EncryptTextInfo(BaseModelMixin): ciphertext = ShortUUIDField(_(u'ciphertext'), max_length=32, blank=True, null=True, help_text=u'密文', db_index=True) plaintext = models.TextField(_(u'plaintext'), blank=True, null=True, help_text=_(u'明文')) plaintext_md5 = models.CharField(_(u'plaintext'), max_length=32, blank=True, null=True, help_text=_(u'明文MD5')) class Meta: verbose_name = _(u'encrypttextinfo') verbose_name_plural = _(u'encrypttextinfo') def __unicode__(self): return u'{0.pk}'.format(self)