def list_max_show_all(changelist):
 try:
  from django.contrib.admin.views.main import MAX_SHOW_ALL_ALLOWED
  return MAX_SHOW_ALL_ALLOWED
 except ImportError:
  return changelist.list_max_show_all

def list_max_show_all ( changelist ) : try : from django . contrib . admin . views . main import MAX_SHOW_ALL_ALLOWED return MAX_SHOW_ALL_ALLOWED except ImportError : return changelist . list_max_show_all
returns the maximum amount of results a changelist can have for the "show all" link to be displayed in a manner compatible with both django 1 .