小编Jac*_*rry的帖子

在 Flask 路由中捕获以查询字符串作为参数的 URL

Flask 有没有办法接受完整的 URL 作为 URL 参数?

我知道<path:something>接受带斜杠的路径。但是,我需要接受所有内容,包括之后的查询字符串?,并且path不会捕获它。

http://example.com/someurl.com?andother?yetanother
Run Code Online (Sandbox Code Playgroud)

我想捕捉someurl.com?andother?yetanother。我不提前知道将提供什么查询参数(如果有)。我想避免从 重建查询字符串request.args

python flask

5
推荐指数
1
解决办法
4125
查看次数

terraform 连接变量和字符串

我需要将变量传递给数据结构。但是我不想用所有可能的迭代来构建数据对象。目的是查询 AWS 以获取资源 ID。这是一个示例代码:

variable "subnet" {}

data "aws_subnet" "subnet" {
  filter {
    name   = "state"
    values = ["available"]
  }

  filter {
    name   = "tag:Name"
    values = ["${var.subnet}"]
  }
}

output "data" {
  value = "${data.aws_subnet.'stage-a'.id}"
}
Run Code Online (Sandbox Code Playgroud)

terraform

5
推荐指数
1
解决办法
5599
查看次数

标签 统计

flask ×1

python ×1

terraform ×1