回答編集履歴
4
a
test
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
```Python
|
2
|
-
|
3
2
|
followers = [c.follower for c in connection]
|
4
|
-
|
5
3
|
contents = Content.objects.filter(owner__in=followers)
|
6
|
-
|
4
|
+
```
|
7
|
-
|
5
|
+
のようにする
|
3
訂正
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```Python
|
2
2
|
|
3
|
-
followers = [c.follower for
|
3
|
+
followers = [c.follower for c in connection]
|
4
4
|
|
5
5
|
contents = Content.objects.filter(owner__in=followers)
|
6
6
|
|
2
変更
test
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
```Python
|
2
2
|
|
3
|
-
|
3
|
+
followers = [c.follower for i in connection]
|
4
4
|
|
5
|
-
|
5
|
+
contents = Content.objects.filter(owner__in=followers)
|
6
6
|
|
7
|
-
```
|
7
|
+
```のようにする
|
8
|
-
|
9
|
-
from django.shortcuts import get_object_or_404
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
connection = get_object_or_404(Connection, following=request.user)
|
14
|
-
|
15
|
-
```
|
1
訂正
test
CHANGED
@@ -2,4 +2,14 @@
|
|
2
2
|
|
3
3
|
connection = Connection.objects.filter(following=request.user)[0]
|
4
4
|
|
5
|
+
```のようにするか、
|
6
|
+
|
7
|
+
```Python
|
8
|
+
|
9
|
+
from django.shortcuts import get_object_or_404
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
connection = get_object_or_404(Connection, following=request.user)
|
14
|
+
|
5
15
|
```
|