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
This commit is contained in:
Jacob Kaplan-Moss 2006-02-27 21:05:50 +00:00
parent eeb848bdbd
commit b830fa7e78
2 changed files with 5 additions and 0 deletions

View File

@ -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 File

@ -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)