Base.html Templates in Django

1

Good morning !! I'm working with Django Templates. It turns out that I created one a base.html template that will serve all other html forms. I have an index.html that extends this tamplate beauty, but I already have another formLogin.html which also extends the base.html, but this one (formLogin.html ) is not coming correct, so the footer does not appear and is unformatted. What can be happening, since index.html works perfectly?:

base.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="/static/img/icone.ico"> <!--Icone da página-->
    <script src="/static/js/angular.min.js"></script>  <!--usando o angular!-->


    <title>Starter Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">  <!--usando o bootstrap!-->

    <!-- My styles para esse template -->
    <link href="static/css/site.css" rel="stylesheet">  <!--usando o Style CSS!-->



    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script><scriptsrc="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <div class="cabeca">
        <nav class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">Project name</a>
                </div>
                <div id="navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#">Home</a></li>
                        <li><a href="{% url 'web.views.login'%}">About</a></li>
                        <li><a href="#contact">Contact</a></li>
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </nav>
    </div>

</head>

<body>


{% block content %}


{% endblock content %}


<div id="rodape">

</div>

{% block extra_javascript %}{% endblock extra_javascript %}
</body>
</html>

index.html

{% extends "base.html" %}
{% load i18n %}
{% block content %}


    <div class="container">

        <div class="starter-template">
            <h1>Bootstrap starter template</h1>
            <p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
        </div>
    </div><!-- /.container -->

{% endblock content %}
{% block extra_javascript %}


{% endblock extra_javascript %}

formLogin.html (the one that is in trouble- does not inherit everything that is in the base.html)

{% extends "base.html" %}
{% load i18n %}
{% block content %}


    <div class="container">


            <h1>TESTE</h1>


    </div><!-- /.container -->


{% endblock content %}

{% block extra_javascript %}

{% endblock extra_javascript %}
    
asked by anonymous 05.06.2015 / 16:34

0 answers