Include in the head tag Djanto Templates

2

I have the following files:

base.html :

<!-- base.html -- -->
<html>
    <head>
        <title>Title</title> 
        {% include "head.html" %} 
    </head>
    <body>
        Body
    </body>
</html>

head.html :

<!-- head.html -- -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="pt-br" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

My problem is when the browser interprets the pages, the code of head.html is placed in the <body> of the page. I already tried to use a block in head but the same problem happened, how could I solve this problem?

The browser interprets this way:

<html>
    <head>
        <title>Title</title> 
    </head>
    <body>
        "&#65279;"
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="pt-br" />
        <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
        Body
    </body>
</html>
    
asked by anonymous 04.01.2016 / 14:13

1 answer

2

Then the problem was in the encoding of the .HTML file, I opened the file in a text editor, and saved it as UTF-8 , and fixed the bug .

The browser was generating a special character that was considered text, so it would throw the head code inside the <body> of the page;

    
04.01.2016 / 17:42