app/django/contrib/admindocs/templates/admin_doc/view_index.html
author Sverre Rabbelier <srabbelier@gmail.com>
Fri, 23 Jan 2009 21:20:33 +0000
changeset 935 09f47e08f805
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Adust the as_table tag to render a pick link if appropriate The templates are adjusted to pass on a 'reference' value, which is the url_name of the view from which the entity should be picked. The as_table (and related) function(s) construct and then pass on this argument and enable takes_contex so that we have access to the context of the enclosing template. We only extract ReferenceProperties that end with '_link_id' since that is how all RP's are currently named. It is not possible to create a field with the same name as the RP, as GAE will try to interpret it's contents as the key of an entity before even calling any function we can override. Patch by: Sverre Rabbelier

{% extends "admin/base_site.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Views</div>{% endblock %}
{% block title %}Views{% endblock %}

{% block content %}

<h1>View documentation</h1>

{% regroup views|dictsort:"site_id" by site as views_by_site %}

<div id="content-related" class="sidebar">
<div class="module">
<h2>Jump to site</h2>
<ul>
    {% for site_views in views_by_site %}
    <li><a href="#site{{ site_views.grouper.id }}">{{ site_views.grouper.name }}</a></li>
    {% endfor %}
</ul>
</div>
</div>

<div id="content-main">

{% for site_views in views_by_site %}
<div class="module">
<h2 id="site{{ site_views.grouper.id }}">Views by URL on {{ site_views.grouper.name }}</h2>

{% for view in site_views.list|dictsort:"url" %}
{% ifchanged %}
<h3><a href="{{ view.module }}.{{ view.name }}/">{{ view.url }}</a></h3>
<p class="small quiet">View function: {{ view.module }}.{{ view.name }}</p>
<p>{{ view.title }}</p>
<hr />
{% endifchanged %}
{% endfor %}
</div>
{% endfor %}
</div>
{% endblock %}