TextField => CharField

Brightcells 7 lat temu
rodzic
commit
9ec76d526a
2 zmienionych plików z 21 dodań i 1 usunięć
  1. 20 0
      mch/migrations/0003_auto_20180104_0428.py
  2. 1 1
      mch/models.py

+ 20 - 0
mch/migrations/0003_auto_20180104_0428.py

@@ -0,0 +1,20 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 1.11.3 on 2018-01-03 20:28
3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations, models
6
+
7
+
8
+class Migration(migrations.Migration):
9
+
10
+    dependencies = [
11
+        ('mch', '0002_auto_20180104_0414'),
12
+    ]
13
+
14
+    operations = [
15
+        migrations.AlterField(
16
+            model_name='modelimageinfo',
17
+            name='url',
18
+            field=models.CharField(blank=True, help_text='\u94fe\u63a5', max_length=255, null=True, verbose_name='url'),
19
+        ),
20
+    ]

+ 1 - 1
mch/models.py

@@ -69,7 +69,7 @@ class ModelImageInfo(BaseModelMixin):
69 69
     model_id = models.CharField(_(u'model_id'), max_length=32, blank=True, null=True, help_text=u'型号唯一标识', db_index=True)
70 70
 
71 71
     image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'图片')
72
-    url = models.TextField(_(u'url'), max_length=255, blank=True, null=True, help_text=u'链接')
72
+    url = models.CharField(_(u'url'), max_length=255, blank=True, null=True, help_text=u'链接')
73 73
 
74 74
     position = models.IntegerField(_(u'position'), default=1, help_text=u'排序')
75 75