[web2py] Adding extra form elements to SQLFORM

2017-06-05 Thread Karoly Kantor
I am having trouble properly formatting my extra elements to match the rest of the form. This is a quote from the web2py book below. Can someone tell me what is exactly meant by "*The variable my_extra_element should be adapted to the formstyle*"? I am using bootsrap3_inline as formstyle, and

[web2py] web2py 2.15.1

2017-06-05 Thread Karoly Kantor
Dear Massimo, I saw your question in the developers group where I cannot post, therefore i do it here. I am currently aware of the following issues to be fixed: 1. Google 2nd generation SQL is definitely a problem. Please note I made a temporary hack to fix it, described here: https://groups.

[web2py] Re: grid add/edit form label

2017-06-05 Thread T.R.Rajkumar
Yes, Anthony. It now works. Thank you for your valuable time. -- 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 su

[web2py] request.vars list object

2017-06-05 Thread 'Annet' via web2py-users
I have the following URL: http://127.0.0.1:8000/com/shortcut/target/1349?edge=34&inID=1297&label=NASM+Certified+Personal+Trainer&_signature=9c33ff589c78426ce3fcdf2f53f4408028189128 In de target function I have these lines of code: label = request.vars.label get_flash(response, invertex.name +

[web2py] Re: grid add/edit form label

2017-06-05 Thread T.R.Rajkumar
Thanks icodk. You said The last part is after the call to SQLFORM.smartgrid. Here you can manipulate the serialized HTML data by for example changing the "+Add record" text to "+Add person" in the auto generated button I would like to know how you manipulate the html in controller as above f

[web2py] Re: grid add/edit form label

2017-06-05 Thread icodk
Code example: else: #person grid personRow = db(db.person.id == request.args[-1]).select()[0] title = T("cars owned by :") + personRow.name addBtn = T("Add new car for: ") + carRow.name if toCreate: grid[1][0][2][0] =addBtn On Monda

[web2py] Re: request.vars list object

2017-06-05 Thread Kiran Subbaraman
What happens in the case you invoke this url: http://127.0.0.1:8000/com/shortcut/target/1349?edge=34&inID=1297&label=NASM%20Certified%20Personal%20Trainer&_signature=9c33ff589c78426ce3fcdf2f53f4408028189128 Basically instead of `+`, I have used `%20` as the space character. On Monday, June 5, 20

[web2py] Re: Adding extra form elements to SQLFORM

2017-06-05 Thread Anthony
The element you are inserting must have the proper HTML structure (including CSS classes) to fit into the form. Use the browser DOM inspector to get an idea what the HTML should look like for a field in the form. Anthony On Monday, June 5, 2017 at 4:19:29 AM UTC-4, Karoly Kantor wrote: > > I am

[web2py] Access to the console Warning messages within a browser

2017-06-05 Thread e27gis
Does anyone know how to get access to the Warning messages, normally displayed on Web2py console, when we have only access Web2py via a browser on a distant machine

Re: [web2py] not authorised flash message when I used SQLFORM.grid, but worked fine with SQLFORM.smartgrid

2017-06-05 Thread Anthony
On Monday, June 5, 2017 at 1:11:25 AM UTC-4, akshay055ku...@gmail.com wrote: > > I could't use the smartgrid because smartgrid works on complete table but > i had to query the table first. > The smartgrid has the "constraints" argument for that purpose (it is a dictionary with table names as key

[web2py] download a fille.

2017-06-05 Thread akshay055kumar
Hello everyone, I am creating a file named hello_world.py somehow and storing that file in location some_dir/web2py/application/uploads/scripts. I want to give option to user to download that file. Technique i am using is: I created a table with a filed having type uploa

[web2py] possible error in autocomplete code

2017-06-05 Thread Carlos Kitu
Good afternoon, I'm trying to create an autocomplete field to search in the table db.auth_user, but the search must be done with the full name. As db.auth_user has two separate fields (first_name, and last_name), I created a virtual field to compose both fields: db.auth_user.full_name = Field.Vi

[web2py] No SSL support included in this Python

2017-06-05 Thread e27gis
Hello, Having problem sending email with regular mail.auth.server, on a distant server running Apache 2.4,I tried to use the regular SMTPLIB. I got the following message : No SSL support included in this Python. Here is the script that runs fine on my local compture through Web2py.exe. Any id

[web2py] Re: Access to the console Warning messages within a browser

