У меня есть подробный вид, в котором я отображаю заголовок, дату и содержание сообщения, под которым у меня есть кнопка для добавления комментария, которая выводит мне другую страницу, которая имеет форму для создания комментария, что я хочу сделать, это используйте эту форму на странице подробного просмотра вместо перенаправления на другую страницу.
Мое сообщение: 
Моя форма комментария : 
My PostDetailView и CreateCommentView
class PostDetailView(DetailView):
template_name = 'blog/detail_post.html'
context_object_name = 'post'
model = Post
def CommentCreateForm(request,pk):
if request.method == 'POST':
post = get_object_or_404(Post,pk=pk)
form = CommentForm(request.POST)
if form.is_valid():
comment = form.save(commit=False)
comment.post = post
comment.save()
return redirect('post_detail',pk=post.pk)
else:
form = CommentForm()
return render(request,'blog/create_comment.html',{'form':form})
My urls.py:
urlpatterns= [
path('new/',views.PostCreateForm.as_view(),name='post_create'),
path('',views.PostList.as_view(),name='post_list'),
path ('post/<int:pk>/',views.PostDetailView.as_view(),name='post_detail'),
path('comment/new/<int:pk>',views.CommentCreateForm,name='add_comment'),
]
my detail_post. html:
{% extends 'blog/base.html' %}
{% block content %}
<div class="post-title">
<a href="{% url 'post_detail' pk=post.pk %}"><h1>{{ post.title }}</h1></a>
</div>
<div class="post-date">
<p><b>Published on: </b>{{ post.create_date|date:"d, F Y" }}</p>
</div>
<div class="post-content">
<p>{{ post.content|safe|linebreaksbr }}</p>
</div>
<div class="add-comment">
<a class="btn btn-primary" href="{% url 'add_comment' pk=post.pk %}">Add comment</a>
</div>
<div class="post-comments">
{% for comment in post.comments.all %}
{% if comment.approved %}
<p><b>Posted By:</b>{{ comment.author }}</p>
<p>{{ comment.content|safe|linebreaksbr }}</p>
{% endif %}
{% endfor %}
</div>
{% endblock %}
my create_comment. html:
{% extends 'blog/base.html' %}
{% block content %}
<form class="" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn btn-primary" value="Add">
</form>
{% endblock %}