[web2py] Re: db.company.insert() error

2017-08-29 Thread Ben Lawrence
def get_company_name(s): """Takes out common domain suffixes e.g. com, net :param s: domain name :type s: string :returns: sanitized string :rtype: unicode string """ return (((s.replace('.com',' ')).replace('.net',' '))\ .replace('.org',' '))\ .rep

[web2py] Re: Alias column names (akin to AS clause) in db select

2017-08-29 Thread Val K
try this trick: db.Table1.blah = db.Table1.bar.clone(name = 'blah', _rname='bar') db(...).select(db.Table1.blah) On Tuesday, August 29, 2017 at 3:11:36 AM UTC+3, Paolo Caruccio wrote: > > Maybe > > def test(): > rows = db(db.Table1.foo==db.Table2.foo).select(db.Table1.foo. > with_alias('f

[web2py] Re: db.company.insert() error

2017-08-29 Thread Anthony
What does the get_company_name() function look like? On Tuesday, August 29, 2017 at 6:22:57 PM UTC-4, Ben Lawrence wrote: > > 2.15.3-stable+timestamp.2017.08.07.07.32.04 > (Running on nginx/1.10.3, Python 2.7.12) > > > Hi > I hesitate to ask this because it will betray my stupidity > > I have this

[web2py] Re: Print statement fails in command line script (v2.15.3)

2017-08-29 Thread Anthony
Looks like shell.py imports print_function from __future__, which requires use of the print() function. I suppose this should be considered a breaking of backward compatibility, so feel free to report an issue on Github. Anthony On Tuesday, August 29, 2017 at 4:33:53 PM UTC-4, Jim Karsten wrote

[web2py] Re: put multiple database tables like grid in one place

2017-08-29 Thread 黄祥
got it, my bad forget to add .as_list() on the rows thanks and best regards, stifan -- 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 mes

[web2py] Re: Print statement fails in command line script (v2.15.3)

2017-08-29 Thread Dave S
On Tuesday, August 29, 2017 at 1:33:53 PM UTC-7, Jim Karsten wrote: > > I run many scripts from the command line. After upgrading to v2.15.3, I > find print statements produce a SyntaxError. If I convert the statements to > a print function it works. This was not a problem in v2.14.6. > > What

[web2py] db.company.insert() error

2017-08-29 Thread Ben Lawrence
2.15.3-stable+timestamp.2017.08.07.07.32.04 (Running on nginx/1.10.3, Python 2.7.12) Hi I hesitate to ask this because it will betray my stupidity I have this: *c_rows = db(db.company.domain_tag == c_domain).select()* if *len(c_rows)==0*: # add the company c_id = db.company.ins

[web2py] Print statement fails in command line script (v2.15.3)

2017-08-29 Thread Jim Karsten
I run many scripts from the command line. After upgrading to v2.15.3, I find print statements produce a SyntaxError. If I convert the statements to a print function it works. This was not a problem in v2.14.6. To illustrate: $ cat test.py #!/usr/bin/env python if __name__ == '__main__': pri

[web2py] Re: Two database join query

2017-08-29 Thread Dave S
On Tuesday, August 29, 2017 at 1:19:29 AM UTC-7, Artem wrote: > > Hi , > Yes, tried > it rise error : OperationalError: no such table: table1 > I think the problem is the db() out front. You're asking for an operation (method) on a database object that doesn't have your tables. You have a d

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-29 Thread 98ujko9
I use the stock Rocket server that comes with web2py and I restart it after changing the routes.py. I must say that I don't fully understand the big picture of how the apps the compiler and the operating system cooperate. One time I uploaded a site to GAE with two separate apps but the tables

Re: [web2py] Re: how to create pdf report in web2py???

2017-08-29 Thread Alex
Thanks! at the moment we don't have a user list, but that's something we have to think about. You can also contact us per mail. One way to save the report is using the localStorageReportKey setting (see https://www.reportbro.com/docs/options ), e.g. $("#reportbro").reportBro({ localStorageR

Re: [web2py] Re: weird issue with date field

2017-08-29 Thread Anthony
If you have upgraded an existing app, make sure you update the web2py JavaScript files as well. -- 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 recei

[web2py] Re: AttributeError: 'SQLite' object has no attribute 'file_open'

2017-08-29 Thread Lisandro
John, could you try with the web2py version for testers? The commit fixed the problem, but I think it will be included in the next stable version. At least that's what I did: I downloaded the "for testers" source code version, and it worked ok: This is the link to the download: https://mdipierro

Re: [web2py] Re: how to create pdf report in web2py???

2017-08-29 Thread Javier Pepe
Alex The tool is very good, you have a user list for question, i am to try the designer and not found howto save this. Thanks 2017-08-26 10:19 GMT-03:00 Alex : > We created a report tool since creating pdf reports in a web application > is a common problem and none of the existing solutions wer

Re: [web2py] Re: weird issue with date field

2017-08-29 Thread Yoel Benitez Fonseca
umm.. should test it again ... thnk 2017-08-28 22:37 GMT-04:00 Peter : > For what it's worth... > > I downloaded the latest, > > 2.15.3-stable+timestamp.2017.08.07.12.51.45 > (Running on Rocket 1.2.6, Python 2.7.12) > > > pasted your code into db.py > > used crud.create in the controller (I know

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-29 Thread Anthony
Using the same routes, I cannot replicate the generated URLs you observe. Make sure you reload routes (via admin) or restart the web server. Also, do you really need a separate init app and notes app? Especially the init app -- what is it doing? If it just provides a single home page, that does

[web2py] Re: put multiple database tables like grid in one place

2017-08-29 Thread Val K
as_list() is missed, try: people = json.dumps(rows.as_list()) On Tuesday, August 29, 2017 at 4:45:47 AM UTC+3, 黄祥 wrote: > > trying your suggestion with datatables that have web2py multiple table > relations join > *ref:* > > http://www.web2pyslices.com/slice/show/2052/using-datatablesnet-with-

[web2py] Re: AttributeError: 'SQLite' object has no attribute 'file_open'

2017-08-29 Thread Jitun John
Hi Massimo, I have the 2.15.3 version installed, but the issue remains. I confirm the same code works on 2.14.6 On Sunday, August 13, 2017 at

Re: [web2py] Two database join query

2017-08-29 Thread Manuele
I think there's no way in a single query... try making two different query and join results creating a brand new rows object I hope it could help Manuele Il 28/08/2017 18:04, Artem ha scritto: Hello ! Hope someone can help . Thanks in advance ! I have two database : db1 = DAL('sqlite:/

[web2py] Re: Two database join query

2017-08-29 Thread Artem
Hi , yes i'm tried . it rise error : OperationalError: no such table: table1 On Tuesday, August 29, 2017 at 5:58:20 AM UTC+8, 黄祥 wrote: > > had you tried ? > *e.g. not tested* > rows = db(db1.table1.pid == db2.table2.pid).select() > > ref: > > http://web2py.com/books/default/chapter/29/06/the-dat