Ticket #16866: handle_empty_list_of_templates.diff
File handle_empty_list_of_templates.diff, 614 bytes (added by , 13 years ago) |
---|
-
django/template/loader.py
180 180 def select_template(template_name_list): 181 181 "Given a list of template names, returns the first that can be loaded." 182 182 not_found = [] 183 if not template_name_list: 184 raise ValueError("Couldn't choose template for load since there are" 185 " no candidates") 183 186 for template_name in template_name_list: 184 187 try: 185 188 return get_template(template_name)