Given a base template called "base.html", how can we inherit from this base template in another html file, "new.html"? ◯ Put at the top of new.html ◯ Put {% extends "base.html" %} at the top of new.html ◯ It is not possible to inherit from base.html ◯ Put {% extends "base.html" %} at the bottom of new.html Below is a snippet of the code in a html file that you would like to use as a handler for a decorator in your routes.py function: {% for fruit in fruits %} I love eating {{ fruit }} However, this would throw an error. Why? ◯ There cannot be a for loop built into html code. ◯ It’s missing {% endfor %} ◯ It’s missing a link to a CSS file. ◯ There is no need for
COM.
Given a base template called "base.html", how can we inherit from this base template in another html file, "new.html"?
◯ Put <!doctype html> at the top of new.html
◯ Put {% extends "base.html" %} at the top of new.html
◯ It is not possible to inherit from base.html
◯ Put {% extends "base.html" %} at the bottom of new.html
Below is a snippet of the code in a html file that you would like to use as a handler for a decorator in your routes.py function:
<body>
{% for fruit in fruits %}
<div><p> I love eating <b> {{ fruit }} </b> </p></div>
</body>
However, this would throw an error. Why?
◯ There cannot be a for loop built into html code.
◯ It’s missing {% endfor %}
◯ It’s missing a link to a CSS file.
◯ There is no need for </body>
Trending now
This is a popular solution!
Step by step
Solved in 3 steps