2017-06-05 Thread Anthony
You can set up logging, as described here: http://web2py.com/books/default/chapter/29/04/the-core#Logging. If you copy /web2py/examples/logging.example.config to /web2py/logging.config and restart the server, you should get warnings logged to a /web2py/web2py.log file. You can, of course, custo

[web2py] Re: request.vars list object

2017-06-05 Thread Anthony
Is this a POST request where one of the post variables is also named "label"? If so, request.vars, which combines get_vars and post_vars, will make "label" into a list containing both the GET and POST values. If that's the problem, a fix would be to change your code to: label = request.get_vars

[web2py] Re: request.vars list object

2017-06-05 Thread Anthony
On Monday, June 5, 2017 at 7:31:02 AM UTC-4, Kiran Subbaraman wrote: > > What happens in the case you invoke this url: > http://127.0.0.1:8000/com/shortcut/target/1349?edge=34&inID=1297&label=NASM%20Certified%20Personal%20Trainer&_signature=9c33ff589c78426ce3fcdf2f53f4408028189128 > Basically inst

[web2py] Re: No SSL support included in this Python

2017-06-05 Thread Anthony
May be a problem with your Python installation. See https://groups.google.com/d/msg/web2py/e6t_-CarABU/16tefm8XBQAJ. Anthony On Monday, June 5, 2017 at 9:36:56 AM UTC-4, e27...@gmail.com wrote: > > Hello, > > Having problem sending email with regular mail.auth.server, on a distant > server runn

[web2py] Re: possible error in autocomplete code

2017-06-05 Thread Anthony
You cannot use autocomplete to search a virtual field. It runs a database query, so the field must exist in the database. Anthony On Monday, June 5, 2017 at 9:23:51 AM UTC-4, Carlos Kitu wrote: > > Good afternoon, > I'm trying to create an autocomplete field to search in the table > db.auth_use

[web2py] Re: Adding extra form elements to SQLFORM

2017-06-05 Thread Karoly Kantor
Thanks. On Monday, June 5, 2017 at 2:36:50 PM UTC+2, Anthony wrote: > > The element you are inserting must have the proper HTML structure > (including CSS classes) to fit into the form. Use the browser DOM inspector > to get an idea what the HTML should look like for a field in the form. > > Ant

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-05 Thread Anthony
The problem is that you have auth.signature but are doing inserts without a logged in user. As a result, the values of the created_by and modified_by fields are None but are required to be id's from the db.auth_user table. This should simply result in a failed validation rather than an exception

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-05 Thread Jordan Ladora
Thanks. It's also throwing the identical error when using the app's web page as a logged in user. Suggestions? On Mon, Jun 5, 2017 at 10:19 AM, Anthony wrote: > The problem is that you have auth.signature but are doing inserts without > a logged in user. As a result, the values of the created_

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-05 Thread Anthony
On Monday, June 5, 2017 at 12:32:09 PM UTC-4, Jordan Ladora wrote: > > Thanks. It's also throwing the identical error when using the app's web > page as a logged in user. > Are you sure? I tried it as a logged in user and it works fine (using your exact table definition and insert code). Anthon

[web2py] Re: email sending problem

2017-06-05 Thread Dave S
On Sunday, June 4, 2017 at 9:54:03 AM UTC-7, e27...@gmail.com wrote: > > > Since mail.send() return False or True, there is no error here. I am not > sur we can log any error here. > > How could I get the same "Warning" information that I can have through the > local Web2py console which displa

[web2py] Re: Get access to warning message when only using WEb2py through a browser on a distant machine

