> > hi, > > is it possible to limit the application for client user? something > identical with trial version for client user, so the user can try the > application, test and use it for several time (1 month for example) or base > on table record (limit to 10/100 record per table). > if possible what is the best way to achieve it using web2py way? >
How about a demo table like db.define_table("demo", Field("user_id", "reference auth_user", default=auth.user_id), Field("expires", "date"), Field("usage", "json"), Field("status", requires=IS_IN_SET(("expired", "active")))) Then upon registration, compute a predefined expiration date and set a JSON object for storing table usage and other metrics. On each request, you'd need to - retrieve or create the user demo record - compute any db i/o, check for usage limits and store as json - check if deadline was reached Not sure if this is the most efficient way, specially abuout the usage storage as json, but that way you can dinamically modify your usage metrics more easily. I think that storing usage as yaml/json files can improve performance. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.