Hello,
I have created a grid with SQLFORM but the grid shows the country id
instead of the country name. The form shows the name as expected but the
grid does not. However, if I use 'reference country' it does but then I
cannot leave the country empty in the account. Is there an easy way, other
Hi all,
When I allow the country reference to be empty in the below table, the
SQLFORM.grid will show the country id instead of the name. When I just use
'reference country' it shows the country name in the grid and form but does
not allow it to be empty. If I use a combination of both, it show
Thanks Anthony,
That works perfectly.
--
---
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:/
If I use reference table in a field then the search shows a dropdown of the
referenced table but in the following case it does not.
Field('industry',
requires=IS_EMPTY_OR(IS_IN_DB(db,db.industry.id,'%(name)s')),
represent=lambda id, r: db.industry[id].name if id else ""),
Wh
Hi Alex,
You can use the following query to count the number of child records and
then update the WhatIf table.
total_children = db(db.WhatIfVote.WhatIfID == what_if_id).count()
row = db(db.WhatIf.id==what_if_id).select().first()
row.update_record(numberOfTentativePartners=total_children)
Try
Hi all,
I think it would be useful to add the parameters "callback", "target" and
"delete" to the MENU parameters so that it can be used for ajax requests.
Let me know what you think.
Regards, Edwin.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-u
Hello,
The SQL statement produced by the following query is trimmed or cut-off
somehow and therefore produces an error. Surely this must be a bug?
In [5] : print db(db.holiday.leave_type ==
db.leave_type.id)._select(db.leave_type.name,
db.holiday.working_days.sum(), groupby=db.holiday.leave_ty
Hello,
Why do I get the following error message when I have set the rname for that
field and have set check_reserved to None?
Field: invalid field name: update, use
rname for "funny" namesVersion
web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
Python Python 2.7.12: C:\Python27\pyt
rits from
> pydal.helpers.classes.BasicStorage, which has methods "update", "get",
> "keys", "values", etc. -- so none of those will work as field names (though
> you can use them as rnames).
>
> Anthony
>
> On Friday, November 11, 2016 at 1:40:
I have written a simple index page and form for adding and updating a
record. This works fine but as soon as I change the normal link to a link
that loads the form with ajax in the content div, it does not work any
longer. As soon as I submit the data it seems that form.process has
accepted the
Hi Terrence,
Your db.py script has not run and this is why you get the no such table
error. I believe that it should work if you run the following command:
python web2py.py -S
You will then get an interactive shell with the web2py environment and
application loaded.
Regards, Edwin
On Monday
Hi Paul,
You can test if the grid has rows by doing the following
{{if grid.rows:}}
{{=grid.rows}}
{{else:}}
No records
{{pass}}
That should do it I think.
Regards, Edwin
On Monday, February 13, 2017 at 7:12:53 PM UTC+4, Paul Ellis wrote:
>
> I want to display something else if the query
ould've stated that I am using pyDAL standalone. And please
> note that I did an `import db` at the top of the console session, which
> should've run all the define_table statements in that file, correct?
>
> On Monday, February 13, 2017 at 2:36:03 PM UTC-5, Edwin Have
Hi Donald,
I tried that and it does not make a difference.
Regards, Edwin.
On Tuesday, February 14, 2017 at 12:58:19 AM UTC+4, Donald McClymont wrote:
>
> I haven't studied all of this but can you change the name of your
> controller function to something other than form. I have had issues wit
14 matches
Mail list logo