[web2py] Re: SQLFORM.grid question

2017-04-26 Thread Jim Russell
On Tuesday, April 25, 2017 at 9:19:59 AM UTC-5, Anthony wrote: > > On Tuesday, April 25, 2017 at 3:20:23 AM UTC-4, Jim Russell wrote: >> >> I worked around this by setting the wltype field to string and adding >> a requires=IS_IN_SET. This makes the editing page have a d

[web2py] Re: SQLFORM.grid question

2017-04-25 Thread Jim Russell
I worked around this by setting the wltype field to string and adding a requires=IS_IN_SET. This makes the editing page have a dropdown with the set members instead of a free-form text field. So it's working, but it's not the most elegant solution. -- Resources: - http://web2py.com - http://we

[web2py] SQLFORM.grid question

2017-04-24 Thread Jim Russell
Hi all. I'm having an issue with an SQLFORM.gird query. I have a table where one of the columns references another table. Here are the table definitions: db.define_table('osrwhitelistpool', Field('id', type='id'), Field('pool', type='string', length=255, unique=True), Field('wltype',

[web2py] Re: check boxes with is_in_set

2016-12-12 Thread Jim Russell
In your example, list_chart is not a list of strings, it is a list of tuples. In my code, hostnames is just a list of hostnames. e.g. ('hostname1.example.com','hostname2.example.com') I assume that you are trying to make the checkboxes default to true. For me, they defaulted to being checked.

[web2py] Re: check boxes with is_in_set

2016-12-08 Thread Jim Russell
Rob, I used this code to get a list with checkboxes. form=SQLFORM.factory( Field('hostnames',"list:string", default=hostnames,widget=SQLFORM.widgets.checkboxes.widget,requires=[IS_IN_SET(hostnames,multiple=True),IS_NOT_EMPTY()])) hostnames is a list containing strings. -- Resource

[web2py] Re: returning values from custom form

2016-11-26 Thread Jim Russell
ot;amazon","localhost"] >> >> marcados = request.post_vars["host"] >> >> return dict(host_names=host_names,marcados=marcados) >> >> The view: >> >> >> {{for host in host_names:}} >> {{=host}} >>

[web2py] returning values from custom form

2016-11-25 Thread Jim Russell
Hi. I have created a form which takes a list of hostnames and shows the hostnames with checkboxes next to it. The idea is to be able to uncheck any hostnames and pass the still checked hostnames to another function which will then act on that list of hostnames. The problem is that it just retu

[web2py] Re: 502 Bad Gateway - no tmp/web2py.socket file

2016-11-25 Thread Jim Russell
> > $ ps aux | grep "uwsgi" > richard 1044 0.0 0.1 4276 1824 pts/0S+ 10:54 0:00 grep > --color=auto uwsgi > That is the grep process, not uwsgi. So uwsgi is not running. Check in /var/log/nginx/ for any messages about uwsgi -- Resources: - http://web2py.com - http://web2py.