Ticket #1756: patch.diff
File patch.diff, 749 bytes (added by , 19 years ago) |
---|
-
django/forms/__init__.py
871 871 "A SelectField whose choices are the files in a given directory." 872 872 def __init__(self, field_name, path, match=None, recursive=False, is_required=False, validator_list=[]): 873 873 import os 874 from django.db import models 874 875 if match is not None: 875 876 import re 876 877 match_re = re.compile(match) 877 choices = []878 choices = not is_required and models.BLANK_CHOICE_DASH[:] or [] 878 879 if recursive: 879 880 for root, dirs, files in os.walk(path): 880 881 for f in files: