Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-27 Thread legutierr
OK, I just uploaded a patch against trunk that should be consistent with this discussion. As I note in the ticket, I kept the tests from the prior patch, which tests were specifically relevant to the admin as reported by the original ticket, but I also added additional, more focused tests. I

Re: Permission Duplication

2011-04-27 Thread Carl Meyer
Hi Valentin, On 04/27/2011 10:33 PM, Valentin Golev wrote: > 1. I've run into something that seems like a bug. If it really is a bug, > I'll file a ticket, if it's not, please clarify the behaviour, and, in > this case, I think a better error message will be awesome. > > Basically, if there are

Permission Duplication

2011-04-27 Thread Valentin Golev
Hello! Two things, specific and more abstract: 1. I've run into something that seems like a bug. If it really is a bug, I'll file a ticket, if it's not, please clarify the behaviour, and, in this case, I think a better error message will be awesome. Basically, if there are two permissions for

Re: Why does the test handler call sys.exit()?

2011-04-27 Thread Shawn Milochik
On 04/27/2011 05:30 PM, Alex Gaynor wrote: This is needed so that the process will exit with the correct status code. Note that this doesn't prevent you from calling it, you just need to catch the SystemExit exception. Alex Alex, That's perfect. I tried to catch the exception before

Re: FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Alex Gaynor
On Wed, Apr 27, 2011 at 2:30 PM, Tobias McNulty wrote: > On Wed, Apr 27, 2011 at 9:31 AM, Luke Plant wrote: > >> ... If you need to store >> infinity in a database column, it's better to know sooner that your >> database doesn't support it so you

Re: Why does the test handler call sys.exit()?

2011-04-27 Thread Alex Gaynor
On Wed, Apr 27, 2011 at 5:10 PM, Shawn Milochik wrote: > Core devs, > > I've written a script which monitors my project path for changes with > pyinotify [1] and automatically runs my test suite each time I save a > Python file. > > I was doing this by calling subprocess, but

Re: Why does the test handler call sys.exit()?

2011-04-27 Thread Łukasz Rekucki
On 27 April 2011 23:10, Shawn Milochik wrote: > > Core devs, I'm not a core dev, but I hope you'll find my answer useful ;) > > The problem is that the handler function [3] calls sys.exit() if there > are any test failures. Given that the function is already done at this >

Why does the test handler call sys.exit()?

2011-04-27 Thread Shawn Milochik
Core devs, I've written a script which monitors my project path for changes with pyinotify [1] and automatically runs my test suite each time I save a Python file. I was doing this by calling subprocess, but someone helpfully pointed me towards call_command[2]. However, this breaks my script,

Re: Use cases for a OneToMany field

2011-04-27 Thread Carl Meyer
Hi Charlie, On 04/27/2011 02:35 PM, Charlie DeTar wrote: [snip] > Is this something that others see value in? Cause I sure think it > would be awesome. I actually think that sounds quite useful; I'd never thought of that alternative to reverse FKs when you don't want to modify the model that

Re: Use cases for a OneToMany field

2011-04-27 Thread Javier Guerra Giraldez
On Wed, Apr 27, 2011 at 2:35 PM, Charlie DeTar wrote: > Is this something that others see value in?  Cause I sure think it > would be awesome. a COMEFROM instruction in Python would be awesome too -- Javier -- You received this message because you are subscribed to the

Use cases for a OneToMany field

2011-04-27 Thread Charlie DeTar
Django supports many-to-one relationships -- the foreign keys live on the "many", and point to the "one". So, in a simple app where you have Comments that can get Flagged, one Comment can have many Flag's, but each Flag refers to one and only one Comment: class Comment(models.Model): text =

Re: NoSQL support

2011-04-27 Thread legutierr
+ 100 on this (oh, wait, do I not get that many votes? +10 then). Waldemar and Thomas (and the rest of the people contributing to django- nonrel) have worked very hard to advance Django and expand its use into new spheres. It would be great to see their work recognized by the core team, and to

Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-27 Thread Carl Meyer
On 04/27/2011 02:02 PM, legutierr wrote: > Ok, I'll create a patch soon (with tests + documentation) that > hopefully works for you. I don't think it will be very complicated > implementation-wise, just a few additional lines, I think. With > regards to the documentation, I'll add a note here:

Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-27 Thread legutierr
Hi Carl- > Hmm, that's interesting. I'm not super-enthused about the complexity > there (Zen of Python: "if the implementation is hard to explain, it's a > bad idea"), but I think you're right that it's feasible. Note that > nullable fields would be ok to go ahead with (because NULL is not equal

Re: FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Tobias McNulty
On Wed, Apr 27, 2011 at 9:31 AM, Luke Plant wrote: > ... If you need to store > infinity in a database column, it's better to know sooner that your > database doesn't support it so you can find one that does. > +1 -- Tobias McNulty, Managing Partner Caktus Consulting

Re: FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Shai Berger
On Wednesday 27 April 2011, Jacob Kaplan-Moss wrote: > On Wed, Apr 27, 2011 at 2:44 AM, Conrad Calmez wrote: > > My Fix uses the minimal and maximal float values > > (-2147483648 / 2147483647) as -inf/inf. [...] > > I really don't think that's a good idea. "Magic" numbers are

Re: FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Luke Plant
On 27/04/11 08:44, Conrad Calmez wrote: > Dear Community, > > two weeks ago I started fixing the ticket #4287. It appears that > infinity values can not be stored to FloatFields using MySQL (that is > what I reproduced). I found out that MySQL can not handle infinity > values. My Fix uses the

Re: FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Jacob Kaplan-Moss
On Wed, Apr 27, 2011 at 2:44 AM, Conrad Calmez wrote: > two weeks ago I started fixing the ticket #4287. It appears that > infinity values can not be stored to FloatFields using MySQL (that is > what I reproduced). I found out that MySQL can not handle infinity > values. My Fix

FloatField will not handle infinity values (Ticket #4287)

2011-04-27 Thread Conrad Calmez
Dear Community, two weeks ago I started fixing the ticket #4287. It appears that infinity values can not be stored to FloatFields using MySQL (that is what I reproduced). I found out that MySQL can not handle infinity values. My Fix uses the minimal and maximal float values (-2147483648 /

NoSQL support

2011-04-27 Thread Waldemar Kornewald
Hi, we (the Django-nonrel developers) would like to work on official NoSQL support for Django. We'd like to focus only on databases similar to App Engine, MongoDB, and Cassandra 0.7+ with secondary indexes. Our goal is not to support all native query features of key-value stores like Redis. I've