No, that's what I was trying to say - there is no default value in
database definition. For example if I run psql and try to add a row
with default data (as defined in model.py), it would try to fill null
instead of default values and thus return an error...
definition as it's displayed in pgAdmin:
CREATE TABLE test
(
id int4 NOT NULL DEFAULT nextval('test_id_seq'::regclass),
date date NOT NULL,
title text,
content text,
CONSTRAINT test_pkey PRIMARY KEY (id),
CONSTRAINT test_date_key UNIQUE (date)
)
WITHOUT OIDS;
ALTER TABLE test OWNER TO postgres;
model.py:
class Test(SQLObject):
date = DateCol(alternateID=True, default=sqlbuilder.func.NOW())
title = UnicodeCol()
content = UnicodeCol()