回答編集履歴

2

誤字の修正

2021/08/30 14:20

投稿

chko16
chko16

スコア3

test CHANGED
@@ -42,6 +42,6 @@
42
42
 
43
43
  comment.save()
44
44
 
45
- return redirect('soccer:post_detail', pk=post_pk)
45
+ return redirect('template', pk=post_pk)
46
46
 
47
47
  ```

1

誤字の修正

2021/08/30 14:20

投稿

chko16
chko16

スコア3

test CHANGED
@@ -34,14 +34,14 @@
34
34
 
35
35
  comment = form.save(commit=False)
36
36
 
37
- player_pk = self.kwargs['pk']
37
+ post_pk = self.kwargs['pk']
38
38
 
39
- comment.player = get_object_or_404(Player, pk=player_pk)
39
+ comment.post= get_object_or_404(Player, pk=post_pk)
40
40
 
41
41
  comment.user_ip_address = get_ip(self.request)
42
42
 
43
43
  comment.save()
44
44
 
45
- return redirect('soccer:player_detail', pk=player_pk)
45
+ return redirect('soccer:post_detail', pk=post_pk)
46
46
 
47
47
  ```