1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

Fixed #917 -- Made admin change_list view overridable by custom templates

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1468 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2005-11-27 20:25:56 +00:00
parent 4cdaf74cec
commit 6a36699818
2 changed files with 9 additions and 10 deletions

View File

@@ -241,15 +241,14 @@ def change_list(request, app_label, module_name):
'is_popup': cl.is_popup,
'cl' : cl
})
c.update( { 'has_add_permission': c['perms'][app_label][cl.opts.get_add_permission()]}),
return render_to_response('admin/change_list',
context_instance = c)
c.update({'has_add_permission': c['perms'][app_label][cl.opts.get_add_permission()]}),
return render_to_response(['admin/%s/%s/change_list' % (app_label, cl.opts.object_name.lower()),
'admin/%s/change_list' % app_label,
'admin/change_list'], context_instance=c)
change_list = staff_member_required(change_list)
use_raw_id_admin = lambda field: isinstance(field.rel, (meta.ManyToOne, meta.ManyToMany)) and field.rel.raw_id_admin
def get_javascript_imports(opts,auto_populated_fields, ordered_objects, field_sets):
# Put in any necessary JavaScript imports.
js = ['js/core.js', 'js/admin/RelatedObjectLookups.js']