diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py index b64f518c1d..8efef6b542 100644 --- a/django/contrib/admin/templatetags/admin_list.py +++ b/django/contrib/admin/templatetags/admin_list.py @@ -167,7 +167,7 @@ def items_for_result(cl, result): if first: # First column is a special case first = False url = cl.url_for_result(result) - result_id = getattr(result, pk) + result_id = str(getattr(result, pk)) # str() is needed in case of 23L (long ints) yield ('