質問編集履歴

2

内容編集

2019/04/17 04:12

投稿

noname0001
noname0001

スコア16

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,8 @@
1
1
  ### [やりたいこと]
2
2
 
3
3
  Djangoのtemplate内で、forループ中にcontentから値を取得したいのですが、loop_counter0を使用してcontentのインデックスを指定したいです。
4
+
5
+ (q1、q2は別のDBテーブルです)
4
6
 
5
7
  ```
6
8
 
@@ -29,3 +31,7 @@
29
31
  [参考サイト]
30
32
 
31
33
  https://stackoverflow.com/questions/31602661/accessing-nested-list-by-variable-in-django-templates?noredirect=1&lq=1
34
+
35
+
36
+
37
+ また、その場合どのように解決すべきでしょうか。

1

内容編集

2019/04/17 04:12

投稿

noname0001
noname0001

スコア16

test CHANGED
File without changes
test CHANGED
@@ -22,8 +22,10 @@
22
22
 
23
23
 
24
24
 
25
- 下記のサイトでは、「...the conclusion is that it is impossible from template side. I'd preprocess using zip function in controller」と言っていますが、やはりtemplateだけでは解決不可能でしょうか。
25
+ 下記のサイトでは、「the conclusion is that it is impossible from template side. I'd preprocess using zip function in controller」と言っていますが、やはりtemplateだけでは解決不可能でしょうか。
26
26
 
27
27
 
28
28
 
29
+ [参考サイト]
30
+
29
31
  https://stackoverflow.com/questions/31602661/accessing-nested-list-by-variable-in-django-templates?noredirect=1&lq=1