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'))
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
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
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)
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)
> ---
>
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
"
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
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
8 matches
Mail list logo