README.md edited

This commit is contained in:
2024-12-06 10:45:08 +09:00
parent 09e4edee6b
commit 1aa387aa59
13921 changed files with 2057290 additions and 10 deletions

View File

@@ -0,0 +1,33 @@
{% extends "admin/base_site.html" %}
{% block extrastyle %}
<style>
.literal-block, .doctest-block {
background: #272822;
color: #f8f8f2;
}
.module {
padding: 20px;
}
.card-header .card-title a {
color: #ffffff !important;
}
.card-header .card-title a:hover {
color: #f8f8f2 !important;
}
</style>
{% endblock %}
{% block content %}
{% block alerts %}{% endblock %}
<div id="content-main" class=col-12>
<div class="col-12">
<div class="card">
<div class="card-body pad table-responsive">
{% block docs_content %}{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,33 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Bookmarklets' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans "Documentation bookmarklets" %}{% endblock %}
{% block alerts %}
<div class="alert alert-info alert-dismissible col-12">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h5><i class="icon fas fa-info"></i> Info</h5>
<p>
{% blocktrans 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.
{% endblocktrans %}
</p>
</div>
{% endblock %}
{% block docs_content %}
<div class="card-body pad table-responsive">
<h4><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+'/';})()">{% trans "Documentation for this page" %}</a></h4>
<p>{% trans "Jumps you from any page to the documentation for the view that generates that page." %}</p>
</div>
{% endblock %}

View File

