[web2py] Developers

2020-08-21 Thread Anthony Smith
Hi are there any programmers in Australia looking for work -- 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 subs

[web2py] If condition is True

2017-11-11 Thread Anthony Smith
Hi all, I have been trying to work how to open a table if the condition is true. If know that *show_if* will only reference if all fields are in the same table. Example below: Models: db.define_table('taxpayer', Field('name'), Field('address'),

[web2py] Re: Data Representation SQLFORM.factory /linked tables

2017-11-02 Thread Anthony Smith
Thanks Anthony As usual something I never thought of. Always looking for my mistakes.lol cheers Anthony On Thursday, 2 November 2017 13:19:35 UTC+11, Anthony wrote: > > db.define_table('drench', >> Field('status', requires=IS_IN_SET(STATUSES), >> default=STATUSES[0]),

[web2py] Data Representation SQLFORM.factory /linked tables

2017-10-31 Thread Anthony Smith
Hi All, I have been pulling my hair out with this. Wen I view the drenches grid I shows the assigned to = the full name of the auth user which is correct , but when I add a product it only displays the name of the product and does not include the batch no which I require. I am lost as to why.

[web2py] Re: SQLFORM grid search : Get ids of filtered records

2016-11-13 Thread Anthony Smith
Hi Anthony, I thought I would try this, but getting the following error: (global name 'selected_true_callback' is not defined) It would be great if you could explain what I am doing wrong thanks Anthony On Thursday, 27 October 2016 03:20:30 UTC+11, Anthony wrote: > > Note, the "searchable" ar

[web2py] Re: Updating with Count

2016-11-12 Thread Anthony Smith
On Saturday, 12 November 2016 21:50:34 UTC+11, 黄祥 wrote: > > 'for the update to be automatic when changes are made to the 1st table' > perhaps you can use after_update or before_update callback > ref: > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-re

[web2py] Updating with Count

2016-11-11 Thread Anthony Smith
Hi all, I am at a lose of how to update a table with the row count form another table, I have been able to count and create a new form , which updates the other table . But I am hoping it is possible to be for the update to be automatic when changes are made to the 1st table . Below is a sho

[web2py] Re: order by the greater of 2 fields

2016-10-26 Thread Anthony Smith
On Wednesday, 26 October 2016 15:25:35 UTC+11, Anthony wrote: > > Hi all, >> This gets the results using sql but only able to do one or the other is >> the controller in web2py >> select * from animalTask order by >> GREATEST(COALESCE(withhold_until_date,0),COALESCE(esi_withhold_until_date,0))

[web2py] Re: order by the greater of 2 fields

2016-10-25 Thread Anthony Smith
On Tuesday, 25 October 2016 01:16:19 UTC+11, Anthony wrote: > > On Monday, October 24, 2016 at 7:11:29 AM UTC-4, Anthony Smith wrote: >> >> Hi all, >> >> I have table with 2 fields, withhold _until_date and esi_withhold_until. >> >> Is is it possib

[web2py] order by the greater of 2 fields

2016-10-24 Thread Anthony Smith
Hi all, I have table with 2 fields, withhold _until_date and esi_withhold_until. Is is it possible to order by so the the greater of the 2 fields was at the top of the list. cheers Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p

[web2py] Re: Web2py-appreport

2016-03-02 Thread Anthony Smith
. cheers On Tuesday, 1 March 2016 07:40:26 UTC+11, Dave S wrote: > > On Monday, February 29, 2016 at 11:56:56 AM UTC-8, Anthony Smith wrote: >> >> Hi All, >> >> There does seem to be much interest in this, I guess I will just keep >> looking. >> >> cheers

[web2py] Re: Web2py-appreport

2016-02-29 Thread Anthony Smith
t;> daily. If I remember correctly, I made only minor modifications for my >> needs. >> >> Can't help with your issue though. >> >> Regards >> >> On Friday, February 12, 2016 at 1:05:22 PM UTC+1, Anthony Smith wrote: >>> >>>

[web2py] Re: Web2py-appreport

2016-02-12 Thread Anthony Smith
Hi, I gather this plugin is not correct and doesn't work without lots of work. cheers Anthony On Tuesday, 9 February 2016 21:08:46 UTC+11, Anthony Smith wrote: > > Hi Massimo, > > Thanks for you help you can download form here > https://github.com/lucasdavila/web2py-appre

[web2py] Re: Web2py-appreport

2016-02-09 Thread Anthony Smith
erhaps > assumes a library that is not installed. > > On Monday, 8 February 2016 02:24:38 UTC-6, Anthony Smith wrote: >> >> Hi Massimo, >> >> Tried that and now getting this error >> >> 1. >> 2. >> 3. >> 4. >> 5. >> 6. >

[web2py] Re: Web2py-appreport

2016-02-08 Thread Anthony Smith
import module %s' % str(e) ImportError: Cannot import module 'applications.reports.modules.report_web2py' On Sunday, 7 February 2016 16:43:47 UTC+11, Massimo Di Pierro wrote: > > import modules.plugin_appreport as plugin_appreport_module > > should be > > > import plugin_appreport

[web2py] Web2py-appreport

2016-02-05 Thread Anthony Smith
Hi All, I was following the tutorial from https://github.com/lucasdavila/web2py-appreport/wiki/Docs-and-examples, Helper for simple reports and get the follow error when I try to open the app Any ideas would be great Cannot import module 'applications.reports.modules.modules'Version web

[web2py] Re: Dynamic Search

2016-01-20 Thread Anthony Smith
Hi what I mean is to have results so they can be either emailed or printed? On Thursday, 21 January 2016 08:48:08 UTC+11, Anthony wrote: > > What do you mean by "have the results to be a post"? > > On Sunday, January 17, 2016 at 3:16:11 PM UTC-5, Anthony Smith wrote: &g

[web2py] Re: Dynamic Search

2016-01-20 Thread Anthony Smith
Hi All, I am guessing this cant be done or I have asked a stupid question Cheers Anthony On Monday, 18 January 2016 07:16:11 UTC+11, Anthony Smith wrote: > > Hi All, > > I am using the dynamic search ( > http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it >

[web2py] Dynamic Search

2016-01-17 Thread Anthony Smith
Hi All, I am using the dynamic search (http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it possible to have the results to be a post, if so do I go about it. cheers Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

[web2py] Re: Side by Side a Form and a Grid

2016-01-04 Thread Anthony Smith
Hi, Thanks for the response I dont get what you mean, can you provide an example. I have search the net and the group but unable to find an example cheer Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Side by Side a Form and a Grid

2016-01-04 Thread Anthony Smith
Hi all, Hope you have all had a wonderful start to the New Year. What is the best way to have a form and gird to appear side side on the same page. I am totally lost. Thanks everyone Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] Re: Pre-populated Forms

2015-12-15 Thread Anthony Smith
will wish to create a new record. > > Hope that helps to clarify ValK's response. > All the best. > > > On Sunday, 13 December 2015 17:53:36 UTC, Anthony Smith wrote: >> >> Hi Val, >> >> Thanks for your reply, but unable to find any about get prototype

[web2py] Re: Pre-populated Forms

2015-12-13 Thread Anthony Smith
ype value > 3. don't pass record to SQLFORM > > On Monday, December 7, 2015 at 7:15:46 AM UTC+3, Anthony Smith wrote: >> >> Hi All, >> >> I have a products table: >> db.define_table('product', >> Field('product_name&

[web2py] Pre-populated Forms

2015-12-06 Thread Anthony Smith
Hi All, I have a products table: db.define_table('product', Field('product_name'), Field('active_ingredient'), Field('batch_no'), Field('expiry_date','date'), Field('product_type', requires=IS_IN_SET(PRODUCTTYPES),d

[web2py] Re: auth.requires_login

2015-11-30 Thread Anthony Smith
her than the > simpler row.fieldname syntax (and also explicitly exclude fields from > db.auth_membership, which you don't really need). > > Anthony > > On Monday, November 30, 2015 at 3:18:54 AM UTC-5, Anthony Smith wrote: >> >> Hi all >> >> I know auth.req

[web2py] auth.requires_login

2015-11-30 Thread Anthony Smith
Hi all I know auth.requires_login can be used, also auth.requires_has membership. If I want to query the records created by a group can this be done. I want to be able to have certain groups to be only able to query certain record of the same table. Cheers Anthony -- Resources: - http:/

[web2py] Re: AttributeError'> 'Set' object has no attribute

2015-11-20 Thread Anthony Smith
Hi Anthony, Thanks, is ok to use sql or is there a better way of doing this, been new I would rather learn the proper way rather just making it work. cheers Anthony On Friday, 20 November 2015 20:05:06 UTC+11, Anthony Smith wrote: > > Hi > > This has been driving me crazy, and

[web2py] Re: AttributeError'> 'Set' object has no attribute

2015-11-20 Thread Anthony Smith
uct table this would work, "update stock_task, product set withhold_until_date= DATE_ADD(stock_task.completed_date, INTERVAL product.withholding_period DAY)where product.product_name = stock_task.product" cheers Anthony On Friday, 20 November 2015 20:05:06 UTC+11, Anthony Smith wro

[web2py] AttributeError'> 'Set' object has no attribute

2015-11-20 Thread Anthony Smith
Hi This has been driving me crazy, and dont what I am doing wrong db.define_table('product', Field('product_name'), Field('batch_no'), Field('withholding_period','integer'), format='%(product_name)s %(batch_no)s') db.define_table

[web2py] Re: record representation and lambda

2015-11-16 Thread Anthony Smith
Thanks Anthony, yes there were some typo's my mistakes On Sunday, 15 November 2015 18:25:01 UTC+11, Anthony Smith wrote: > > Hi All, > > I have looking though the group for and answer on this, I am try to get > the product_name and batch_no from the product table to be t

[web2py] Re: Is this the best mailing list ever for web app developers?

2015-11-15 Thread Anthony Smith
That wasn’t suppose the be a question. sorry Guys On Sunday, 15 November 2015 19:08:46 UTC+11, Anthony Smith wrote: > > To All the Web2py Team, > > I speak for myself, but feel there will be others that have the same > opinion. > > As I am quiet new to Web2py and programmi

[web2py] Is this the best mailing list ever for web app developers?

2015-11-15 Thread Anthony Smith
To All the Web2py Team, I speak for myself, but feel there will be others that have the same opinion. As I am quiet new to Web2py and programming as a whole, we are trying/willing learners (if we weren’t we would be here). When I come across a problem/error, I don’t ask for help straight away,

[web2py] record representation and lambda

2015-11-14 Thread Anthony Smith
Hi All, I have looking though the group for and answer on this, I am try to get the product_name and batch_no from the product table to be the product in the stock task table. But getting the following traceback: Traceback (most recent call last): File "/home/tony/web2py/gluon/restricted.py

[web2py] Re: TypeError: an integer is required

2015-11-11 Thread Anthony Smith
s a date to it. > Instead, just do: > > SPAN(v, ...) > > Or if you don't like the default format you get when the date is converted > to a string, use the .strftime method: > > SPAN(v.strftime('%m/%d/%Y')) > > Anthony > > On Wednesday, November 11, 2015 a

[web2py] TypeError: an integer is required

2015-11-10 Thread Anthony Smith
Hi, I am using the follow to highlight a date field where the date is greater then the current date. db.stock_task.ESI_withhold_until_date.represent = lambda v,row: SPAN(datetime.date(v),_class='withhold' if v >datetime.date.today() else None) db.stock_task.ESI_withhold_until_date.represent = l

[web2py] Re: Should this work in Web2py

2015-11-03 Thread Anthony Smith
nd then discarding every row that is not the last one ... > > On Saturday, October 31, 2015 at 7:02:03 AM UTC+1, Anthony Smith wrote: >> >> Thanks for the input everyone , I did get it to successfully update using >> the following >> >> def create_stock_t

[web2py] Re: Should this work in Web2py

2015-10-30 Thread Anthony Smith
05 UTC+11, Anthony Smith wrote: > > added the following > > def create_stock_task(): > form = SQLFORM (db.stock_task).process() > if form.accepted: > task = db(db.stock_task.id).select().first() > pdays_row = db(db.product.withholding_period>

[web2py] Re: Should this work in Web2py

2015-10-28 Thread Anthony Smith
o write > > db(db.table.column_1 == somevalue).update(column_2 = somevalue_2) > > > > On Saturday, October 24, 2015 at 7:27:20 AM UTC+2, Anthony Smith wrote: >> >> what I want to is update the stock_task.withhold until date with the >> result of db.product.withholding_

[web2py] Re: Should this work in Web2py

2015-10-23 Thread Anthony Smith
what I want to is update the stock_task.withhold until date with the result of db.product.withholding_ period (int) + stock_task.completed date (date) This is what I have tried, below On Friday, 23 October 2015 20:56:44 UTC+11, Anthony Smith wrote: > > > I am trying

[web2py] Re: Should this work in Web2py

2015-10-23 Thread Anthony Smith
I think I need to re think how I am doing this as I am learning web2py. It maybe a case of re looking at the book. cheers On Friday, 23 October 2015 20:56:44 UTC+11, Anthony Smith wrote: > > > I am trying to update *withhold_until_date* with the following > > > > impor

[web2py] Should this work in Web2py

2015-10-23 Thread Anthony Smith
I am trying to update *withhold_until_date* with the following import datetime #product withholding in days days = (0) #get the days pdays_row = db(db.product.withholding_period>0).select().first() pdays = pdays_row.pdays #get the date wdate_rows = db(db.stock_task.completed_date>0).select(

Re: [web2py] Re: Emailing

2015-08-07 Thread Anthony Smith
Are got it. thankyou On Sat, Aug 8, 2015 at 9:58 AM, 黄祥 wrote: > e.g. > *private/appconfig.ini* > [smtp] > server = smtp.gmail.com:587 > sender = em...@gmail.com > login = email:password > > *models/db.py* > from gluon.tools import Auth, Crud, Service, PluginManager, prettydate > auth = Auth(d

[web2py] Re: Emailing

2015-08-07 Thread Anthony Smith
I have looked at that but still cant figure out, do you have example cheers tony -- 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 mess

[web2py] Emailing

2015-08-07 Thread Anthony Smith
Hi All, I have a app where I records sales, but I want to email different part of the sale to different people eg the person I brought only need to know what I item and how much, then another person needs to know how many and the item and how much. I can get this by using a post,but I cant wor

[web2py] Re: [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-08-04 Thread Anthony Smith
yes a good find I had the same thing my $ in the field names cheers -- 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 yo

[web2py] Re: Adding the number of day to a date

2015-02-02 Thread Anthony Smith
Hi Sorry misunderstood the question. T2.completed_date is triggered when someone enters the date the task is completed on. cheers On Tuesday, 3 February 2015 06:35:00 UTC+11, Dave S wrote: > > > > On Sunday, February 1, 2015 at 12:13:54 AM UTC-8, Anthony Smith wrote: >> >&

[web2py] Re: Adding the number of day to a date

2015-02-01 Thread Anthony Smith
is update of T2 withholding _until? This will > influence the solution drastically. > > Richard D > > On Saturday, January 31, 2015 at 8:47:47 PM UTC+1, Anthony Smith wrote: >> >> Hi >> >> I never explained it very well, >> Table 1 has products wi

[web2py] Re: Adding the number of day to a date

2015-01-31 Thread Anthony Smith
; On Saturday, 31 January 2015 04:18:16 UTC-6, Anthony Smith wrote: >> >> Hi, >> I am unable to find any information on adding the number of days to a >> date. >> >> The number of days is stored in a table as a int >> >> Second it where a task is creat

[web2py] Adding the number of day to a date

2015-01-31 Thread Anthony Smith
Hi, I am unable to find any information on adding the number of days to a date. The number of days is stored in a table as a int Second it where a task is created and a expiry is require using the completed date of the task + the number of days from the first table. What is the best way to hand

[web2py] Australian Users

2014-12-16 Thread Anthony Smith
Hi are there any users in Australia willing to help tutor in web2py? cheers -- 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

[web2py] summing fields

2014-12-13 Thread Anthony Smith
Hi I have the following sql which returns what I want , but losted on how to use in my web2py controller. any pointers or help would be grateful. select sum (total_sale_price, buyer, stock_desc from sales group by stock_desc thanks -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Computed fields

2014-11-04 Thread Anthony Smith
Thank for that On Tuesday, 4 November 2014 10:45:30 UTC+11, Anthony Smith wrote: > > Hi > > I am stuck on the following, if no_of _items, dollars_items are not used > the total_sale_price is left blank I get the follow message > > compute=lambda r: r['no_o

[web2py] Computed fields

2014-11-04 Thread Anthony Smith
Hi I am stuck on the following, if no_of _items, dollars_items are not used the total_sale_price is left blank I get the follow message compute=lambda r: r['no_of_items']*r['dollars_items']), TypeError: unsupported operand type(s) for *: 'NoneType' and 'NoneType' If I leave the no_by weight

[web2py] Re: Geraldo Reports 4.0

2014-11-04 Thread Anthony Smith
hi did you have any sucess with this ? On Friday, 3 December 2010 00:22:58 UTC+11, rochacbruno wrote: > > Is there someone using Geraldo Reports 4.0 with web2py? > > http://www.geraldoreports.org/blog/releasing-04/ > > sometime ago someone created a tutorial > http://www.geraldoreports.org/docs