当我从下拉菜单中选择一个影院并点击“添加一部电影”时,这段代码就会运行。
public ActionResult Create(TheaterViewModel input)
{
var theater = new TheaterViewModel
{
TheaterId = input.TheaterId,
TheaterName = input.TheaterName,
MoviesForTheater = new Li
我正在开发一个小水瓶应用程序来展示有关电影的数据。每家电影院都有两个与自己相关的类别。
那家电影院的语言。例如英语、法语
类型-例如动作,喜剧,悬念
User Case -有一家名为Inception的电影,它使用English语言,属于Suspense类型。我希望为projectdomain.com/english/suspense/inception.这样的Inception电影院的页面构建干净的URL
目前,我正在通过blueprint.context_processor做这件事。
@blueprint.context_processor:
def cinema_proc
最好是将冗余数据存储在索引中,还是有两个索引,然后交叉引用它们?用户想在剧院里看电影。
由于用户对按影院查找电影感兴趣,所以我们可以有一个包含电影nested_type的影院索引:
// Here, movies field will be a Nested Type, not Object Type.
eclient.index({
index: 'myindex',
type: 'theater',
id: 1,
body: {
name: "Grand Cinema",
de