Changes between Initial Version and Version 2 of Ticket #13758
- Timestamp:
- Jun 18, 2010, 9:58:54 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13758
- Property Has patch set
- Property Needs tests set
- Property Triage Stage Unreviewed → Accepted
-
Ticket #13758 – Description
initial v2 18 18 19 19 Here is CharField's implementation: 20 {{{ 20 21 def to_python(self, value): 21 22 if isinstance(value, basestring) or value is None: … … 25 26 def get_prep_value(self, value): 26 27 return self.to_python(value) 28 }}} 27 29 28 30 Here is Filefield's: 31 {{{ 29 32 def get_prep_value(self, value): 30 33 "Returns field's value prepared for saving into a database." … … 33 36 return None 34 37 return unicode(value) 38 }}} 35 39 36 40 My experimentations revealed that if I replace the FileField … … 40 44 implementation simply checks if the value is an instance of basestring 41 45 and quietly passes it through. 42 43