samedi 1 mai 2021

Django Template - If both IF statements are empty

I know how to use an if statement in django, and if the if is empty. Like this:


<!-- False -->

Now how do I do this if I have more than on if statement like this:




<!-- Problem: -->

<!-- Do only if both are false -->

So I tried using if and but it didn't work, even if one existed it still ran the stuff in the else.

So how do I make sure it checks if both statements are false, and only if they are both false, to run the else. Any suggestions?

Aucun commentaire:

Enregistrer un commentaire