| 1 |
{% extends "admin/base_site.html" %} |
| 2 |
{% load i18n %} |
| 3 |
|
| 4 |
{% block extrahead %} |
| 5 |
{{ block.super }} |
| 6 |
<style> |
| 7 |
.module table { width:100%; } |
| 8 |
.module table p { padding: 0; margin: 0; } |
| 9 |
</style> |
| 10 |
{% endblock %} |
| 11 |
|
| 12 |
{% block breadcrumbs %} |
| 13 |
<div class="breadcrumbs"> |
| 14 |
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a> |
| 15 |
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a> |
| 16 |
› <a href="{% url 'django-admindocs-models-index' %}">{% translate 'Models' %}</a> |
| 17 |
› {{ name }} |
| 18 |
</div> |
| 19 |
{% endblock %} |
| 20 |
|
| 21 |
{% block title %}{% blocktranslate %}Model: {{ name }}{% endblocktranslate %}{% endblock %} |
| 22 |
|
| 23 |
{% block content %} |
| 24 |
<div id="content-main"> |
| 25 |
<h1>{{ name }}</h1> |
| 26 |
<h2 class="subhead">{{ summary }}</h2> |
| 27 |
|
| 28 |
{{ description }} |
| 29 |
|
| 30 |
<h3>{% translate 'Fields' %}</h3> |
| 31 |
<div class="module"> |
| 32 |
<table class="model"> |
| 33 |
<thead> |
| 34 |
<tr> |
| 35 |
<th scope="col">{% translate 'Field' %}</th> |
| 36 |
<th scope="col">{% translate 'Type' %}</th> |
| 37 |
<th scope="col">{% translate 'Description' %}</th> |
| 38 |
</tr> |
| 39 |
</thead> |
| 40 |
<tbody> |
| 41 |
{% for field in fields|dictsort:"name" %} |
| 42 |
<tr> |
| 43 |
<td>{{ field.name }}</td> |
| 44 |
<td>{{ field.data_type }}</td> |
| 45 |
<td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td> |
| 46 |
</tr> |
| 47 |
{% endfor %} |
| 48 |
</tbody> |
| 49 |
</table> |
| 50 |
</div> |
| 51 |
|
| 52 |
{% if methods %} |
| 53 |
<h3>{% translate 'Methods with arguments' %}</h3> |
| 54 |
<div class="module"> |
| 55 |
<table class="model"> |
| 56 |
<thead> |
| 57 |
<tr> |
| 58 |
<th scope="col">{% translate 'Method' %}</th> |
| 59 |
<th scope="col">{% translate 'Arguments' %}</th> |
| 60 |
<th scope="col">{% translate 'Description' %}</th> |
| 61 |
</tr> |
| 62 |
</thead> |
| 63 |
<tbody> |
| 64 |
{% for method in methods|dictsort:"name" %} |
| 65 |
<tr> |
| 66 |
<td>{{ method.name }}</td> |
| 67 |
<td>{{ method.arguments }}</td> |
| 68 |
<td>{{ method.verbose }}</td> |
| 69 |
</tr> |
| 70 |
{% endfor %} |
| 71 |
</tbody> |
| 72 |
</table> |
| 73 |
</div> |
| 74 |
{% endif %} |
| 75 |
|
| 76 |
<p><a href="{% url 'django-admindocs-models-index' %}">‹ {% translate 'Back to Model documentation' %}</a></p> |
| 77 |
</div> |
| 78 |
{% endblock %} |