Made a few small tweaks to admin doc pages.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2006-05-18 15:17:42 +00:00
parent ce6f058bbb
commit 20416b2972
2 changed files with 7 additions and 4 deletions

View File

@ -5,6 +5,7 @@
{{ block.super }} {{ block.super }}
<style type="text/css"> <style type="text/css">
.module table { width:100%; } .module table { width:100%; }
.module table p { padding: 0; margin: 0; }
</style> </style>
{% endblock %} {% endblock %}

View File

@ -206,12 +206,14 @@ def model_detail(request, app_label, model_name):
verbose = "related `%s.%s` objects" % (rel.opts.app_label, rel.opts.object_name) verbose = "related `%s.%s` objects" % (rel.opts.app_label, rel.opts.object_name)
accessor = rel.get_accessor_name() accessor = rel.get_accessor_name()
fields.append({ fields.append({
'name' : "%s.all" % accessor, 'name' : "%s.all" % accessor,
'verbose' : utils.parse_rst("all " + verbose , 'model', 'model:' + opts.module_name), 'data_type' : 'List',
'verbose' : utils.parse_rst("all " + verbose , 'model', 'model:' + opts.module_name),
}) })
fields.append({ fields.append({
'name' : "%s.count" % accessor, 'name' : "%s.count" % accessor,
'verbose' : utils.parse_rst("number of " + verbose , 'model', 'model:' + opts.module_name), 'data_type' : 'Integer',
'verbose' : utils.parse_rst("number of " + verbose , 'model', 'model:' + opts.module_name),
}) })
return render_to_response('admin_doc/model_detail.html', { return render_to_response('admin_doc/model_detail.html', {