Simplify the django_script.extract_list function.