Introduce base_main.html for <main>
This commit is contained in:
parent
1cc8f602a8
commit
2acfcb29e9
24
templates/base_main.html
Normal file
24
templates/base_main.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{% load static %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<nav>
|
||||
<ul>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="#">Account</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'login' %}">Login</a></li>
|
||||
<li><a href="{% url 'new-user' %}">Create account</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
<main>
|
||||
{% block main %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% extends "base_main.html" %}
|
||||
|
||||
{% block body %}
|
||||
{% block main %}
|
||||
|
||||
{% if form.errors %}
|
||||
<section>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% extends "base_main.html" %}
|
||||
|
||||
{% block body %}
|
||||
{% block main %}
|
||||
{% if form.errors %}
|
||||
<section>
|
||||
<h2>Error:</h2>
|
||||
|
|
|
|||
Loading…
Reference in a new issue