Django - DatabaseError: No such table

前端 未结 5 834
不知归路
不知归路 2021-02-04 11:12

I defined two models:

class Server(models.Model):
    owners = models.ManyToManyField(\'Person\')

class Person(models.Model):
    name = models.CharField(max_le         


        
5条回答
  •  忘了有多久
    2021-02-04 12:02

    As a tip for the future, look into South, a very useful utility for applying your model changes to the database without having to create a new database each time you've changed the model(s).

    With it you can easily: python manage.py migrate app_name and South will write your model changes. The documentation is pretty straightforward.

提交回复
热议问题