小编mis*_*sak的帖子

在VSCode中运行当前Python单元测试的快捷方式

问题是关于Visual Studio Code(这里是VSCode)和python VSCode扩展,它找到并运行py.test测试.

是否可以指定一些快捷方式来运行当前(光标下)测试方法和/或测试类?

我真的很喜欢直接从VSCode运行单一测试的能力,但我的工作流程并不是最佳的,因为有必要点击它并使用一些快捷方式.

可点击运行测试

此图像显示了在找到测试并且可以运行时出现的按钮.我想知道是否可以使用一些自定义快捷方式而不是单击此按钮.

python unit-testing pytest visual-studio-code

11
推荐指数
3
解决办法
3046
查看次数

django allauth facebook本地开发

我在开发网站时使用django-allauth进行Facebook身份验证,并相应地进行了设置:

在facebok上的facebook app设置中:

Namespace: test_login
App Domains: blank
Site URL: http://127.0.0.1:8000/
Canvas URL: http://127.0.0.1:8000/
Secure Canvas URL: https://127.0.0.1:8000/
Run Code Online (Sandbox Code Playgroud)

在Django管理员我创建了新的社交应用程序:

Provider: Facebook
name: test_login
client_id: xxx
Secret: xxx
Sites: http://127.0.0.1:8000/
Run Code Online (Sandbox Code Playgroud)

正如你所看到的,我添加了一个新网站http://127.0.0.1:8000/而不是example.com.

settings.py中的SITE_ID是正确的.

所以一切都应该有效,但事实并非如此.点击通过Facebook登录后我得到了

Given URL is not allowed by the Application configuration.: 
One or more of the given URLs is not allowed by the App's settings. 
It must match the Website URL or Canvas URL, or the domain must be a 
subdomain of one of …
Run Code Online (Sandbox Code Playgroud)

django facebook django-allauth

4
推荐指数
1
解决办法
1594
查看次数