From 49c670871634e78d588cba21f84b094479f2aa4f Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Tue, 2 Aug 2005 20:29:27 +0000 Subject: [PATCH] Added doc view for templates that will show the search path for a given template on each site git-svn-id: http://code.djangoproject.com/svn/django/trunk@392 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../admin_templates/doc/template_detail.html | 21 +++++++++++++++++++ django/conf/urls/admin.py | 2 ++ django/views/admin/doc.py | 21 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 django/conf/admin_templates/doc/template_detail.html diff --git a/django/conf/admin_templates/doc/template_detail.html b/django/conf/admin_templates/doc/template_detail.html new file mode 100644 index 0000000000..374b737022 --- /dev/null +++ b/django/conf/admin_templates/doc/template_detail.html @@ -0,0 +1,21 @@ +{% extends "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/conf/urls/admin.py b/django/conf/urls/admin.py index a55da5d366..89b7040472 100644 --- a/django/conf/urls/admin.py +++ b/django/conf/urls/admin.py @@ -18,6 +18,8 @@ urlpatterns = ( ('^doc/views/(?P[^/]+)/$', 'django.views.admin.doc.view_detail'), ('^doc/models/$', 'django.views.admin.doc.model_index'), ('^doc/models/(?P[^/]+)/$', 'django.views.admin.doc.model_detail'), +# ('^doc/templates/$', 'django.views.admin.doc.template_index'), + ('^doc/templates/(?P