Re: [SQLObject] Adding Additional Properties to Columns

Top Page
Author: Ed Singleton
Date:  
To: Ian Bicking
CC: sqlobject-discuss
Subject: Re: [SQLObject] Adding Additional Properties to Columns
On 13/04/06, Ian Bicking <ianb@???> wrote:
> Ed Singleton wrote:
> > Is there a way I can easily add additional properties to a column in
> > my table definition?
> >
> > For example:
> >
> > class Contact(SQLObject):
> > firstName = StringCol(length=64, prettyprint="First Name")
> > secondName = StringCol(length=64, prettyprint="Second Name")
>
> You can do:
>
> class Contact(SQLObject):
> firstName = StringCol(length=64)
> firstName.prettyprint="First Name"
>
> secondName = StringCol(length=64)
> secondName.prettyprint="Second Name"


Sorry, you're right, you can. I was trying to access it in the wrong
way. I was accessing it as:

p1 = Person(firstname="Ed", secondname="S", email="e@???")
p1.email.title

which returned the string method object title()

Sorry

Ed


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd.k&kid?0944&bid$1720&dat?1642
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@???
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss