[web2py] SyntaxError: Set: no tables selected on select statement.

2011-11-07 Thread Matthew Young
Hello I am using the Version 1.99.3 (2011-11-07 17:41:19) dev version of web2py. I am having an issue with this view function: def check_room_availability(): room = db.room(request.args(0)) or redirect(URL('view_rooms')) reservations = db().select(db.reservation.room.name==room.name) r

[web2py] Re: SyntaxError: Set: no tables selected on select statement.

2011-11-07 Thread Matthew Young
y goes with the db() not > the select().  Second, the reference to room is via room.id rather > than room.name.  So you could try: > > reservations = db(db.reservation.room==room.id).select() > > On Nov 8, 8:49 am, Matthew Young wrote: > > > > > > > > > Hello I

[web2py] Error when @auth.requires_login() decorator is used on a method in controllers/default.py

2011-10-18 Thread Matthew Young
Hi everyone I am using the following python/web2y versions: web2py™ (1, 99, 3, datetime.datetime(2011, 10, 18, 17, 10, 12), 'dev') Python Python 2.7: /usr/bin/python I am running web2py from source under linux. I have the following method in my default controller file: @auth.requires_log

[web2py] Question about crud forms and foreign keys

2011-10-19 Thread Matthew Young
Currently, I have a table that has a field that represents a different table in my database (ex: Field('thing', db.thing)). If I make a crud form of the table that has a field referring to a foreign table, I am able to select items from the second table in a drop down menu. Is there a way I can tel