diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 9c5a5f1..edbc876 100644
a
|
b
|
class AdminSite(object):
|
366 | 366 | context_instance=template.RequestContext(request) |
367 | 367 | ) |
368 | 368 | |
369 | | def app_index(self, request, app_label): |
| 369 | def app_index(self, request, app_label, extra_context=None): |
370 | 370 | user = request.user |
371 | 371 | has_module_perms = user.has_module_perms(app_label) |
372 | 372 | app_dict = {} |
… |
… |
class AdminSite(object):
|
399 | 399 | raise http.Http404('The requested admin page does not exist.') |
400 | 400 | # Sort the models alphabetically within each app. |
401 | 401 | app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name'])) |
402 | | return render_to_response(self.app_index_template or 'admin/app_index.html', { |
| 402 | context = { |
403 | 403 | 'title': _('%s administration' % capfirst(app_label)), |
404 | 404 | 'app_list': [app_dict] |
405 | | }, context_instance=template.RequestContext(request)) |
| 405 | } |
| 406 | context.update(extra_context or {}) |
| 407 | return render_to_response(self.app_index_template or 'admin/app_index.html', context, |
| 408 | context_instance=template.RequestContext(request) |
| 409 | ) |
406 | 410 | |
407 | 411 | # This global object represents the default admin site, for the common case. |
408 | 412 | # You can instantiate AdminSite in your own code to create a custom admin site. |