Which Django tag is used to write comments?

24. Which Django tag is used to write comments?

  1. {% startcomment %} ... {% endcomment %}
  2. {% comment %} ... {% endcomment %}
  3. {% initcomment %} ... {% endcomment %}
  4. {% start %} ... {% end %}

Answer: B) {% comment %} ... {% endcomment %}

Explanation:

The Django tag comment is used to write comment. Here is the syntax of comment tag -

{% comment %} ... {% endcomment %}

Example:

<h1>My page</h1>
{% comment %}
  <h1>Hello, world!</h1>
{% endcomment %}

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.