我有问题,我不知道如何更新数据库...
所以这是我的问题:我用一行更新了我的应用程序 models.py *yrs = models.CharField(max_length=4)*:
from django.db import models
class Books(models.Model):
title = models.CharField(max_length=150)
author = models.CharField(max_length=100)
*yrs = models.CharField(max_length=4)*
read = models.CharField(max_length=3)
def __str__(self):
return self.title + " / " + self.author + " / " + **self.yrs** + " / " + self.read + " "
所以,但现在我得到错误:
Exception Type: DatabaseError
Exception Value: no such column: books_books.yrs
那么,你知道我该如何解决吗?谢谢 ;)