Saving a rol with a derivative atribute
Georgio Barbosa <[email protected]> Wed, 11 Sep 2013 10:25:31 -0300
| Newsgroups | gmane.comp.python.sqlobject |
|---|---|
| Message-ID | <CA+UBNT0B-Fr03HPq_5RhBakOKL=iYKOoJyjmSKo7jKGjrCKncw@mail.gmail.com> |
Hello all.
I would like to know if it is possible to create a model class with a
default attribute derived from another.
An example:
class Post(SQLObject):
*title = StringCol()*
content = StringCol()
create_time = DateTimeCol(default=datetime.now)
tags = RelatedJoin('Tag')
author = ForeignKey('Author')
*slug = StringCol(default=title.replace(" ", "-"))*
Thank you very much.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss