Ticket #5405: 5405-1.diff
File 5405-1.diff, 2.0 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/templates/admin_doc/model_detail.html
15 15 16 16 {% block content %} 17 17 <div id="content-main"> 18 <h1>{{ summary|escape }}</h1> 18 <h1>{{ name|escape }}</h1> 19 <h2 class="subhead">{% if summary %} 20 {% trans summary %} 21 {% endif %}</h2> 19 22 20 {% if description%}21 <p>{% filter escape|linebreaksbr %}{% trans description %}{% endfilter%}</p>23 {% if body %} 24 <p>{% trans body %}</p> 22 25 {% endif %} 23 26 27 <h2>{{ fieldsheading|escape }}</h2> 24 28 <div class="module"> 25 29 <table class="model"> 26 30 <thead> -
django/contrib/admindocs/views.py
173 173 174 174 opts = model._meta 175 175 176 title, body, metadata = utils.parse_docstring(model.__doc__) 177 if title: 178 title = utils.parse_rst(title, 'model', _('model:') + model_name) 179 if body: 180 body = utils.parse_rst(body, 'model', _('model:') + model_name) 181 for key in metadata: 182 metadata[key] = utils.parse_rst(metadata[key], 'model', _('model:') + model_name) 183 176 184 # Gather fields/field descriptions. 177 185 fields = [] 178 186 for field in opts.fields: … … 227 235 228 236 return render_to_response('admin_doc/model_detail.html', { 229 237 'name': '%s.%s' % (opts.app_label, opts.object_name), 230 'summary': _("Fields on %s objects") % opts.object_name,231 ' description': model.__doc__,238 'summary': title, 239 'fieldsheading': _("Fields on %s objects") % opts.object_name, 232 240 'fields': fields, 241 'body': body, 242 'meta': metadata, 233 243 }, context_instance=RequestContext(request)) 234 244 model_detail = staff_member_required(model_detail) 235 245