On Sat, Nov 15, 2008 at 9:56 AM, AndyH <[EMAIL PROTECTED]> wrote: > > So I'm not missing anything. It's a bug. Ouch... > > Thanks for the info, before I trawled my way through the serializers. > May well have to apply the patch locally to move forward. There > doesn't seem to be much movement on the ticket. >
The ticket is only 2 weeks old! That's not so old for a project with all-volunteer developers, really. Also, the ticket got some attention shortly after it was opened. Russell noted it needed a test minimally to demonstrate the problem, ideally that integrated into the test suite. That might have been provided by the updated patch but that is not clear since the flags for "patch needs improvement" and "needs tests" were not turned off. If you've got a patch that you think addresses the reason for "patch needs improvement" and "needs tests" it's best to reset the flags when you attach it, otherwise the ticket continues to look like it's not a candidate for an easily-evaluated-and-committed fix. Karen > > On Nov 15, 1:40 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > > There is ticket and patch for this issuehttp:// > code.djangoproject.com/ticket/9522 > > > > On Sat, Nov 15, 2008 at 16:38, AndyH <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I have a custom model field class that stores event recurrence > > > information. In python this is an instance of dateutil.rrule.rule, and > > > in the database I am storing it as an iCal recurrence string. To > > > convert between these two formats I have to_python and > > > get_db_prep_value methods on the custom field class (subclassing > > > models.Field). > > > > > Things works more-or-less OK, but when I run dumpdata to serialize the > > > database into json, at some point to_json gets executed and the > > > returned value for rrule is '<dateutil.rrule.rrule instance at > > > 0x1121828>' and not the value that should be returned by > > > get_db_prep_value. I also have a 'value_to_string' method on the > > > fiels, but this does not get executed either. > > > > > What am I missing about the way dumpdata handles these custom model > > > fields? > > > > > Thanks > > > Andy. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---