I've come across this <http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal-updated> site where one can create charts and graphs. However I have a challenge of using the database as I don't know how to link to it. For example, i want to track a variable like weight. The user inputs the values on a regular basis with the trend showing on the graph. How do I connect to the database and track it daily? So far, my code is this: model db.define_table('my_tracker', Field('weight','double',), Field('created_by','reference auth_user',default = auth. user_id, readable = False, writable = False))
Controller: row = db(db.tracker.created_by == auth.user_id).select().first() if not row: form = SQLFORM(db.my_tracker, submit_button=T('Submit')) form.element('input[name=weight]')['_style']= 'width:60px;height:30px;' -- 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/d/optout.