diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
a
|
b
|
|
17 | 17 | DOT = '.' |
18 | 18 | |
19 | 19 | def paginator_number(cl,i): |
| 20 | """ |
| 21 | Generates an individual page index link in a paginated list. |
| 22 | """ |
20 | 23 | if i == DOT: |
21 | 24 | return u'... ' |
22 | 25 | elif i == cl.page_num: |
… |
… |
|
26 | 29 | paginator_number = register.simple_tag(paginator_number) |
27 | 30 | |
28 | 31 | def pagination(cl): |
| 32 | """ |
| 33 | Generates the series of links to the pages in a paginated list. |
| 34 | """ |
29 | 35 | paginator, page_num = cl.paginator, cl.page_num |
30 | 36 | |
31 | 37 | pagination_required = (not cl.show_all or not cl.can_show_all) and cl.multi_page |
… |
… |
|
69 | 75 | pagination = register.inclusion_tag('admin/pagination.html')(pagination) |
70 | 76 | |
71 | 77 | def result_headers(cl): |
| 78 | """ |
| 79 | Generates the list column headers. |
| 80 | """ |
72 | 81 | lookup_opts = cl.lookup_opts |
73 | 82 | |
74 | 83 | for i, field_name in enumerate(cl.list_display): |
… |
… |
|
139 | 148 | return mark_safe(u'<img src="%simg/admin/icon-%s.gif" alt="%s" />' % (settings.ADMIN_MEDIA_PREFIX, BOOLEAN_MAPPING[field_val], field_val)) |
140 | 149 | |
141 | 150 | def items_for_result(cl, result, form): |
| 151 | """ |
| 152 | Generates the actual list of data. |
| 153 | """ |
142 | 154 | first = True |
143 | 155 | pk = cl.lookup_opts.pk.attname |
144 | 156 | for field_name in cl.list_display: |
… |
… |
|
253 | 265 | yield list(items_for_result(cl, res, None)) |
254 | 266 | |
255 | 267 | def result_list(cl): |
| 268 | """ |
| 269 | Displays the headers and data list together |
| 270 | """ |
256 | 271 | return {'cl': cl, |
257 | 272 | 'result_headers': list(result_headers(cl)), |
258 | 273 | 'results': list(results(cl))} |
259 | 274 | result_list = register.inclusion_tag("admin/change_list_results.html")(result_list) |
260 | 275 | |
261 | 276 | def date_hierarchy(cl): |
| 277 | """ |
| 278 | Displays the date hierarchy for date drill-down functionality. |
| 279 | """ |
262 | 280 | if cl.date_hierarchy: |
263 | 281 | field_name = cl.date_hierarchy |
264 | 282 | year_field = '%s__year' % field_name |
… |
… |
|
320 | 338 | date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy) |
321 | 339 | |
322 | 340 | def search_form(cl): |
| 341 | """ |
| 342 | Displays a search form for searching the list. |
| 343 | """ |
323 | 344 | return { |
324 | 345 | 'cl': cl, |
325 | 346 | 'show_result_count': cl.result_count != cl.full_result_count, |
diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py
a
|
b
|
|
20 | 20 | prepopulated_fields_js = register.inclusion_tag('admin/prepopulated_fields_js.html', takes_context=True)(prepopulated_fields_js) |
21 | 21 | |
22 | 22 | def submit_row(context): |
| 23 | """ |
| 24 | Displays the row of buttons for delete and save. |
| 25 | """ |
23 | 26 | opts = context['opts'] |
24 | 27 | change = context['change'] |
25 | 28 | is_popup = context['is_popup'] |