我收到以下错误:
OperationalError,位于/ admin / newapp / efficiencyfield / 没有这样的表:newapp_effectivenessfield
此错误在管理页面上显示,但不在类内
models.py
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from completeness.models import Project
class ConclusionName(models.Model):
user = models.ForeignKey(User)
conclusion_name = models.CharField(max_length=250)
def __unicode__(self):
return self.name
class RetrospectiveField(models.Model):
user = models.ForeignKey(User)
baseText = models.TextField(max_length=255)
comments = models.TextField(max_length=255)
project = models.ForeignKey(Project)
class ValidityField(models.Model):
user = models.ForeignKey(User)
baseText = models.TextField(max_length=255)
comments = models.TextField(max_length=255)
project = models.ForeignKey(Project)
class EffectivenessField(models.Model):
user = models.ForeignKey(User)
baseText = models.TextField(max_length=255)
comments = models.TextField(max_length=255)
project = models.ForeignKey(Project)
admin.py
from django.contrib import admin
from .models import ConclusionName, RetrospectiveField, ValidityField, EffectivenessField
admin.site.register(ConclusionName)
admin.site.register(RetrospectiveField)
admin.site.register(ValidityField)
admin.site.register(EffectivenessField)