之前我创建了两个字段并迁移了所有内容.之后,我试图添加三个字段title,about,birthdate到模型中.我创建了一个这样的模型:
from __future__ import unicode_literals
from django.utils import timezone
from django.db import models
# Create your models here.
class APP1Model(models.Model):
name = models.CharField(max_length=120)
percentage = models.CharField(max_length=120)
title = models.CharField(max_length=100,default='Title')
birth_date = models.DateTimeField(blank=True, null=True)
about = models.TextField(max_length=100,null=True,default='About Yourself')
def __unicode__(self):
return self.name
Run Code Online (Sandbox Code Playgroud)
但是当我尝试在python shell中迁移时,它会显示如下的验证错误:
Operations to perform:
Apply all migrations: admin, contenttypes, auth, app1, sessions
Running migrations:
Applying app1.0005_auto_20160217_1346...Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in …Run Code Online (Sandbox Code Playgroud) 我想卸载Odoo 9并在我的linux系统中重新安装.谁能帮帮我吗?