Answer the question
In order to leave comments, you need to log in
How to do validation in django?
Let's say we display products from the database, some products have is_sale=True, others have False. How to check True or False when outputting to html, or does it need to be done by views? If in PHP such a function is approximately implemented through
if($is_sale == True){
<div>Sale</div>
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question