Permalink
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...
1 parent eeb848b commit b830fa7e7896bc7e13254740b12ec5ab7eed82cf @jacobian jacobian committed Feb 27, 2006
Showing with 5 additions and 0 deletions.
  1. +4 −0 django/contrib/admin/templates/admin_doc/model_detail.html
  2. +1 −0 django/contrib/admin/views/doc.py
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)

0 comments on commit b830fa7

Please sign in to comment.