質問編集履歴
2
解決方法の記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -366,6 +366,100 @@
|
|
366
366
|
|
367
367
|
|
368
368
|
|
369
|
+
#自己解決
|
370
|
+
|
371
|
+
detail.html内の
|
372
|
+
|
373
|
+
comment.nameやcomment.text等を変更すると、解決することが出来ました。
|
374
|
+
|
375
|
+
```HTML
|
376
|
+
|
377
|
+
detail.html
|
378
|
+
|
379
|
+
{% extends 'base.html' %}
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
{% block customcss %}
|
384
|
+
|
385
|
+
{% endblock customcss %}
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
{% block header %}
|
390
|
+
|
391
|
+
<div class="alert alert-primary" role="alert">
|
392
|
+
|
393
|
+
個別投稿
|
394
|
+
|
395
|
+
</div>
|
396
|
+
|
397
|
+
{% endblock header %}
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
{% block content %}
|
402
|
+
|
403
|
+
<div class='container'>
|
404
|
+
|
405
|
+
<div class="alert alert-success" role="alert">
|
406
|
+
|
407
|
+
<p>タイトル:{{ object.title }}</p>
|
408
|
+
|
409
|
+
<p>投稿者:{{ object.author }}</p>
|
410
|
+
|
411
|
+
<p>内容:{{ object.content }}</p>
|
412
|
+
|
413
|
+
<p><img src='{{ object.images.url }}' width=300></p>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
<a href="{% url 'comment' object.pk %}" class="btn btn-primary btn " tabindex="-1" role="button"
|
420
|
+
|
421
|
+
aria-disabled="true">コメントする</a>
|
422
|
+
|
423
|
+
<p><a href="{% url 'list' %}" class="btn btn-success btn " tabindex="-1" role="button"
|
424
|
+
|
425
|
+
aria-disabled="true">記事一覧に戻る</a></p>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
{% for comment in object.comment_set.all %}
|
430
|
+
|
431
|
+
<!-- ここにコメントを入れたい-->
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
<p>名前:{{ comment.name }}<br>
|
436
|
+
|
437
|
+
テキスト:{{ comment.text }}<br>
|
438
|
+
|
439
|
+
</p>
|
440
|
+
|
441
|
+
{# <a href="{% url 'reply' comment.pk %}">返信する</a><br>#}
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
<hr>
|
448
|
+
|
449
|
+
{% endfor %}
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
</div>
|
454
|
+
|
455
|
+
</div>
|
456
|
+
|
457
|
+
{% endblock content %}
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
```
|
462
|
+
|
369
463
|
|
370
464
|
|
371
465
|
|
1
参考文献の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#前提・実現したいこと
|
2
2
|
|
3
|
-
Udemyで掲示板風SNSを作成したので、掲示板と言えば、コメントが必要だよな。と思いコメント機能を追加しようとしています。
|
3
|
+
[Udemy](https://www.udemy.com/course/django-3app/)で掲示板風SNSを作成したので、掲示板と言えば、コメントが必要だよな。と思いコメント機能を追加しようとしています。
|
4
4
|
|
5
5
|
|
6
6
|
|