the name of your Date column is "premiera", I dont see a "termin"
column specified in the example ?
On Dec 11, 2008, at 7:35 AM, grat wrote:
>
> Hi,
>
> i have this table:
>
> class ZmenaDH(Base):
> __tablename__="zmenahost"
> id = Column(Integer,primary_key=True)
> duvod=Column(String(120))
> premiera=Column(Date)
> id_solo = Column(Integer, ForeignKey('sola.id'))
>
> solo = relation("Solo", backref=backref('zmenahost', order_by=id,
> uselist=False))
> def __init__(self,duvod,termin):
> self.duvod=duvod
> self.termin=termin
>
> in use:
> zm=ZmenaDH("Smlouva",datetime.date(2002, 3, 11))
> zm.id_solo=109
> sql.session.add(zm)
> sql.session.commit()
>
> but date not store in table, no errors
>
> please, howto save date in sqlite?
>
> Thanks
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---