Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 20416b2972ed0303a0ab47514bd58e842dbee487 1 parent ce6f058
@jacobian jacobian authored
View
1  django/contrib/admin/templates/admin_doc/model_detail.html
@@ -5,6 +5,7 @@
{{ block.super }}
<style type="text/css">
.module table { width:100%; }
+.module table p { padding: 0; margin: 0; }
</style>
{% endblock %}
View
10 django/contrib/admin/views/doc.py
@@ -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)
accessor = rel.get_accessor_name()
fields.append({
- 'name' : "%s.all" % accessor,
- 'verbose' : utils.parse_rst("all " + verbose , 'model', 'model:' + opts.module_name),
+ 'name' : "%s.all" % accessor,
+ 'data_type' : 'List',
+ 'verbose' : utils.parse_rst("all " + verbose , 'model', 'model:' + opts.module_name),
})
fields.append({
- 'name' : "%s.count" % accessor,
- 'verbose' : utils.parse_rst("number of " + verbose , 'model', 'model:' + opts.module_name),
+ 'name' : "%s.count" % accessor,
+ 'data_type' : 'Integer',
+ 'verbose' : utils.parse_rst("number of " + verbose , 'model', 'model:' + opts.module_name),
})
return render_to_response('admin_doc/model_detail.html', {
Please sign in to comment.
Something went wrong with that request. Please try again.