Modelclass.sqlmeta.columns['attributename'].length

On 3 Jun., 04:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Does anyone know how to retrieve the length of a UnicodeCol or
> StringCol in TurboGears/SQLObject?
>
> I have a web form (actually, a bunch of them) which allows me to
> adjust certain values in my DB.  I want to place limits on the length
> of strings that can be entered for these values.  I want to do this in
> accordance with the length limits I've assigned in my model.
>
> But I don't want to have to hard-code these length limits in two
> different places (in the model and in the form fields class).  So, in
> declaring the form fields class, I want to reach into the model and
> ask for the length of certain columns.
>
> Is that possible at all?
>
> Thanks,
>
> Stuart


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to