Hi,
I'm using postgres and have a table-
db.define_table('volumes',
Field('vol', 'decimal(100, session.decplaces)', default=0,
readable=False, writable=False),
auth.signature, migrate=True,
)
I have the session var declared before the table-
session.decplaces = 7
but I keep throwing "ValueError invalid literal for int() with base 10:
session.decplaces" when loading the page.
I tried casting session.decplaces to int, float but no luck- same error-
Field('vol', 'decimal(100, int(session.decplaces))', default=0,
readable=False, writable=False),
Field('vol', 'decimal(100, int(float(session.decplaces)))', default=0,
readable=False, writable=False),
Field('vol', 'decimal(100, float(session.decplaces))', default=0,
readable=False, writable=False),
I can hardcode it-
Field('vol', 'decimal(100, 7)', default=0, readable=False,
writable=False),
...and it works just fine, but I'd really like to be able to use the
session var for this.
TIA for any help!
-jl
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.