[web2py] Re: new features and new book sections/chapters
hey Robin am also just loving the new web2py.where can i get the docs for the new features please share the link
[web2py] Re: relational database example app
wewe andeya kuja nikufundishe web2py na ubebe nyama :D On May 24, 11:46 pm, Markandeya wrote: > Ok i found some appliances on the Appliances web page and that is very > helpful. Which ones are considered good coding standards/practices to > follow?? Which would you advise to get started with?? > Any recommendations or suggestions would be appreciated. Thanks again, > Markandeya
[web2py] Re: Customizing SQLFORM.grid create, edit and update forms
> > hi guys sorry to intrude, i have a problem here > db.define_table('stock_status', Field('Date', 'datetime', default=request.now, writable=False), Field('SN'), Field('item_description'), Field('Quantity','integer'), Field('UOM'), Field('stockIN','integer'), Field('stockOUT', 'integer'), #Field('stock_at_hand','integer'), Field('assignment') ) class MyVirtualFields(object): def total_price(self): return self.stock_status.Quantity + self.stock_status.stockIN - self.stock_status.stockOUT db.stock_status.stock_at_hand.virtualfields.append(MyVirtualFields()) i would like to do stock_in_hand = Quantity+ stockIN - stockOUT input to this table is done through an sql grid and i have searched all over google and cant findout how to have a calculated field in grid, the documentation says this wont be displayed also am getting this error 'Field' object has no attribute 'virtualfields' please help! -- 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.
[web2py] Re: More complicated grid question, using field.sum()
> > sorry if i am off topic, i am abit stuck > i got the model db.define_table('t_stck_issue', Field('f_name', type='reference t_items', label=T('Name')), Field('f_stck_client', type='reference t_clients', label=T('Client Assgn')), Field('f_stck_quantity', type='integer', label=T('Stock Quantity')), Field('f_unit_price', type='double', label=T('Unit Price')), Field('f_sub_total',type='double', compute=lambda r:r['f_unit_price']*r['f_stck_quantity'], label=T('Sub Total')), auth.signature, format='%(f_name)s', migrate=settings.migrate) db.define_table('t_stck_issue_archive',db.t_stck_issue,Field('current_record','reference t_stck_issue',readable=False,writable=False)) AND THE CONTROLLER def stck_issue_manage(): #form = SQLFORM.smartgrid(db.t_stck_issue,onupdate=auth.archive) form = SQLFORM.grid(db.t_stck_issue) myrow=db().select(db.t_stck_issue.f_sub_total.sum())[0] answer=myrow._extra['SUM(t_stck_issue.f_sub_total)'] return locals() -- 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.
[web2py] Re: upload an excel sheet to be added to the system
how can i import excel row into a web2py sqlite table On Wednesday, 2 February 2011 16:30:26 UTC+3, Neveen Adel wrote: > > Hello, > > Is there a library that can be used to import an excel file that > insert records in a specific table ? > > If there is no a library how can i do that ? > > Thanks in Advance -- 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.
[web2py] how to use sum() in grid
hello sir i hope you are ok, well i have been having a problem with some code here and have searched all over the internet but i was not able to get a solution MODEL db.define_table('t_stck_issue', Field('f_name', type='reference t_items', label=T('Name')), Field('f_stck_client', type='reference t_clients', label=T('Client Assgn')), Field('f_stck_quantity', type='integer', label=T('Stock Quantity')), Field('f_unit_price', type='double', label=T('Unit Price')), Field('f_sub_total',type='double', compute=lambda r:r['f_unit_price']*r['f_stck_quantity'], label=T('Sub Total')), auth.signature, format='%(f_name)s', migrate=settings.migrate) db.define_table('t_stck_issue_archive',db.t_stck_issue,Field('current_record','reference t_stck_issue',readable=False,writable=False)) CONTROLLER def stck_issue_manage(): #form = SQLFORM.smartgrid(db.t_stck_issue,onupdate=auth.archive) form = SQLFORM.grid(db.t_stck_issue) myrow=db().select(db.t_stck_issue.f_sub_total.sum())[0] answer=myrow._extra['SUM(t_stck_issue.f_sub_total)'] return locals() VIEW {{extend 'layout.html'}} Manage stck_issue{{=form}} All Issue Totals: {{=answer}} well it calculates the sub total field for all properly, but i would like it to change when i filter by client to do the sub total for that particular client only -- 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.