【问题标题】:Django .save() method is not appearing in Visual Studio CodeDjango .save() 方法未出现在 Visual Studio Code 中
【发布时间】:2021-09-19 13:34:03
【问题描述】:

我对 python 比较陌生,目前正在探索 django。 我在 Visual Studio Code 中遇到了这个问题,其中 save() 方法没有反映在我的主应用程序中。该方法反映在其他应用程序中,我不确定如何解决这个问题。代码位于各个应用程序的views.py 中。

For this image, form.save() does not return any method which results in not saving any information. This is situated in my main app

For this image, form.save() returns a method that allows the saving of information. This is situated in my register app.

【问题讨论】:

  • 请复制您的代码并防止发送图片。

标签: python django visual-studio-code


【解决方案1】:

这与代码本身无关,而与您的 IDE 无关,有时建议的 Python 引擎可能无法相应地工作。

但这是一个常见问题,您仍然可以使用“保存”方法,只是没有自动建议

Troubleshooting Intellisense VSCODE

【讨论】:

    猜你喜欢
    • 2017-09-14
    • 2018-02-19
    • 1970-01-01
    • 2017-10-29
    • 2020-10-14
    • 2017-09-07
    • 2023-03-08
    • 1970-01-01
    • 2018-06-28
    相关资源
    最近更新 更多