So for the website that I'm developing I want my users to be able to set 
"availabilities," and after they have expired, I want them to be set as 
inactive . Also another feature would be validating the form to make sure 
the start and end time contained a vaild availibility (ex. the start time < 
the end time). Then after this, I would like to create a list of all of the 
current available users at this current moment.

Here's my model

#user availability
db.define_table('user_availability',
   Field('user_id', 'reference auth_user', default=auth.user_id, readable=
False, writable=False),
   Field('start_availability', 'datetime', requires=IS_DATETIME()),
   Field('end_availability', 'datetime', requires=IS_DATETIME()))
   


Controller

 form_create_user_availability = SQLFORM(db.user_availability)
        
        if form_create_user_availability.process(formname=
'form_create_user_availability').accepted:
            session.flash = 'Availability Added'
            redirect(URL('user/profile')) 
        elif form_create_user_availability.errors:
            response.flash = 'Error'


Anyway, any help or advice on how to achieve this would be awesome !

-Trevor

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to