Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Exposed model __doc__ in admin docs views which fixes #1408. Thanks, …

…poelzi

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b830fa7e7896bc7e13254740b12ec5ab7eed82cf 1 parent eeb848b
@jacobian jacobian authored
View
4 django/contrib/admin/templates/admin_doc/model_detail.html
@@ -16,6 +16,10 @@
<div id="content-main">
<h1>{{ summary }}</h1>
+{% if description %}
+ <p>{% filter escape|linebreaksbr %}{% trans description %}{% endfilter %}</p>
+{% endif %}
+
<div class="module">
<table class="model">
<thead>
View
1  django/contrib/admin/views/doc.py
@@ -185,6 +185,7 @@ def model_detail(request, model):
return render_to_response('admin_doc/model_detail', {
'name': '%s.%s' % (opts.app_label, opts.module_name),
'summary': "Fields on %s objects" % opts.verbose_name,
+ 'description' : model.__doc__,
'fields': fields,
}, context_instance=DjangoContext(request))
model_detail = staff_member_required(model_detail)
Please sign in to comment.
Something went wrong with that request. Please try again.