On Dec 13, 2007 3:11 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Heh, I just picked this up, too! I got the field working almost
> straight away after your kind help (all apart from queries, which I
> haven't fixed yet as I've been traveling up until this evening)

Glad to hear you're making progress!

> Anyway, what I have is http://dpaste.com/27955/ which seems to work
> fine, all apart from the issue I detail in
> http://groups.google.com/group/django-users/browse_frm/thread/dc8aaf47a79cd31c#6f4fffeca4c5c6dc

A couple of comments that might help you out:

1.) Using db_type() makes me cringe, especially the way you're using
it. Try this instead.

def get_internal_type(self):
    return "TextField"

No importing of database backends. Much nicer.

2.) I can't say for certain about your query problem without trying
out the code myself, but it doesn't look like your
get_db_prep_lookup() is doing what you want it to do. You're storing
the entire value (dictionary, perhaps?) as a single pickled string,
but you're looking up based on a list of pickled dictionary keys
instead.

Basically, I don't think "the ORM" is iterating over your dictionary.
You are. Try using something like [pickle.dumps(values)] if you want
it to match the dictionary exactly. But I'm not sure exactly how you
want it to behave, so I can't be of much more help in this area.

-Gul

--~--~---------~--~----~------------~-------~--~----~
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