diff --git a/django/contrib/admindocs/templates/admin_doc/model_detail.html b/django/contrib/admindocs/templates/admin_doc/model_detail.html
index 9fb4eee..987d85d 100644
a
|
b
|
|
22 | 22 | |
23 | 23 | {% block content %} |
24 | 24 | <div id="content-main"> |
25 | | <h1>{{ summary }}</h1> |
26 | | |
27 | | {% if description %} |
28 | | <p>{% filter linebreaksbr %}{% trans description %}{% endfilter %}</p> |
29 | | {% endif %} |
| 25 | <h1>{{ name }}</h1> |
| 26 | <h2>{% trans "Description" %}</h2> |
| 27 | {% if summary %}<strong>{% trans summary %}</strong>{% endif %} |
| 28 | {% if description %}<p>{% trans description %}</p>{% endif %} |
30 | 29 | |
| 30 | <h2>{{ heading }}</h2> |
31 | 31 | <div class="module"> |
32 | 32 | <table class="model"> |
33 | 33 | <thead> |
diff --git a/django/contrib/admindocs/views.py b/django/contrib/admindocs/views.py
index 94963b4..71924de 100644
a
|
b
|
def model_detail(request, app_label, model_name):
|
196 | 196 | |
197 | 197 | opts = model._meta |
198 | 198 | |
| 199 | title, description, metadata = utils.parse_docstring(model.__doc__) |
| 200 | if title: |
| 201 | title = utils.parse_rst(title, 'model', _('model:') + model_name) |
| 202 | if description: |
| 203 | description = utils.parse_rst(description, 'model', _('model:') + model_name) |
| 204 | for key in metadata: |
| 205 | metadata[key] = utils.parse_rst(metadata[key], 'model', _('model:') + model_name) |
| 206 | |
199 | 207 | # Gather fields/field descriptions. |
200 | 208 | fields = [] |
201 | 209 | for field in opts.fields: |
… |
… |
def model_detail(request, app_label, model_name):
|
266 | 274 | return render_to_response('admin_doc/model_detail.html', { |
267 | 275 | 'root_path': urlresolvers.reverse('admin:index'), |
268 | 276 | 'name': '%s.%s' % (opts.app_label, opts.object_name), |
269 | | 'summary': _("Fields on %s objects") % opts.object_name, |
270 | | 'description': model.__doc__, |
| 277 | 'heading': _("Fields on %s objects") % opts.object_name, |
| 278 | 'summary': title, |
| 279 | 'description': description, |
| 280 | 'meta': metadata, |
271 | 281 | 'fields': fields, |
272 | 282 | }, context_instance=RequestContext(request)) |
273 | 283 | |