=== modified file 'django/contrib/admin/templatetags/admin_list.py'
|
|
|
23 | 23 | return mark_safe(u'<span class="this-page">%d</span> ' % (i+1)) |
24 | 24 | else: |
25 | 25 | return mark_safe(u'<a href="%s"%s>%d</a> ' % (cl.get_query_string({PAGE_VAR: i}), (i == cl.paginator.pages-1 and ' class="end"' or ''), i+1)) |
26 | | paginator_number = register.simple_tag(paginator_number) |
| 26 | register.simple_tag(paginator_number) |
27 | 27 | |
28 | 28 | def pagination(cl): |
29 | 29 | paginator, page_num = cl.paginator, cl.page_num |
… |
… |
|
66 | 66 | 'ALL_VAR': ALL_VAR, |
67 | 67 | '1': 1, |
68 | 68 | } |
69 | | pagination = register.inclusion_tag('admin/pagination.html')(pagination) |
| 69 | register.inclusion_tag('admin/pagination.html')(pagination) |
70 | 70 | |
71 | 71 | def result_headers(cl): |
72 | 72 | lookup_opts = cl.lookup_opts |
… |
… |
|
207 | 207 | return {'cl': cl, |
208 | 208 | 'result_headers': list(result_headers(cl)), |
209 | 209 | 'results': list(results(cl))} |
210 | | result_list = register.inclusion_tag("admin/change_list_results.html")(result_list) |
| 210 | register.inclusion_tag("admin/change_list_results.html")(result_list) |
211 | 211 | |
212 | 212 | def date_hierarchy(cl): |
213 | 213 | if cl.date_hierarchy: |
… |
… |
|
268 | 268 | 'title': year.year |
269 | 269 | } for year in years] |
270 | 270 | } |
271 | | date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy) |
| 271 | register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy) |
272 | 272 | |
273 | 273 | def search_form(cl): |
274 | 274 | return { |
… |
… |
|
276 | 276 | 'show_result_count': cl.result_count != cl.full_result_count and not cl.opts.one_to_one_field, |
277 | 277 | 'search_var': SEARCH_VAR |
278 | 278 | } |
279 | | search_form = register.inclusion_tag('admin/search_form.html')(search_form) |
| 279 | register.inclusion_tag('admin/search_form.html')(search_form) |
280 | 280 | |
281 | 281 | def admin_list_filter(cl, spec): |
282 | 282 | return {'title': spec.title(), 'choices' : list(spec.choices(cl))} |
283 | | admin_list_filter = register.inclusion_tag('admin/filter.html')(admin_list_filter) |
| 283 | register.inclusion_tag('admin/filter.html')(admin_list_filter) |