From f07e5d4f5df5ca9ca3366d7ecc4b01c490c13198 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 19 Oct 2005 01:09:05 +0000 Subject: Fixed #627 -- BACKWARDS-INCOMPATIBLE CHANGE. Admin is now an app, not a middleware. See BackwardsIncompatibleChanges for a full list of changes and information on how to update your code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@948 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../admin/templates/admin_doc/bookmarklets.html | 30 +++++++++++++ .../contrib/admin/templates/admin_doc/index.html | 28 ++++++++++++ .../templates/admin_doc/missing_docutils.html | 17 ++++++++ .../admin/templates/admin_doc/model_detail.html | 46 ++++++++++++++++++++ .../admin/templates/admin_doc/model_index.html | 44 +++++++++++++++++++ .../admin/templates/admin_doc/template_detail.html | 21 +++++++++ .../templates/admin_doc/template_filter_index.html | 50 ++++++++++++++++++++++ .../templates/admin_doc/template_tag_index.html | 49 +++++++++++++++++++++ .../admin/templates/admin_doc/view_detail.html | 26 +++++++++++ .../admin/templates/admin_doc/view_index.html | 44 +++++++++++++++++++ 10 files changed, 355 insertions(+) create mode 100644 django/contrib/admin/templates/admin_doc/bookmarklets.html create mode 100644 django/contrib/admin/templates/admin_doc/index.html create mode 100644 django/contrib/admin/templates/admin_doc/missing_docutils.html create mode 100644 django/contrib/admin/templates/admin_doc/model_detail.html create mode 100644 django/contrib/admin/templates/admin_doc/model_index.html create mode 100644 django/contrib/admin/templates/admin_doc/template_detail.html create mode 100644 django/contrib/admin/templates/admin_doc/template_filter_index.html create mode 100644 django/contrib/admin/templates/admin_doc/template_tag_index.html create mode 100644 django/contrib/admin/templates/admin_doc/view_detail.html create mode 100644 django/contrib/admin/templates/admin_doc/view_index.html (limited to 'django/contrib/admin/templates/admin_doc') diff --git a/django/contrib/admin/templates/admin_doc/bookmarklets.html b/django/contrib/admin/templates/admin_doc/bookmarklets.html new file mode 100644 index 0000000000..d396ec53b5 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/bookmarklets.html @@ -0,0 +1,30 @@ +{% extends "admin/base_site" %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Documentation bookmarklets{% endblock %} + +{% block content %} + +

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. Note that some of these +bookmarklets require you to be viewing the site from a computer designated +as "internal" (talk to your system administrator if you aren't sure if +your computer is "internal").

+ +
+

Documentation for this page

+

Jumps you from any page to the documentation for the view that generates that page.

+ +

Show object ID

+

Shows the content-type and unique ID for pages that represent a single object.

+ +

Edit this object (current window)

+

Jumps to the admin page for pages that represent a single object.

+ +

Edit this object (new window)

+

As above, but opens the admin page in a new window.

+
+ +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/index.html b/django/contrib/admin/templates/admin_doc/index.html new file mode 100644 index 0000000000..77d2a96bf2 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/index.html @@ -0,0 +1,28 @@ +{% extends "admin/base_site" %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Documentation{% endblock %} + +{% block content %} + +

Documentation

+ +
+

Tags

+

List of all the template tags and their functions.

+ +

Filters

+

Filters are actions which can be applied to variables in a template to alter the output.

+ +

Models

+

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.

+ +

Views

+

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.

+ +

Bookmarklets

+

Tools for your browser to quickly access admin functionality.

+
+ +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/missing_docutils.html b/django/contrib/admin/templates/admin_doc/missing_docutils.html new file mode 100644 index 0000000000..40004c41ab --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/missing_docutils.html @@ -0,0 +1,17 @@ +{% extends "admin/base_site" %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Please install docutils{% endblock %} + +{% block content %} + +

Documentation

+ +
+

The admin documentation system requires Python's docutils library.

+ +

Please ask your administrators to install docutils.

+
+ +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/model_detail.html b/django/contrib/admin/templates/admin_doc/model_detail.html new file mode 100644 index 0000000000..d3621b7434 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/model_detail.html @@ -0,0 +1,46 @@ +{% extends "admin/base_site" %} + +{% block extrahead %} + +{{ block.super }} + + + +{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Model: {{ name }}{% endblock %} + +{% block content %} +
+

{{ summary }}

+ +
+ + + + + + + + + +{% for field in fields|dictsort:"name" %} + + + + + +{% endfor %} + +
FieldTypeDescription
{{ field.name }}{{ field.data_type }}{{ field.verbose|default:"" }}{% if field.help_text %} - {{ field.help_text }}{% endif %}
+
+ +

‹ Back to Models Documentation

+
+{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/model_index.html b/django/contrib/admin/templates/admin_doc/model_index.html new file mode 100644 index 0000000000..5896ee136e --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/model_index.html @@ -0,0 +1,44 @@ +{% extends "admin/base_site" %} + +{% block coltype %}colSM{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Models{% endblock %} + +{% block content %} + +

Models Documentation

+ +
+{% regroup models|dictsort:"module" by module as grouped_models %} +{% for group in grouped_models %} +
+

{{ group.grouper }}

+ + +{% for model in group.list %} + + + +{% endfor %} +
{{ model.class }}
+
+{% endfor %} + +
+{% endblock %} + +{% block sidebar %} + +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/template_detail.html b/django/contrib/admin/templates/admin_doc/template_detail.html new file mode 100644 index 0000000000..448ff212ba --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/template_detail.html @@ -0,0 +1,21 @@ +{% extends "admin/base_site" %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Template: {{ name }}{% endblock %} + +{% block content %} +

Template: "{{ name }}"

+ +{% regroup templates|dictsort:"site_id" by site as templates_by_site %} +{% for group in templates_by_site %} +

Search path for template "{{ name }}" on {{ group.grouper }}:

+
    + {% for template in group.list|dictsort:"order" %} +
  1. {{ template.file }}{% if not template.exists %} (does not exist){% endif %}
  2. + {% endfor %} +
+{% endfor %} + +

‹ Back to Documentation

+{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/template_filter_index.html b/django/contrib/admin/templates/admin_doc/template_filter_index.html new file mode 100644 index 0000000000..23f0862457 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/template_filter_index.html @@ -0,0 +1,50 @@ +{% extends "admin/base_site" %} + +{% block coltype %}colSM{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Template filters{% endblock %} + +{% block content %} + +

Template filter documentation

+ +
+{% regroup filters|dictsort:"library" by library as filter_libraries %} +{% for library in filter_libraries %} +
+

{% if library.grouper %}{{ library.grouper }}{% else %}Built-in filters{% endif %}

+ {% if library.grouper %}

To use these filters, put {% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %} in your template before using the filter.


{% endif %} + {% for filter in library.list|dictsort:"name" %} +

{{ filter.name }}

+

{{ filter.title }}

+

Usage: {% templatetag openvariable %} variable|{{ filter.name }}{% if filter.meta.AcceptsArgument %}:"arg"{% endif %} {% templatetag closevariable %}

+

{{ filter.body }}

+ {% if not forloop.last %}
{% endif %} + {% endfor %} +
+{% endfor %} +
+ +{% endblock %} + +{% block sidebar %} + + + +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/template_tag_index.html b/django/contrib/admin/templates/admin_doc/template_tag_index.html new file mode 100644 index 0000000000..83b2572322 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/template_tag_index.html @@ -0,0 +1,49 @@ +{% extends "admin/base_site" %} + +{% block coltype %}colSM{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Template tags{% endblock %} + +{% block content %} + +

Template tag documentation

+ +
+{% regroup tags|dictsort:"library" by library as tag_libraries %} +{% for library in tag_libraries %} +
+

{% if library.grouper %}{{ library.grouper }}{% else %}Built-in tags{% endif %}

+ {% if library.grouper %}

To use these tags, put {% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %} in your template before using the tag.


{% endif %} + {% for tag in library.list|dictsort:"name" %} +

{{ tag.name }}

+

{{ tag.title }}

+

{{ tag.body }}

+ {% if not forloop.last %}
{% endif %} + {% endfor %} +
+{% endfor %} +
+ +{% endblock %} + +{% block sidebar %} + + + +{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/view_detail.html b/django/contrib/admin/templates/admin_doc/view_detail.html new file mode 100644 index 0000000000..9fb06e7eb7 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/view_detail.html @@ -0,0 +1,26 @@ +{% extends "admin/base_site" %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}View: {{ name }}{% endblock %} + +{% block content %} + +

{{ name }}

+ +

{{ summary }}

+ +

{{ body }}

+ +{% if meta.Context %} +

Context:

+

{{ meta.Context }}

+{% endif %} + +{% if meta.Templates %} +

Templates:

+

{{ meta.Templates }}

+{% endif %} + +

‹ Back to Views Documentation

+{% endblock %} diff --git a/django/contrib/admin/templates/admin_doc/view_index.html b/django/contrib/admin/templates/admin_doc/view_index.html new file mode 100644 index 0000000000..90ef5b1c90 --- /dev/null +++ b/django/contrib/admin/templates/admin_doc/view_index.html @@ -0,0 +1,44 @@ +{% extends "admin/base_site" %} + +{% block coltype %}colSM{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block title %}Views{% endblock %} + +{% block content %} + +

View documentation

+ +{% regroup views|dictsort:"site_id" by site as views_by_site %} + + + +
+ +{% for site_views in views_by_site %} +
+

Views by URL on {{ site_views.grouper.name }}

+ +{% for view in site_views.list|dictsort:"url" %} +{% ifchanged %} +

{{ view.url|escape }}

+

View function: {{ view.module }}.{{ view.name }}

+

{{ view.title }}

+
+{% endifchanged %} +{% endfor %} +
+{% endfor %} +
+{% endblock %} + -- cgit v1.3