2017-06-05 Thread Dave S
On Sunday, June 4, 2017 at 9:04:52 AM UTC-7, e27...@gmail.com wrote: > > Hello, > > I am encountering email sending problem with the last web2py version on a > distant machine running Apache 2.4. > > I have exactly the same controller running fine on a local machine with > WEb2py server (not Ap

[web2py] Re: Problem sending email with new web2py version on Apache 2.4

2017-06-05 Thread Dave S
On Sunday, June 4, 2017 at 9:42:14 AM UTC-7, e27...@gmail.com wrote: > > After upgrading to the last version of Web2py, along which the latest > Apache 2.4, we are unable to send email any more. Note that we have access > to this remote server only through a browser for our Web2py development.

[web2py] Re: download a fille.

2017-06-05 Thread Dave S
On Monday, June 5, 2017 at 6:18:06 AM UTC-7, akshay0...@gmail.com wrote: > > Hello everyone, > I am creating a file named hello_world.py somehow and > storing that file in location some_dir/web2py/application/uploads/scripts. > I want to give option to user to download that

[web2py] auth.navbar modification

2017-06-05 Thread Pierre
Hi I am trying to redirect user after successful login. I do nothing but what the book says but i am unable to change default behaviour here is the code : in db.py : auth.settings.registration_requires_verification = False auth.settings.registration_requires_approval = False auth.settings.reset

[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S
On Sunday, June 4, 2017 at 3:33:18 AM UTC-7, Scorpa wrote: > > Hello folks ! > > > Many times when i'm searching for an answer in the official docs about how > to do this or that i'm ending in the stack overflow questions area or in > this group. > and thats really frustrating that even simple

[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Anthony
> > Many times when i'm searching for an answer in the official docs about how > to do this or that i'm ending in the stack overflow questions area or in > this group. > and thats really frustrating that even simplest tasks can't be done easy. > What are some examples? > For example, how act

[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Anthony
> > For example, how actually routes.py works ? I renamed routes.example.py >> to routes.py according to internal notes. >> Reloaded routes|reloaded web2py and... no effect. >> > > As the docs state, you don't just rename those files -- the routes.py file > must be put

[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S
On Monday, June 5, 2017 at 12:10:17 PM UTC-7, Anthony wrote: > > For example, how actually routes.py works ? I renamed routes.example.py >>> to routes.py according to internal notes. >>> Reloaded routes|reloaded web2py and... no effect. >>> >> >> As the docs state, you

[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S
On Monday, June 5, 2017 at 11:59:49 AM UTC-7, Anthony wrote: > > Many times when i'm searching for an answer in the official docs about how >> to do this or that i'm ending in the stack overflow questions area or in >> this group. >> and thats really frustrating that even simplest tasks can't b

[web2py] Re: Saving to database random type data

2017-06-05 Thread Anthony
Rather than just having a "blob" field, you might instead want an "upload" field along with an associated "blob" field. The .store() and .retrieve() methods (which are documented here ), operate on "u

[web2py] Re: web2py page refresh causes postgres to reach the max number of connections

2017-06-05 Thread Mick
Thank you so much for your help, my pool_size was set to 100, I set it to 1 and seems to be working ok. On Sunday, June 4, 2017 at 9:19:03 AM UTC-7, Massimo Di Pierro wrote: > > What is your connection string? > > web2py does connection pooling. It does not close connections, it stores > them an

[web2py] Re: different default application based on the host header - Python anywhere - Go daddy

2017-06-05 Thread Ron Chatterjee
Okay, but Massimo, What's the logic to route multiple domain to multiple different apps hosted at pythonanywhere? The above don't seem to work (example shown with two domains being routed to two apps - doesn't work). -Ron On Sunday, June 4, 2017 at 12:14:11 PM UTC-4, Massimo Di Pierro wrote:

[web2py] Re: grid add/edit form label

2017-06-05 Thread T.R.Rajkumar
Thanks icodk for the code. But I do not understand grid[1][0][2][0]. What is that? Could you pl. tell me. Thank you once again. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: download a fille.

2017-06-05 Thread akshay055kumar
I haven't written any download function yet but yes i was planning to use the download function available in the controller. I was just checking in the table by database administration. is upload subdirectory is not the same subdirectory i am storing my file into?? I am storing the file in web2p

Re: [web2py] not authorised flash message when I used SQLFORM.grid, but worked fine with SQLFORM.smartgrid

2017-06-05 Thread Rudy
Hi Akshay, Thanks for confirming Leandro Paz suggestion and replying me, I truly think this forum needs all of us (even I still have a lot to learn in web2py) to participate to share scenarios and solutions. For smartgrid, you can still use query I believe, I have something like below. Good lu

Re: [web2py] not authorised flash message when I used SQLFORM.grid, but worked fine with SQLFORM.smartgrid

2017-06-05 Thread Rudy
Right on Anthony, I don't think user_signature=False is the real fix for the strange behaviour. When i tested it, i did log in, plus i used smartgrid the same way. Thanks for confirming it. On Monday, June 5, 2017 at 9:14:48 PM UTC+8, Anthony wrote: > > On Monday, June 5, 2017 at 1:11:25 AM UTC-

Re: [web2py] Migration fails when dropping a column on Postgresql

2017-06-05 Thread Doug Taylor
This is becoming a show-stopper for me now as I cannot ADD fields to an exiting table either. I'm pretty sure adding fields worked before when I was running on Windows. Made the transition to Linux on my office desktop recently and that was when I first encountered the problem. Adding the field