No worries. I updated the get_db_prep_save to

  def get_db_prep_save(self, value):
    if not isinstance( value, basestring ):
      return cPickle.dumps(value)
    else:
      return value

So that it doesn't re-pickle data that is already a string. Then I
unpickle the field if it's a string when ever I use it. A little
clunky, but my project's getting done.

--Aaron

On Jun 11, 4:34 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-06-10 at 15:59 +0000, [EMAIL PROTECTED] wrote:
> > Ok, turns out my code doesn't work. What gets called to convert the
> > data as soon as you get it back from the database? I've got it
> > pickling on the way in, but it doesn't unpickle on the way out unless
> > I call validate manually.
>
> Nothing does. This is one of the missing pieces for Field sub-classing.
> Django just shoves the raw database value into the class's attribute.
> Calling a coercion function is something that needs be added.
>
> It will happen very soon now, just a little more patience. I've nearly
> caught up on my backlog.
>
> Regards,
> Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to