[web2py] problem with list:reference

2020-07-18 Thread P Page-McCaw
I am having trouble getting list:reference to work. I have made a tester app where db.py is: db.define_table('tag', Field('name'), format='%(name)s') db.define_table('product', Field('name'), Field('tags', 'list:reference tag'))

Re: [web2py] No module named error

2020-07-18 Thread xgp.l...@gmail.com
Hi, Im replicating the example from the book for better testing: ./modules/mytest.py from gluon import current def ip(): return current.request.client ./controllers/test.py from applications.mdplenus.modules.mytest import ip def index(): return "Your ip is " + mytest.ip() * Same erro

Re: [web2py] No module named error

2020-07-18 Thread Dave S
On Friday, July 17, 2020 at 3:21:27 PM UTC-7, patito feo wrote: > > Hi, > > > __init__.py file in ./modules > moduloname.py file in ./modules > > But the module still not loade. An error is pop in the web-ide. > > [...] >>> failed to reload module because: >>> >>> ImportError('No mod

[web2py] Re: How to prevent submitting form details that already exist as a record in the database

2020-07-18 Thread Dave S
On Friday, July 17, 2020 at 2:38:43 AM UTC-7, mostwanted wrote: > > Hey Dave, thanks for replying, > This below is what I tried & it seems to be working, idont know if the > best solution but please help e where u think I could improve it: > > def my_validator(form): > details=db(db.lecture)

Re: [web2py] Re: smart grid

2020-07-18 Thread AGRogers
Great On Sat, 18 Jul 2020 at 22:35, T.R.Rajkumar wrote: > Thank you AGRogers. It works. > > -- > 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) > --- >

[web2py] Re: smart grid

2020-07-18 Thread T.R.Rajkumar
Thank you AGRogers. It works. -- 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 "

Re: [web2py] Re: smart grid

2020-07-18 Thread AGRogers
This is how i do something similar in one of my tables: db.define_table('OrganisationUser', Field(.), format = lambda r: ("%s [%s]") % (db.auth_user(r.UserID).DisplayName, db.Organisation(r.OrganisationID).ShortName) ) For you maybe: db.define_table('pm_equip', Field(.) . format

[web2py] Re: smart grid

2020-07-18 Thread T.R.Rajkumar
Thank you villas. The dblc I am using a view and referencing that views lc_no in my table pm_events. I shall try how it works and if not I will go as you said. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co