Ticket #1408: django_admin_modules_description.diff
File django_admin_modules_description.diff, 1.7 KB (added by , 19 years ago) |
---|
-
db/models/options.py
12 12 13 13 DEFAULT_NAMES = ('verbose_name', 'verbose_name_plural', 'db_table', 'ordering', 14 14 'unique_together', 'permissions', 'get_latest_by', 15 'order_with_respect_to', 'app_label' )15 'order_with_respect_to', 'app_label', 'description') 16 16 17 17 class Options: 18 18 def __init__(self, meta): … … 31 31 self.pk = None 32 32 self.has_auto_field = False 33 33 self.one_to_one_field = None 34 self.description = None 34 35 35 36 def merge_meta(self): 36 37 meta_attrs = self.meta.__dict__ -
contrib/admin/views/doc.py
191 191 return render_to_response('admin_doc/model_detail', { 192 192 'name': '%s.%s' % (opts.app_label, opts.object_name), 193 193 'summary': "Fields on %s objects" % opts.object_name, 194 'description': opts.description, 194 195 'fields': fields, 195 196 }, context_instance=RequestContext(request)) 196 197 model_detail = staff_member_required(model_detail) -
contrib/admin/templates/admin_doc/model_detail.html
15 15 {% block content %} 16 16 <div id="content-main"> 17 17 <h1>{{ summary }}</h1> 18 {% if description %} 19 <p>{{ description }}</p> 20 {% endif %} 18 21 19 22 <div class="module"> 20 23 <table class="model">