Hey guys I have a relatively simple question to ask:
I have a form storing my input in an sqlite database.
Based on the response in the form I want to choose a certain file stored on
the server.
How do I go about writing the if statement?
eg
db = DAL('sqlite://storage.sqlite')
db.define_table('dbname', Field('file', requires=IS_IN_SET(['file1','file2']
)))
Then I want to write something conditional on the input being eg file1
def processing():
if db.dbname(request.args(0)).file == file1:
pathDir = /path/to/file1
else:
pathDir = /path/to/file2
What should I use to tell the processing to use the current row in the
database? How do I tell the server to start processing once the form has
been submitted?
Thanks!
-a noob
--
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.