Changes between Initial Version and Version 2 of Ticket #13758


Ignore:
Timestamp:
Jun 18, 2010, 9:58:54 AM (14 years ago)
Author:
Russell Keith-Magee
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13758

    • Property Has patch set
    • Property Needs tests set
    • Property Triage Stage UnreviewedAccepted
  • Ticket #13758 – Description

    initial v2  
    1818
    1919Here is CharField's implementation:
     20{{{
    2021    def to_python(self, value):
    2122        if isinstance(value, basestring) or value is None:
     
    2526    def get_prep_value(self, value):
    2627        return self.to_python(value)
     28}}}
    2729
    2830Here is Filefield's:
     31{{{
    2932    def get_prep_value(self, value):
    3033        "Returns field's value prepared for saving into a database."
     
    3336            return None
    3437        return unicode(value)
     38}}}
    3539
    3640My experimentations revealed that if I replace the FileField
     
    4044implementation simply checks if the value is an instance of basestring
    4145and quietly passes it through.
    42 
    43 
Back to Top