Re: Handling non-string values during serialization

2007-11-05 Thread Marty Alchin
On 11/5/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > It's not really appropriate for serialization and we really need a > to_string() method on Field subclasses that serialization uses. Agreed. I'll just get DurationField to accept timedelta's str() output, that should get things working

Re: Ticket #1051 - Need Advice

2007-11-05 Thread Zenom
OK I will just work on getting something working half-assed so to speak with svn and hope for the best then. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send

Re: Ticket #1051 - Need Advice

2007-11-05 Thread Michael Radziej
Hi, let me add: Malcolm Tredinnick wrote: > There are a few reasons why you didn't get a response possibly: (3) There's a habit in this mailing list for subjects like "ticket #". I don't know how this happened, but I don't see a lot of sense in it. If you make it a bit more

Re: Ticket #1051 - Need Advice

2007-11-05 Thread Malcolm Tredinnick
On Mon, 2007-11-05 at 09:39 -0800, Zenom wrote: > I am really dissapointed no one has responded to this. I was trying to > help out > so that we could use Django for our corporate projects and integrate > it into Django > at the same time. The sad part is this ticket has been open for 2 > years

Re: ForeignKey(unique=True) and ForeignRelatedObjectsDescriptor

2007-11-05 Thread Malcolm Tredinnick
On Mon, 2007-11-05 at 11:47 -0600, Jeremy Dunck wrote: > Consider: > > class Place(Model): > ... > > class Retaurant(Model): > place = ForeignKey(Place, unique=True) > > > Currently, if you have a place reference and want to get to the (0 or > 1) restaurant, you do something

Re: Handling non-string values during serialization

2007-11-05 Thread Malcolm Tredinnick
On Mon, 2007-11-05 at 11:02 -0500, Marty Alchin wrote: > Hey everyone (Russ in particular), it's me again. > > While working on DurationField recently, I noticed what I thought to > be strange behavior during serialization. The XML serializer worked as > I expected, using the number of seconds

ForeignKey(unique=True) and ForeignRelatedObjectsDescriptor

2007-11-05 Thread Jeremy Dunck
Consider: class Place(Model): ... class Retaurant(Model): place = ForeignKey(Place, unique=True) Currently, if you have a place reference and want to get to the (0 or 1) restaurant, you do something like this: r = place.restaurant_set.get() Slightly more idiomatic w/

Re: Ticket #1051 - Need Advice

2007-11-05 Thread Zenom
I am really dissapointed no one has responded to this. I was trying to help out so that we could use Django for our corporate projects and integrate it into Django at the same time. The sad part is this ticket has been open for 2 years now. I really wish this ticket would be addressed so that

Handling non-string values during serialization

2007-11-05 Thread Marty Alchin
Hey everyone (Russ in particular), it's me again. While working on DurationField recently, I noticed what I thought to be strange behavior during serialization. The XML serializer worked as I expected, using the number of seconds as a decimal, while the JSON serializer used the output of str(),

Re: Proposal: form_for_model exclude_fields

2007-11-05 Thread Italo Maia
Is this an yes, a no, a maybe? It would be a pretty useful option. On Oct 16, 12:43 am, Gary Wilson <[EMAIL PROTECTED]> wrote: > Russell Keith-Magee wrote: > > On 10/13/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > >> I know the argument list for form_for_model is getting long, but > >>

Re: Choice lookups

2007-11-05 Thread jdetaeye
>It'd be nice if we could do this: >Profile.objects.filter(favorite_skit__display='parrot') As Rob already hints, this gets a bit more complicated when internationalization comes in the picture... The choices are then defined as lazy_translations rather than strings literals: CHOICES = (