[web2py] Re: smart grid

2020-07-17 Thread T.R.Rajkumar
Thank you AGRogers As you said the equipment record format to include the location, that would do for me. Can you please tell how to do that. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we

Re: [web2py] No module named error

2020-07-17 Thread patito feo
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. Thanks, El lunes, 22 de junio de 2020, 14:33:28 (UTC-5), Dave S escribió: > > > > On Monday, June 22, 2020 at 5:13:46 AM UTC-7, patito feo wrote: >> >> Hi, >>

[web2py] Re: smart grid

2020-07-17 Thread villas
It seems that you are using two DBs (db and dblc). In my experience, you cannot make relationships across two distinct DBs. Suggestion: 1. Create a set of all the lc_vw_lc_master.lc_no possibilities 2. Create a normal string field for pm_events.lc_no with a IS_IN_SET validator. If the recor

Re: [web2py] Nested menu item

2020-07-17 Thread Eliezer (Vlad) Tseytkin
Oops! Got it, thank you On Fri, Jul 17, 2020 at 11:03 AM AGRogers wrote: > I don't think bootstrap (which is what web2py utilises I think) allows for > the second nested level. So to do it you would need to implement your own > custom menu structure. > > On Sat, 18 Jul 2020, 12:33 am Vlad, wro

Re: [web2py] Nested menu item

2020-07-17 Thread AGRogers
I don't think bootstrap (which is what web2py utilises I think) allows for the second nested level. So to do it you would need to implement your own custom menu structure. On Sat, 18 Jul 2020, 12:33 am Vlad, wrote: > Missing something basic, but seems to me that the following code should > resul

Re: [web2py] smart grid

2020-07-17 Thread AGRogers
One option would be to set the Format of the Equipment record to also include the location - eg 'My Equipment (It's Location)' Then your selection drop down list should include the location. On Fri, 17 Jul 2020, 9:49 pm T.R.Rajkumar, wrote: > db.define_table('pm_events', > Field

Re: [web2py] Re: Under what circumstances would db.define_table() return None

2020-07-17 Thread AGRogers
That's for sure! His stack exchange posts really helped me get around some problems early on... and now :-) I should pray for a special blessing for him tomorrow 🙏 On Fri, 17 Jul 2020, 9:05 pm villas, wrote: > That's great Andrew. > BTW great to see that Anthony is helping - he is someone who re

[web2py] Nested menu item

2020-07-17 Thread Vlad
Missing something basic, but seems to me that the following code should result in nested menu: response.menu = [['One', False, 'link1', [ ['Two', False, None, ['Three', False, 'link3'] ] ]

[web2py] smart grid

2020-07-17 Thread T.R.Rajkumar
db.define_table('pm_events', Field('eqp_id', 'reference pm_equip'), Field('lc_no', 'reference dblc.lc_vw_lc_master.lc_no'), Field('pending_work', type='string'), Field('remarks', type='string'), Field('

[web2py] Re: Under what circumstances would db.define_table() return None

2020-07-17 Thread villas
That's great Andrew. BTW great to see that Anthony is helping - he is someone who really knows the nuts and bolts of web2py! On Friday, 17 July 2020 08:05:40 UTC+1, Andrew Rogers wrote: > > Thanks for your response Villas. My reason for this approach is that i > have a lot of code that expec

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

2020-07-17 Thread mostwanted
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).select() for d in details: if form.vars.lecturer==d.lecturer.id an

[web2py] Re: Under what circumstances would db.define_table() return None

2020-07-17 Thread Andrew Rogers
Thanks for your response Villas. My reason for this approach is that i have a lot of code that expects a table object and i am trying to avoid having to modify it to handle the a different format. Anthony on Stack Exchange found my error. He said: "You probably also set DAL(..., lazy_tables=True

[web2py] Re: Auth - overlapping permissions problem

2020-07-17 Thread Dave S
On Thursday, July 16, 2020 at 3:30:47 PM UTC-7, Paul Ellis wrote: > > the situation is that I have permissions associated with auth_groups. > > eg. user, team leader, business leader, oversight > > now I need a "secretary" or "accounts" group which has access to some > business leader features