es"> Issues 0 Pull Requests 0 Commits 1024 Releases 0

No Description

models.py 1.3KB

    # -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django_models_ext import BaseModelMixin class MarketCodeInfo(BaseModelMixin): isv_application_id = models.CharField(_(u'isv_application_id'), max_length=128, blank=True, null=True, help_text=u'外部单号', db_index=True) application_id = models.IntegerField(_(u'application_id'), default=0, help_text=u'申请单号', db_index=True) lattice = models.CharField(_(u'code'), max_length=361, blank=True, null=True, help_text=u'361 字节的 01 点阵,用于支持生成 19 * 19 的微型码,0 为白,1 为黑') code = models.CharField(_(u'code'), max_length=16, blank=True, null=True, help_text=u'九位的字符串原始码', db_index=True) code_index = models.IntegerField(_(u'code_index'), default=0, help_text=u'该码在批次中的偏移量 ') code_url = models.CharField(_(u'code_url'), max_length=128, blank=True, null=True, help_text=u'28位普通码字符 ', db_index=True) has_used = models.BooleanField(_(u'has_used'), default=False, help_text=_(u'是否已使用'), db_index=True) class Meta: verbose_name = _(u'一物一码信息') verbose_name_plural = _(u'一物一码信息') def __unicode__(self): return unicode(self.pk)
Create Database · 2a288e9241 - Gogs: Go Git Service

Create Database

Brightcells 8 ans auparavant
Parent
Commettre
2a288e9241
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      pai2/settings.py

+ 2 - 0
pai2/settings.py

@@ -117,6 +117,8 @@ WSGI_APPLICATION = 'pai2.wsgi.application'
117 117
 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
118 118
 
119 119
 DATABASES = {
120
+    # Create Database
121
+    # CREATE DATABASE pai2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
120 122
     'default': {
121 123
         'ENGINE': 'django.db.backends.mysql',
122 124
         'NAME': 'pai2',