{#% extends whatever %#} {% load static %} {% block head_extra %} {# layouts are based on bootstrap so these links need to be somewhere #} {% endblock head_extra %} {% block title %} {# override or delete as required #} Django Diary {% endblock title %} {% block nav_menu %} {# override or delete as required #}
{% if user.is_authenticated %}

Hello {{ user.username }}

{% block links %} {% endblock links %} {% else %} {% endif %}

Diary Test App

{% endblock nav_menu %} {# this is the base for bootstrap column layout #}
{#==========================Diary Navigation==================================#} {# This section can be overridden to customise the diary navigation. #} {# The only requirement is that it defines links for the placeholders below. #} {# place-holders for overriding in children of diary_nav #} {#% url '' as diary_nav_up %#} {#% url '' as diary_nav_prev %#} {#% url '' as diary_nav_next %#} {% with diary_nav_up='' diary_nav_prev='' diary_nav_next='' %} {% block diary_nav %} {# override url definitions in children #} {% endblock diary_nav %} {% endwith %} {# SAMPLE CHILD BLOCK for diary_nav #} {#{% block diary_nav %}#} {# {% url 'diary:year_nav' year=next_year as diary_nav_next %}#} {# {% url 'diary:year_nav' year=prev_year as diary_nav_prev %}#} {# {% url 'diary:year_now' as diary_nav_up %}#} {# {{ block.super }}#} {#{% endblock diary_nav %}#} {#======================End Diary Navigation==================================#} {# diary main content goes here #} {% block diary_content %} {% endblock diary_content %}
{# diary sidebar reminders go here #} {% block diary_sidebar %} {% include 'diary/reminders.html' %} {% endblock diary_sidebar %}