GAE provides a template system, and we may create a ‘base.html’, in which an external CSS file (say, ‘base.css’) may be linked. However, how do I define some internal CSS in an extended html? I don’t want to define the CSS in ‘base.css’ because there are so many extended html files and they may conflict one with another. Right now, I have to do it inside the tag 🙁
To be specific:
extended.html:
{% extends "base.html" %}
<style> <!-- how to do this? -->
h1 {
font-family: Arial;
color: olive;
}
h2 {
color: red;
}
</style>
<h1> ... </h1>
...
<h2> ... </h2>
...
<h1> ... </h1>
Define a block in your base.html. Blocks are place holders that can be filled in from extended templates
Approach1:
base.html
extended.html
Approach2:
base.html
extended.html