0

I am making simple blog application in Django. Here is it's code.
I made a comment application in it, which works pretty well, but in my case the user would have to go to a different template *comment_form.html* (in my case) to submit the comment. That's not good isn't it. So how would have an in-line form for a particular blog post(in detail.html).

4
  • What holds you back from putting it in one template? You can add as many context variables as you want. Commented Mar 29, 2014 at 23:24
  • You mean the add_comment view should render the detail template? I tried that but it was not working . Commented Mar 30, 2014 at 1:40
  • No, I mean to put it in ONE (1) template. Commented Mar 31, 2014 at 8:28
  • Could please provide me an example of it ? Commented Apr 4, 2014 at 1:41

1 Answer 1

1

Typically you'd pass the a CommentForm into the detail.html template, and that would render the form where you want it.

Sign up to request clarification or add additional context in comments.

1 Comment

Could you please provide me an example ??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.