The default theme contains different pages. Some of them are discussed here more to enable people to see how djacios works. However to completely understand the way tempates work you need to read the Dango documentation.
examples:
The main page for this theme, it is used as base template for all the other pages. Here the general layout is set and the menu block is defined.
This is achieved by checking this in the template like this:
{% if user.is_authenticated %}
{% if user.is_staff %}
...
{% endif %}
{% if perms.core.add_host %}
...
{% endif %}
{% if perms.core.change_service %}
...
{% endif %}
{% if perms.core.delete_host %}
...
{% endif %}
{% endif %}
Permissions can be set in the admin section of your installation.
The content for the home page (simple text)
Extends index.html and adds a simple default form:
{% block content %}
<form method="POST" action="/host/add/">
<table>
{{ form }}
</table>
<input type='submit' value='add to nagios'>
</form>
{% endblock content %}
The form is defined as:
class HostForm(forms.Form):
name = forms.CharField(label='Server Name', max_length=50)
address = forms.CharField(label='Servers Address (dns or IP)', max_length=50)
template = forms.ModelChoiceField(label='Template', queryset=Host.objects.filter(register=False).order_by('name'))