有没有办法从 VSCODE 编辑器运行 Django 项目?
目前我使用 Windows CMD 来运行我的项目。每次当我在 VSCODE 上点击“运行”按钮时,它都不会运行该项目。
在 pyCharm 上,我们可以将“runserver”添加到其脚本参数配置中。VSCode 上有类似的东西吗?
更新
我在 VSCODE 终端上得到这个:
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[contenttypes]
remove_stale_contenttypes
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
[sessions]
clearsessions
[staticfiles]
collectstatic
findstatic
runserver
[Done] exited with code=0 in 9.449 seconds
Run Code Online (Sandbox Code Playgroud) 我有以下数据框:
ID 2019-01-31 00:00:00
0 R01 1
Run Code Online (Sandbox Code Playgroud)
如何从列名称中删除时间,以便可以按 df['31/01/2019'] 分割 df?
我有一个输入组件,它应该getUserSearch在用户键入时调用一个方法,并v_on_search用变量v_model_search值更新变量。
我正在显示带有变量的内容:v_model_search并v_on_search进行测试,尽管似乎只有 v-model 有效。
<template>
<div>
<input type="text" placeholder="search here" v-model="v_model_search" v-on:oninput="getUserSearch()">
<p>{{v_model_search}}</p>
<p>{{v_on_search}}</p>
</div>
</template>
<script>
export default {
name: 'SearchBox',
data () {
return {
v_model_search: '',
v_on_search: ''
}
},
methods: {
getUserSearch ()
{
this.v_on_search = this.v_model_search
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)