OK, you're spot on there. That'll teach me to evan glance at my own code before posting my cries for help! (And thanks for the tip about get_internal_type)
Anyway, now I think I have what is needed, but now I get the following traceback:- Traceback (most recent call last): File "<console>", line 1, in <module> File "/Django Source/django/db/models/query.py", line 108, in __repr__ return repr(self._get_data()) File "/Django Source/django/db/models/query.py", line 483, in _get_data self._result_cache = list(self.iterator()) File "/Django Source/django/db/models/query.py", line 189, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "/Django Source/django/db/backends/util.py", line 21, in execute sql = self.db.ops.last_executed_query(self.cursor, sql, params) File "/Django Source/django/db/backends/__init__.py", line 150, in last_executed_query return smart_unicode(sql) % u_params TypeError: not all arguments converted during string formatting Ideas? On Dec 13, 8:31 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > 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 ishttp://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/dc8aaf4... > > 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 -~----------~----~----~----~------~----~------~--~---