[web2py] Re: how to debug function view error

2015-09-10 Thread P T
Thank you Leonel and Stifan. Initially, I had the function in default.py and the view in the default folder. But, this view behaved as if I didn't include the {{extend 'layout.html'}}. Then, I moved the function to a new control resource.py and also created a new view in the resource folder. So

[web2py] Re: how to debug function view error

2015-09-10 Thread P T
When I tried to directly view the page, I am getting this error. Even though the URL uses correct controller "resource", web2py is looking for the function in he default.py controller -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] how to debug function view error

2015-09-10 Thread P T
Hello, I have an existing application and defined new functions in the controller default.py and also defined the corresponding views. The view includes {{extend 'layout.html'}}. However, when the function is invoked, the page is displayed as if there is no view defined. It works fine for the

Re: [web2py] SQL query equivalent in DAL

2015-09-04 Thread P T
Got it. I need to remove the initial db to make that into a query (~db.pc.id.belongs(db(db.assigned.id > 0)._select(db.assigned.id)) On Friday, September 4, 2015 at 3:37:50 PM UTC-5, P T wrote: > > Thank you Richard, your expression returns ROWS and can't be used in > SQL

Re: [web2py] SQL query equivalent in DAL

2015-09-04 Thread P T
Friday, September 4, 2015 at 12:42:32 PM UTC-7, Richard wrote: >> >> db(~db.pc.id.belongs(db(db.assigned.id > 0)._select(db.assigned.id >> )).select(db.pc.ALL) >> >> Richard >> >> >> >> On Fri, Sep 4, 2015 at 3:35 PM, P T wrote: >> >>

[web2py] SQL query equivalent in DAL

2015-09-04 Thread P T
Hello Forum, Please help me in getting the equivalent DAL query for the following SQL query. I intend to pass this on to SQLFORM.grid Select * from db.pc where db.pc.id not in (select unique db.assigned.computer from db.assigned) Web2Py Version 2.9.12-stable+timestamp.2015.02.15.23.04.25 (Run

[web2py] Re: File download - disable link when no files are available

2015-02-27 Thread P T
Thank you Leonel for taking the time to explain the syntax! Best Regards, PT On Friday, February 27, 2015 at 11:45:03 AM UTC-6, P T wrote: > > Hello All, > > Currently using Web2Py 2.8.2-stable+timestamp.2013.11.28.13.54.07 > > I have a simple page for announcing seminars a

[web2py] Re: File download - disable link when no files are available

2015-02-27 Thread P T
Thanks Leonel, it works great. But, I am stumped by the syntax. On Friday, February 27, 2015 at 11:45:03 AM UTC-6, P T wrote: > > Hello All, > > Currently using Web2Py 2.8.2-stable+timestamp.2013.11.28.13.54.07 > > I have a simple page for announcing seminars and for downloadi

[web2py] File download - disable link when no files are available

2015-02-27 Thread P T
Hello All, Currently using Web2Py 2.8.2-stable+timestamp.2013.11.28.13.54.07 I have a simple page for announcing seminars and for downloading presentation files. Here are definitions for table, controller and view : db.define_table("seminars", Field('sem_date', 'date', label=

[web2py] Re: How to represent dynamic fields in table

2013-12-23 Thread P T
Thank you Anthony, that worked like a charm. Is this technique I should learn in Python or Web2Py? PT On Monday, December 23, 2013 3:17:56 PM UTC-6, Anthony wrote: > > Try: > > lambda value, row, name=name: ... > > Anthony > > On Monday, December 23, 2013 11:38:08 AM U

[web2py] Re: web2py Jobs and meetups

2013-12-23 Thread P T
I am also interested in meet ups in Chicago area. PT On Wednesday, December 18, 2013 12:06:05 PM UTC-6, Michael Gheith wrote: > > I would love to attend any and all meet ups in Chicago. web2py has been > my bread and butter ever since I learned it :) > > On Tuesday, December 17, 2013 2:06:48 PM

[web2py] How to represent dynamic fields in table

2013-12-23 Thread P T
I am using the following for "represent" fields in the table: *{Field(name, 'integer', default=0, represent = lambda value, row: DIV(value if value else '-',_class='month', _id=str(row.id) +'.'+name)) for name infields } The intention is to use jeditable for which I need a class and an id for e

Re: [web2py] Re: Password Transmitted in plain text

2013-12-23 Thread P T
It took a while, but I created a self-signed certificate, installed and configured Apache. Now, all the packets are transmitted as encrypted. Thanks for your help! PT On Tuesday, December 17, 2013 4:37:27 PM UTC-6, Jonathan Lundell wrote: > > On 17 Dec 2013, at 2:28 PM, P T > wrote:

[web2py] Re: Password Transmitted in plain text

2013-12-17 Thread P T
HTTPS if you don't want that to happen. > > request.requires_https() > > and > > session.secure() > > Are your friends. > > Terça-feira, 17 de Dezembro de 2013 22:08:34 UTC, P T escreveu: >> >> I deployed a small app on the intranet and noticed that t

[web2py] Password Transmitted in plain text

2013-12-17 Thread P T
I deployed a small app on the intranet and noticed that the username and password are transmitted in plain text (using a tool WireShark, http://www.wireshark.org/). Here is my setup: 2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Rocket 1.2.6, Python 2.7.6) Database: Postgresql So, I

[web2py] Re: column orders in View and New/Edit pages of SQLFORM.grid

2013-12-12 Thread P T
This has been resolved. See the related post at https://groups.google.com/forum/#!topic/web2py/5sz_w4S-czE On Monday, December 9, 2013 11:54:27 AM UTC-6, P T wrote: > > I am building the field list as given here > https://groups.google.com/forum/#!topic/web2py/5sz_w4S-czE &

[web2py] Re: how to build field list from string for SQLFORM.grid?

2013-12-12 Thread P T
gt; Anthony > > On Thursday, December 12, 2013 9:04:21 AM UTC-5, P T wrote: >> >> I rigged the sqlhtml.py, so that I can rearrange the fields in the form >> as well. The following worked for me, but not sure if it has any side >> effects: >> >> In sqlhtml.p

[web2py] Re: how to build field list from string for SQLFORM.grid?

2013-12-12 Thread P T
cified > in the table definition. You can rearrange in the grid view but not in form. > I assume the order is fixed. You should change it in the define_table(..., > *fields) > > > On Tuesday, 10 December 2013 00:09:49 UTC-6, P T wrote: >> >> I think, the prob

[web2py] Re: how to build field list from string for SQLFORM.grid?

2013-12-09 Thread P T
I think, the problem is due to the following calls in gluon.sqlhtml.py (lines 2050, 2072, and 2093), which does not include the optional parameter "fields" create_form = SQLFORM(table, **sqlformargs) view_form = SQLFORM(table, record, **sqlformargs)

[web2py] Re: how to build field list from string for SQLFORM.grid?

2013-12-09 Thread P T
open a ticket http://code.google.com/p/web2py/issues/detail?id=1812&sort=-id On Monday, December 9, 2013 3:38:18 PM UTC-6, Massimo Di Pierro wrote: > > Strange. Please open a ticket about this. > > On Monday, 9 December 2013 09:25:57 UTC-6, P T wrote: >> >> file attach

[web2py] Re: how to build field list from string for SQLFORM.grid?

2013-12-09 Thread P T
in > db(db.months).select()] > > > On Sunday, 8 December 2013 23:40:10 UTC-6, P T wrote: >> >> I am dynamically creating the fields in a table from entries in another >> table. I am using SQLFORM.grid to view/edit the table. >> >> For the grid, the follo

[web2py] how to build field list from string for SQLFORM.grid?

2013-12-08 Thread P T
I am dynamically creating the fields in a table from entries in another table. I am using SQLFORM.grid to view/edit the table. For the grid, the following field list works fine: fields=[db.monthly_projections.employee, db.monthly_projections.id, db. monthly_projections.costcode, db

[web2py] Re: Error in using the web2py.app.dataspreadsheets.w2p

2013-12-04 Thread P T
uot;: "%s_fieldnames" % in gluon/contrib/spreadsheet.py should avoid the error Thanks, PT On Tuesday, December 3, 2013 11:34:33 PM UTC-6, P T wrote: > > I am using Web2py 2.8.2 source and installed installed the app > web2py.app.dataspreadsheets.w2p from > https://code.g

[web2py] Re: Error in using the web2py.app.dataspreadsheets.w2p

2013-12-04 Thread P T
Thank you, I opened a ticket http://code.google.com/p/web2py/issues/detail?id=1800 On Wednesday, December 4, 2013 8:42:24 AM UTC-6, Massimo Di Pierro wrote: > > please open a ticket, this is clearly a bug. > > On Tuesday, 3 December 2013 23:34:33 UTC-6, P T wrote: >> >>

[web2py] Error in using the web2py.app.dataspreadsheets.w2p

2013-12-03 Thread P T
I am using Web2py 2.8.2 source and installed installed the app web2py.app.dataspreadsheets.w2p from https://code.google.com/p/web2py/issues/detail?id=860#c1 and getting the following errors: 1) Cannot import module 'simplejson' Ticket ID 127.0.0.1.2013-12-03.23-17-52.b5368c20-df03-4a22-b20e-

[web2py] Re: Change SQLFORM.grid Submit button label

2013-10-04 Thread P T
("Compare Selected") On Wednesday, October 2, 2013 11:15:07 PM UTC-5, P T wrote: > > Hello All, > > > I want change the label of Submit button in the SQLFORm.grid. I found two > solutions in the forum and both seems to be not working. > > The first sol

[web2py] Re: Change SQLFORM.grid Submit button label

2013-10-03 Thread P T
On Thursday, October 3, 2013 8:19:57 AM UTC-5, Massimo Di Pierro wrote: > > if grid.create_form or grid.update_form: grid.element(_type='submit')[ > '_value'] = T("something") > > On Wednesday, 2 October 2013 23:15:07 UTC-5, P T wrote: >> >>

[web2py] Change SQLFORM.grid Submit button label

2013-10-02 Thread P T
Hello All, I want change the label of Submit button in the SQLFORm.grid. I found two solutions in the forum and both seems to be not working. The first solution given here Changing SQLFORM.grid submit label from python without javascript?

[web2py] Re: help with user_signature

2013-10-02 Thread P T
calculate", args=[row.id],user_signature=True, hash_vars= True))],csv=False, oncreate=scenario_create) On Wednesday, October 2, 2013 2:39:42 PM UTC-5, P T wrote: > > I am using version 2.6.4 on Windows 7 machine and having a problem with > using user_signature and auth.requires_signature.

[web2py] help with user_signature

2013-10-02 Thread P T
I am using version 2.6.4 on Windows 7 machine and having a problem with using user_signature and auth.requires_signature. I am using SQLFORM.grid to display a list of scenarios created by the logged-in user. I included an additional button "Results", which calls another function "calculate" an

[web2py] Re: upload and a process file using SQLFORM.grid

2013-09-13 Thread P T
Found the answer by searching the forum for "sqlform.grid oncreate" and specifically the answer by Niphlod in this post https://groups.google.com/forum/#!searchin/web2py/sqlform.grid$20oncreate/web2py/ShebcblC9pM/rrdI9F6ZgV8J On Thursday, September 12, 2013 12:05:45 AM UTC-5,

[web2py] upload and a process file using SQLFORM.grid

2013-09-11 Thread P T
Hello All, Just started to learn web2py and here is an idea that I am trying to implement. Users creates scenarios, which includes an uploaded file. After the new scenario is created, the uploaded file should be processed and computed values written to results table. So far, I am successful in