Hello,

So I do not know exactly how it should be the mapping for the REAL field
PostGreSQL in Pylons / Sqlalchimy. Here is what I am using the mapping and
validation of the form.


#mapping
----------------------------------------------------------------------

import sqlalchemy as sa
from simam.model import meta
from sqlalchemy import schema, types, ForeignKey
tb_teste = sa.Table('tb_teste', meta.metadata,
      sa.Column('id', sa.Integer,primary_key=True,nullable = False),
      sa.Column('ds_logico', sa.String(60), nullable = False),
      sa.Column('nr_altitude', sa.Integer, nullable = True),
      sa.Column('nr_altura', sa.Float, nullable = True),  *#here is the
problem because the field in the table is REAL*
      sa.Column('nr_profundidade',  sa.Float, nullable = True), *#here is
the problem because the field in the table is REAL*
**      sa.Column('dt_inicio_leitura', sa.Date, nullable = False),
                    )

#validation of the
form----------------------------------------------------------------------
import formencode

class FormCadastroConfigSensor(formencode.Schema):
    allow_extra_fields  = True
    filter_extra_fields   = True
    ds_logico            = formencode.validators.PlainText(not_empty=True)
    nr_altitude           = formencode.validators.Number()
    nr_altura              =
formencode.validators.Number(not_empty=False)      *#here is the problem
because the field in the table is REAL*
**    nr_profundidade    = formencode.validators.Number(not_empty=False)   *
#here is the problem because the field in the table is REAL*
    dt_inicio_leitura     =
formencode.validators.DateConverter(not_empty=True,month_style='dd/mm/yyyy')



Thanks.
--

2010/6/15 cd34 <[email protected]>

> What does your model look like for the table?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pylons-discuss%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>

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

Reply via email to