Ticket #5894: diff.2.diff
File diff.2.diff, 1.1 KB (added by , 17 years ago) |
---|
-
django/db/models/fields/__init__.py
812 812 class FilePathField(Field): 813 813 def __init__(self, verbose_name=None, name=None, path='', match=None, recursive=False, **kwargs): 814 814 self.path, self.match, self.recursive = path, match, recursive 815 kwargs['max_length'] = kwargs.get('max_length', 100)816 815 Field.__init__(self, verbose_name, name, **kwargs) 816 817 def formfield(self, **kwargs): 818 defaults = { 819 'path': self.path, 820 'match': self.match, 821 'recursive': self.recursive, 822 'form_class': forms.FilePathField, 823 } 824 defaults.update(kwargs) 825 return super(FilePathField, self).formfield(**defaults) 817 826 818 def get_manipulator_field_objs(self):819 return [curry(oldforms.FilePathField, path=self.path, match=self.match, recursive=self.recursive)]820 821 827 class FloatField(Field): 822 828 empty_strings_allowed = False