Hi again! Playing again with my hotel booking sys I have a new
doubt...

I have this model:


db.define_table('room',
   Field('name','string),
   Field('ubication','string'))

db.define_table('booking',
    Field('room',db.room),
    Field('host','string'))

So I have this controller:

def index():
     form = crud.create(db.booking, next = URL('validate'))
    return dict(form=form)

def validate():

   return dict()

def view():

#here I have all the code to show the made bookings in powertable

   return dict(table=table)


And this is what I'd like to do:

- A user gets into ~/index and can make a book of MULTIPLE rooms
(currently with the above code I can only book one room at a time).

- When a user clicks on the submit button, I need to sent an email to
a room manager, so he can validate  the booking.  If it proceeds it
will be saved and shown in powertable, if not, nothing is saved. How
could I do it?? Do I need to catch the data before saving it?


(I think I need something like this
auth.settings.registration_requires_approval = True, in fact how could
I do this???)


Thanks!!!

(sorry if there are too many questions)

Reply via email to