NameError:名称“地址”未定义(使用python shell时),但在models.py中

我正在尝试从地址类访问所有对象,但是我不知道为什么会出现NameError:当models.py中存在地址时,未定义名称“地址”。

很明显,我已经运行了“ makemigrations”和“ migrate”(不止一次)。

有人知道为什么会这样吗?

NameError:名称“地址”未定义(使用python shell时),但在models.py中

当然,如果您需要我发布任何其他屏幕截图,请告诉我,因为目前我不知道其他内容...

yizhufu10 回答:NameError:名称“地址”未定义(使用python shell时),但在models.py中

您需要导入模型。

//Note: The device is not null before I try to connect. 
// I can retrieve the name,the address ...
D/BluetoothUtils: isSocketAllowedBySecurityPolicy start : device null
W/BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
本文链接:https://www.f2er.com/3114997.html

大家都在问