@@ -0,0 +1,40 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Documentation' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Documentation' %}{% endblock %}
{% block content_title %}{% trans 'Documentation' %}{% endblock %}
{% block content %}
<div id="content-main" class=col-12>
<div class="col-12">
<div class="card">
<div class="card-body pad table-responsive">
<h5><a href="tags/">{% trans 'Tags' %}</a></h5>
<p>{% trans 'List of all the template tags and their functions.' %}</p>
<h5><a href="filters/">{% trans 'Filters' %}</a></h5>
<p>{% trans 'Filters are actions which can be applied to variables in a template to alter the output.' %}</p>
<h5><a href="models/">{% trans 'Models' %}</a></h5>
<p>{% trans '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>
<h5><a href="views/">{% trans 'Views' %}</a></h5>
<p>{% trans '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>
<h5><a href="bookmarklets/">{% trans 'Bookmarklets' %}</a></h5>
<p>{% trans 'Tools for your browser to quickly access admin functionality.' %}</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,18 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Documentation' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Please install docutils' %}{% endblock %}
{% block content_title %}{% trans 'Documentation' %}{% endblock %}
{% block docs_content %}
<h3>{% blocktrans with "http://docutils.sf.net/" as link %}The admin documentation system requires Python's <a href="{{ link }}">docutils</a> library.{% endblocktrans %}</h3>
<p>{% blocktrans with "http://docutils.sf.net/" as link %}Please ask your administrators to install <a href="{{ link }}">docutils</a>.{% endblocktrans %}</p>
{% endblock %}

View File

@@ -0,0 +1,86 @@
{% extends "admin_doc/base_docs.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 %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-models-index' %}">{% trans 'Models' %}</a></li>
<li class="breadcrumb-item active">{{ name }}</li>
</ol>
{% endblock %}
{% block title %}{% blocktrans %}Model: {{ name }}{% endblocktrans %}{% endblock %}
{% block content_title %}{{ name }}{% endblock %}
{% block docs_content %}
<div class="card card-info">
<div class="card-header"><h4>{% blocktrans %}Description{% endblocktrans %}</h4></div>
<div class="card-body">
{{ summary }}
{{ description }}
</div>
</div>
<div class="card card-success">
<div class="card-header"><h4>{% trans 'Fields' %}</h4></div>
<div class="card-body">
<table class="table table-hover text-nowrap">
<thead>
<tr>
<th>{% trans 'Field' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans '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>
</div>
{% if methods %}
<div class="card card-warning">
<div class="card-header"><h4>{% trans 'Methods with arguments' %}</h4></div>
<div class="card-body">
<table class="table table-hover text-nowrap">
<thead>
<tr>
<th>{% trans 'Method' %}</th>
<th>{% trans 'Arguments' %}</th>
<th>{% trans '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>
</div>
{% endif %}
<p class="small"><a href="{% url 'django-admindocs-models-index' %}">&lsaquo; {% trans 'Back to Model documentation' %}</a></p>
{% endblock %}

View File

@@ -0,0 +1,53 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Models' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Models' %}{% endblock %}
{% block content_title %}{% trans 'Models' %}{% endblock %}
{% block docs_content %}
{% regroup models by app_config as grouped_models %}
<div class="row">
<div class="col-4 col-sm-2">
<div class="nav flex-column nav-tabs h-100" id="tabs-tab" role="tablist" aria-orientation="vertical">
{% for group in grouped_models %}
<a class="nav-link" id="tabs-{{ group.grouper.label }}-control" data-toggle="pill" href="#tabs-{{ group.grouper.label }}" role="tab" aria-controls="tabs-{{ group.grouper.label }}" aria-selected="true">
<h6>{{ group.grouper.verbose_name }}</h6>
</a>
{% endfor %}
</div>
</div>
<div class="col-7 col-sm-9">
<div class="tab-content" id="tabs-tabContent">
{% for group in grouped_models %}
<div class="tab-pane text-left fade{% if forloop.first %} show active{% endif %}" id="tabs-{{ group.grouper.label }}" role="tabpanel" aria-labelledby="tabs-{{ group.grouper.label }}-control">
<ul>
{% for model in group.list %}
<li>
<a href="{% url 'django-admindocs-models-detail' app_label=model.app_label model_name=model.model_name %}">
{{ model.object_name }}
</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,25 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Templates' %} {{ name }}</li>
</ol>
{% endblock %}
{% block title %}{% blocktrans %}Template: {{ name }}{% endblocktrans %}{% endblock %}
{% block content_title %}{% blocktrans %}Template: <q>{{ name }}</q>{% endblocktrans %}{% endblock %}
{% block docs_content %}
{# Translators: Search is not a verb here, it qualifies path (a search path) #}
<h2>{% blocktrans %}Search path for template <q>{{ name }}</q>:{% endblocktrans %}</h2>
<ol>
{% for template in templates|dictsort:"order" %}
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>{% trans '(does not exist)' %}</em>{% endif %}</li>
{% endfor %}
</ol>
<p class="small"><a href="{% url 'django-admindocs-docroot' %}">&lsaquo; {% trans 'Back to Documentation' %}</a></p>
{% endblock %}

View File

@@ -0,0 +1,57 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Filters' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Template filters' %}{% endblock %}
{% block content_title %}{% trans 'Template filters' %}{% endblock %}
{% block docs_content %}
{% regroup filters|dictsort:"library" by library as filter_libraries %}
<div class="row">
<div class="col-4 col-sm-2">
<div class="nav flex-column nav-tabs h-100" id="filter-tab" role="tablist" aria-orientation="vertical">
{% for library in filter_libraries %}
<a class="nav-link" id="tabs-{% firstof library.grouper built_in_filters %}-tab" data-toggle="pill" href="#tabs-{% firstof library.grouper built_in_filters %}" role="tab" aria-controls="tabs-{% firstof library.grouper built_in_filters %}" aria-selected="true"><h6>{% firstof library.grouper _("Built-in filters") %}</h6></a>
{% endfor %}
</div>
</div>
<div class="col-7 col-sm-9">
<div class="tab-content">
{% for library in filter_libraries %}
<div class="tab-pane text-left fade{% if forloop.first %} show active{% endif %}" id="tabs-{% firstof library.grouper built_in_filters %}" role="tabpanel" aria-labelledby="tabs-{% firstof library.grouper built_in_filters %}-tab">
{% for view in ns_views.list|dictsort:"url" %}
{% ifchanged %}
<h4><a href="{% url 'django-admindocs-views-detail' view=view.full_name %}">{{ view.url }}</a></h4>
<p class="small quiet">{% blocktrans 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>.{% endblocktrans %}</p>
<p>{{ view.title }}</p>
<hr>
{% endifchanged %}
{% endfor %}
{% if library.grouper %}<p class="small quiet">{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these filters, put <code>{{ code }}</code> in your template before using the filter.{% endblocktrans %}</p><hr>{% endif %}
{% for filter in library.list|dictsort:"name" %}
<h4 id="{{ library.grouper|default:"built_in" }}-{{ filter.name }}">{{ filter.name }}</h4>
{{ filter.title }}
{{ filter.body }}
{% if not forloop.last %}<hr>{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,47 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Tags' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Template tags' %}{% endblock %}
{% block content_title %}{% trans 'Template tag documentation' %}{% endblock %}
{% block docs_content %}
{% regroup tags|dictsort:"library" by library as tag_libraries %}
<div class="row">
<div class="col-4 col-sm-2">
<div class="nav flex-column nav-tabs h-100" id="tabs-tab" role="tablist" aria-orientation="vertical">
{% for library in tag_libraries %}
<a class="nav-link" id="tabs-{% firstof library.grouper built_in_tags %}-tab" data-toggle="pill" href="#tabs-{% firstof library.grouper built_in_tags %}" role="tab" aria-controls="tabs-{% firstof library.grouper built_in_tags %}" aria-selected="true"><h6>{% firstof library.grouper _("Built-in tags") %}</h6></a>
{% endfor %}
</div>
</div>
<div class="col-7 col-sm-9">
<div class="tab-content" id="tabs-tabContent">
{% for library in tag_libraries %}
<div class="tab-pane text-left fade{% if forloop.first %} show active{% endif %}" id="tabs-{% firstof library.grouper built_in_tags %}" role="tabpanel" aria-labelledby="tabs-{% firstof library.grouper built_in_tags %}-tab">
{% if library.grouper %}<p class="small quiet">{% blocktrans with code="{"|add:"% load "|add:library.grouper|add:" %"|add:"}" %}To use these tags, put <code>{{ code }}</code> in your template before using the tag.{% endblocktrans %}</p><hr>{% endif %}
{% for tag in library.list|dictsort:"name" %}
<h3 id="{{ library.grouper|default:"built_in" }}-{{ tag.name }}">{{ tag.name }}</h3>
<h6 style="font-style: italic;">{{ tag.title|striptags }}</h6>
{{ tag.body }}
{% if not forloop.last %}<hr>{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,39 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n jazzmin %}
{% get_jazzmin_ui_tweaks as jazzmin_ui %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-views-index' %}">{% trans 'Views' %}</a></li>
<li class="breadcrumb-item active">{{ name }}</li>
</ol>
{% endblock %}
{% block title %}{% blocktrans %}View: {{ name }}{% endblocktrans %}{% endblock %}
{% block content_title %}{{ name }}{% endblock %}
{% block docs_content %}
<h3 class="subhead">{{ summary|striptags }}</h3>
{{ body }}
{% if meta.Context %}
<h4>{% trans 'Context:' %}</h4>
<p>{{ meta.Context }}</p>
{% endif %}
{% if meta.Templates %}
<h4>{% trans 'Templates:' %}</h4>
<p>{{ meta.Templates }}</p>
{% endif %}
<div class="row">
<div class="col-lg-3 col-sm-1"></div>
<div class="col-lg-6 col-sm-10">
<a class="btn btn-block {{ jazzmin_ui.button_classes.info }}" href="{% url 'django-admindocs-views-index' %}">{% trans 'Back to View documentation' %}</a>
</div>
<div class="col-lg-3 col-sm-1"></div>
</div>
{% endblock %}

View File

@@ -0,0 +1,60 @@
{% extends "admin_doc/base_docs.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
<li class="breadcrumb-item"><a href="{% url 'django-admindocs-docroot' %}">{% trans 'Documentation' %}</a></li>
<li class="breadcrumb-item active">{% trans 'Views' %}</li>
</ol>
{% endblock %}
{% block title %}{% trans 'Views' %}{% endblock %}
{% block content_title %}{% trans 'View documentation' %}{% endblock %}
{% block docs_content %}
{% regroup views|dictsort:'namespace' by namespace as views_by_ns %}
<div class="row">
<div class="col-4 col-sm-2">
<div class="nav flex-column nav-tabs h-100" id="tabs-tab" role="tablist" aria-orientation="vertical">
{% for ns_views in views_by_ns %}
<a class="nav-link" id="tabs-{{ ns_views.grouper }}-control" data-toggle="pill" href="#tabs-{{ ns_views.grouper }}" role="tab" aria-controls="tabs-{{ ns_views.grouper }}" aria-selected="true">
<h6>
{% if ns_views.grouper %}
{% blocktrans with ns_views.grouper as name %}Views by namespace {{ name }}{% endblocktrans %}
{% else %}
{% blocktrans %}Views by empty namespace{% endblocktrans %}
{% endif %}
</h6>
</a>
{% endfor %}
</div>
</div>
<div class="col-7 col-sm-9">
<div class="tab-content" id="tabs-tabContent">
{% for ns_views in views_by_ns %}
<div class="tab-pane text-left fade{% if forloop.first %} show active{% endif %}" id="tabs-{{ ns_views.grouper }}" role="tabpanel" aria-labelledby="tabs-{{ ns_views.grouper }}-control">
{% for view in ns_views.list|dictsort:"url" %}
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title"><a href="{% url 'django-admindocs-views-detail' view=view.full_name %}">{{ view.url }}</a></h3>
</div>
<div class="card-body">
<p class="small quiet">{% blocktrans 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>.{% endblocktrans %}</p>
<p>{{ view.title }}</p>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}