我正在尝试将我的数据库 (sqlite3) 转储到一个 json 文件中,但我有一个导致no such table
错误的非托管模型(显然!)那么你如何在数据库中使用这些模型转储数据呢?
模型:
from django.db import models
class Backup(models.Model):
"""
This class is lazily recycled between various forms that ask the user to
provide a path to some data.
"""
dbloc = models.CharField(
max_length = 255
)
class Meta:
app_label = 'myApp'
db_table = 'backup'
managed = False
错误:
CommandError: Unable to serialize database: no such table: backup