在model中定义一个meta方法即可自己指定表名了
class mio_blog(models.Model): id = models.AutoField('id', primary_key=True) title = models.CharField(max_length=255) content = models.CharField(max_length=255) class Meta: db_table = "mio_blog"
在model中定义一个meta方法即可自己指定表名了
class mio_blog(models.Model): id = models.AutoField('id', primary_key=True) title = models.CharField(max_length=255) content = models.CharField(max_length=255) class Meta: db_table = "mio_blog"