Django Tutorial · Django Syntax

Django Comment

Learn all about Django Comment in this comprehensive tutorial.

5 min read intermediate
  • Comments allows you to have sections of code that should be ignored.
  • You can add a message to your comment, to help you remember why you wrote the comment, or as message to other people reading the code.
  • You can also use the {# .
  • Views are written in Python, and Python comments are written with the # character:

Comments

Comments allows you to have sections of code that should be ignored.

Comment Description

You can add a message to your comment, to help you remember why you wrote the comment, or as message to other people reading the code.

Smaller Comments

You can also use the {# ... #} tags when commenting out code, which can be easier for smaller comments:

Comment in Views

Views are written in Python, and Python comments are written with the # character:

Read more about Python Comments in out Python Comment Tutorial.

Module quiz

2 questions
1

Which of the following is true about Django Comment?

2

What is the most common pitfall when working with Django Comment?

Answer all questions to submit.