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