S
S
S0ulReaver2012-02-21 08:52:38
Django
S0ulReaver, 2012-02-21 08:52:38

Django: using templates, design floats?

I ran into a very strange problem, I'm just learning Django, and maybe I don't understand something, and yet.
There is a site, naturally on Django. There is a block with news on the main page. The page itself is built using twitter bootstrap. And so I decided that it would be nice to make the base template as it should be, and everything else should be inherited from it (as in Django, as I understand and accept). Well, I created another HTML file with a template, wrote the line in it:
{% extends "base.html" %}
Well, that's how I displayed it through render_to_response. I opened it in Opera - everything works as it should, exactly the same page opens as if I had displayed the basic template. For the sake of interest, I opened it in other browsers, and here my brain turned off. In FireFox and Chrome, for some reason, a line with spaces appeared at the top of the page (here's just a text line with a bunch of spaces), and the fields for entering the login - password were flattened so that the text inside did not completely fit (by the way, they are also at the top). In Internet explorer, it’s generally hell - half the page has moved somewhere to the left of the screen.
Well, I was horrified, I displayed back just the base template, and not inherited from it - everything is in its place
In this regard, the question is - how so? It's all the same, I'm an idiot somewhere managed to mess up, or does the inheritance system still ascribe-change something in the base template? I don’t understand how the design can float.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Zagrebelin, 2012-02-21
@S0ulReaver

In base.html, by chance, the BOM-character was not substituted? wget-ohm if you download the page, what does the beginning of the file look like?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question