On 10/1/13 6:36 AM, Derek wrote:
We encountered the same problem for a complex model ... we ended up
defining "acceptable" default values that are used instead of
None/NULL, but essentially mean the same thing to the user. (We are
using MySQL which adopts the same approach as Postgresql - I
We encountered the same problem for a complex model ... we ended up
defining "acceptable" default values that are used instead of None/NULL,
but essentially mean the same thing to the user. (We are using MySQL which
adopts the same approach as Postgresql - I believe Oracle does it
otherwise).
On Mon, Sep 30, 2013 at 4:55 PM, Berndt Jung wrote:
> Because the lookup_value of a null field is None, the validation check is
> aborted entirely. This seems wrong to me, and I'm wondering if I'm doing
> something wrong here. Redefining the models is not something I can do at
Well, I may have answered my own question. It looks like per the SQL
standard NULL values are unique. Here from the postgres docs:
In general, a unique constraint is violated when there are two or more rows
in the table where the values of all of the columns included in the
constraint are
Hi,
I'm having trouble using the unique together constraint with a a field
which may be None. Given this model:
class Rule(models.Model):
internal = models.BooleanField(default=False)
port_range_from = models.PositiveIntegerField(null=True, blank=True)
port_range_to =
5 matches
Mail list logo