fix loop in template; use get_list_or_404 in view