Ajoutez des fichiers projet.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Bookmarklets' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate "Documentation bookmarklets" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p class="help">{% blocktranslate trimmed %}
|
||||
To install bookmarklets, drag the link to your bookmarks toolbar, or right-click
|
||||
the link and add it to your bookmarks. Now you can select the bookmarklet
|
||||
from any page in the site.
|
||||
{% endblocktranslate %}</p>
|
||||
|
||||
<div id="content-main">
|
||||
<h3><a href="javascript:(function(){if(typeof XMLHttpRequest!='undefined'){x=new XMLHttpRequest()}else{return;}x.open('HEAD',location.href,false);x.send(null);try{view=x.getResponseHeader('x-view');}catch(e){alert('No view found for this page');return;}if(view=='undefined'){alert('No view found for this page');}document.location='{% url 'django-admindocs-views-index' %}'+view+'/';})()">{% translate "Documentation for this page" %}</a></h3>
|
||||
<p>{% translate "Jumps you from any page to the documentation for the view that generates that page." %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,34 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› {% translate 'Documentation' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate 'Documentation' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'Documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
<h3><a href="tags/">{% translate 'Tags' %}</a></h3>
|
||||
<p>{% translate 'List of all the template tags and their functions.' %}</p>
|
||||
|
||||
<h3><a href="filters/">{% translate 'Filters' %}</a></h3>
|
||||
<p>{% translate 'Filters are actions which can be applied to variables in a template to alter the output.' %}</p>
|
||||
|
||||
<h3><a href="models/">{% translate 'Models' %}</a></h3>
|
||||
<p>{% translate 'Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables' %}.</p>
|
||||
|
||||
<h3><a href="views/">{% translate 'Views' %}</a></h3>
|
||||
<p>{% translate 'Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.' %}</p>
|
||||
|
||||
<h3><a href="bookmarklets/">{% translate 'Bookmarklets' %}</a></h3>
|
||||
<p>{% translate 'Tools for your browser to quickly access admin functionality.' %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,22 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› {% translate 'Documentation' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate 'Please install docutils' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'Documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
<h3>{% blocktranslate with "https://docutils.sourceforge.io/" as link %}The admin documentation system requires Python’s <a href="{{ link }}">docutils</a> library.{% endblocktranslate %}</h3>
|
||||
|
||||
<p>{% blocktranslate with "https://docutils.sourceforge.io/" as link %}Please ask your administrators to install <a href="{{ link }}">docutils</a>.{% endblocktranslate %}</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,78 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ block.super }}
|
||||
<style type="text/css">
|
||||
.module table { width:100%; }
|
||||
.module table p { padding: 0; margin: 0; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› <a href="{% url 'django-admindocs-models-index' %}">{% translate 'Models' %}</a>
|
||||
› {{ name }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{% blocktranslate %}Model: {{ name }}{% endblocktranslate %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
<h1>{{ name }}</h1>
|
||||
<h2 class="subhead">{{ summary }}</h2>
|
||||
|
||||
{{ description }}
|
||||
|
||||
<h3>{% translate 'Fields' %}</h3>
|
||||
<div class="module">
|
||||
<table class="model">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate 'Field' %}</th>
|
||||
<th>{% translate 'Type' %}</th>
|
||||
<th>{% translate 'Description' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for field in fields|dictsort:"name" %}
|
||||
<tr>
|
||||
<td>{{ field.name }}</td>
|
||||
<td>{{ field.data_type }}</td>
|
||||
<td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if methods %}
|
||||
<h3>{% translate 'Methods with arguments' %}</h3>
|
||||
<div class="module">
|
||||
<table class="model">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% translate 'Method' %}</th>
|
||||
<th>{% translate 'Arguments' %}</th>
|
||||
<th>{% translate 'Description' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for method in methods|dictsort:"name" %}
|
||||
<tr>
|
||||
<td>{{ method.name }}</td>
|
||||
<td>{{ method.arguments }}</td>
|
||||
<td>{{ method.verbose }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-models-index' %}">‹ {% translate 'Back to Model documentation' %}</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -0,0 +1,52 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block coltype %}colSM{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Models' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{% translate 'Models' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'Model documentation' %}</h1>
|
||||
|
||||
{% regroup models by app_config as grouped_models %}
|
||||
|
||||
<div id="content-main">
|
||||
{% for group in grouped_models %}
|
||||
<div class="module">
|
||||
<h2 id="app-{{ group.grouper.label }}">{{ group.grouper.verbose_name }} ({{ group.grouper.name }})</h2>
|
||||
|
||||
<table class="xfull">
|
||||
{% for model in group.list %}
|
||||
<tr>
|
||||
<th><a href="{% url 'django-admindocs-models-detail' app_label=model.app_label model_name=model.model_name %}">{{ model.object_name }}</a></th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<div id="content-related" class="sidebar">
|
||||
<div class="module">
|
||||
<h2>{% translate 'Model groups' %}</h2>
|
||||
<ul>
|
||||
{% regroup models by app_config as grouped_models %}
|
||||
{% for group in grouped_models %}
|
||||
<li><a href="#app-{{ group.grouper.label }}">{{ group.grouper.verbose_name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -0,0 +1,27 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Templates' %}
|
||||
› {{ name }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{% blocktranslate %}Template: {{ name }}{% endblocktranslate %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% blocktranslate %}Template: <q>{{ name }}</q>{% endblocktranslate %}</h1>
|
||||
|
||||
{# Translators: Search is not a verb here, it qualifies path (a search path) #}
|
||||
<h2>{% blocktranslate %}Search path for template <q>{{ name }}</q>:{% endblocktranslate %}</h2>
|
||||
<ol>
|
||||
{% for template in templates|dictsort:"order" %}
|
||||
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>{% translate '(does not exist)' %}</em>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-docroot' %}">‹ {% translate 'Back to Documentation' %}</a></p>
|
||||
{% endblock %}
|
@@ -0,0 +1,54 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block coltype %}colSM{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Filters' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate 'Template filters' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'Template filter documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
||||
{% for library in filter_libraries %}
|
||||
<div class="module">
|
||||
<h2>{% firstof library.grouper _("Built-in filters") %}</h2>
|
||||
{% if library.grouper %}<p class="small quiet">{% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put <code>{{ code }}</code> in your template before using the filter.{% endblocktranslate %}</p><hr>{% endif %}
|
||||
{% for filter in library.list|dictsort:"name" %}
|
||||
<h3 id="{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</h3>
|
||||
{{ filter.title }}
|
||||
{{ filter.body }}
|
||||
{% if not forloop.last %}<hr>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
<div id="content-related">
|
||||
|
||||
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
||||
{% for library in filter_libraries %}
|
||||
<div class="module">
|
||||
<h2>{% firstof library.grouper _("Built-in filters") %}</h2>
|
||||
<ul>
|
||||
{% for filter in library.list|dictsort:"name" %}
|
||||
<li><a href="#{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,54 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block coltype %}colSM{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Tags' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate 'Template tags' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'Template tag documentation' %}</h1>
|
||||
|
||||
<div id="content-main">
|
||||
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
||||
{% for library in tag_libraries %}
|
||||
<div class="module">
|
||||
<h2>{% firstof library.grouper _("Built-in tags") %}</h2>
|
||||
{% if library.grouper %}<p class="small quiet">{% blocktranslate with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put <code>{{ code }}</code> in your template before using the tag.{% endblocktranslate %}</p><hr>{% endif %}
|
||||
{% for tag in library.list|dictsort:"name" %}
|
||||
<h3 id="{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</h3>
|
||||
<h4>{{ tag.title|striptags }}</h4>
|
||||
{{ tag.body }}
|
||||
{% if not forloop.last %}<hr>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
|
||||
<div id="content-related">
|
||||
|
||||
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
||||
{% for library in tag_libraries %}
|
||||
<div class="module">
|
||||
<h2>{% firstof library.grouper _("Built-in tags") %}</h2>
|
||||
<ul>
|
||||
{% for tag in library.list|dictsort:"name" %}
|
||||
<li><a href="#{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
@@ -0,0 +1,33 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› <a href="{% url 'django-admindocs-views-index' %}">{% translate 'Views' %}</a>
|
||||
› {{ name }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% blocktranslate %}View: {{ name }}{% endblocktranslate %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{{ name }}</h1>
|
||||
|
||||
<h2 class="subhead">{{ summary|striptags }}</h2>
|
||||
|
||||
{{ body }}
|
||||
|
||||
{% if meta.Context %}
|
||||
<h3>{% translate 'Context:' %}</h3>
|
||||
<p>{{ meta.Context }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if meta.Templates %}
|
||||
<h3>{% translate 'Templates:' %}</h3>
|
||||
<p>{{ meta.Templates }}</p>
|
||||
{% endif %}
|
||||
|
||||
<p class="small"><a href="{% url 'django-admindocs-views-index' %}">‹ {% translate 'Back to View documentation' %}</a></p>
|
||||
{% endblock %}
|
@@ -0,0 +1,59 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block coltype %}colSM{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||
› <a href="{% url 'django-admindocs-docroot' %}">{% translate 'Documentation' %}</a>
|
||||
› {% translate 'Views' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block title %}{% translate 'Views' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% translate 'View documentation' %}</h1>
|
||||
|
||||
{% regroup views|dictsort:'namespace' by namespace as views_by_ns %}
|
||||
|
||||
<div id="content-related" class="sidebar">
|
||||
<div class="module">
|
||||
<h2>{% translate 'Jump to namespace' %}</h2>
|
||||
<ul>
|
||||
{% for ns_views in views_by_ns %}
|
||||
<li><a href="#ns|{{ ns_views.grouper }}">
|
||||
{% if ns_views.grouper %}{{ ns_views.grouper }}
|
||||
{% else %}{% translate "Empty namespace" %}{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content-main">
|
||||
|
||||
{% for ns_views in views_by_ns %}
|
||||
<div class="module">
|
||||
<h2 id="ns|{{ ns_views.grouper }}">
|
||||
{% if ns_views.grouper %}
|
||||
{% blocktranslate with ns_views.grouper as name %}Views by namespace {{ name }}{% endblocktranslate %}
|
||||
{% else %}
|
||||
{% blocktranslate %}Views by empty namespace{% endblocktranslate %}
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
{% for view in ns_views.list|dictsort:"url" %}
|
||||
{% ifchanged %}
|
||||
<h3><a href="{% url 'django-admindocs-views-detail' view=view.full_name %}">{{ view.url }}</a></h3>
|
||||
<p class="small quiet">{% blocktranslate with view.full_name as full_name and view.url_name as url_name %}
|
||||
View function: <code>{{ full_name }}</code>. Name: <code>{{ url_name }}</code>.
|
||||
{% endblocktranslate %}</p>
|
||||
<p>{{ view.title }}</p>
|
||||
<hr>
|
||||
{% endifchanged %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user