[web2py] Re: grid oncreate

2017-05-23 Thread T.R.Rajkumar
The values are for the user. So as soon the user logs in I can find the values. -- 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

[web2py] Re: Is web2py incompatible with 2nd generation Google Cloud SQL ?

2017-05-23 Thread Karoly Kantor
Dear Massimo, I am only writing again as a reminder because you said last month you would look into this asap. This is very important I think as one of the key offerings of web2py, supporting GAE, seems to be broken. At least for me. Thanks! -- Resources: - http://web2py.com - http://web2py.

[web2py] Re: Http to Https [URGENT]

2017-05-23 Thread sunda . amran
Hey Leonel Câmara, it means that since we change the site from http to https, we are not able to send mails anymore from the website, before we changes it, it was working without problem. The only change we did between was the https -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py] Re: Http to Https [URGENT]

2017-05-23 Thread António Ramos
probably you should check the error in the mail server console or in the web2py side and come back here again with some logs... if you cant get info from the mail server try using a dummy mail server. Never tested it but may help you http://nilhcem.com/FakeSMTP/ 2017-05-23 9:33 GMT+01:00 : > Hey

[web2py] Re: grid oncreate

2017-05-23 Thread T.R.Rajkumar
I solved the issue as hinted by Anthony and Dave S. In model db.py I added this function def get_new_amcno(): rows = db.executesql("exec gen_amcno_new @ucod = ?,@divcod=?,@sec=?",placeholders=([session.unit,session.divn, session.sec]),as_dict=True) for i in rows: amcno = i['a

[web2py] grid edit

2017-05-23 Thread T.R.Rajkumar
I call this 127.0.0.1:8000/web_ocms/amc/newamcmaster/edit/amc_master/3 by clicking the edit button of the recor in the grid, and the edit form for the record is displayed. After editing when I submit error ticket is issued stating id column cannot be updated. Pl. help. Thanks for your time. The

[web2py] Re: grid oncreate

2017-05-23 Thread Anthony
On Tuesday, May 23, 2017 at 7:40:13 AM UTC-4, T.R.Rajkumar wrote: > > I solved the issue as hinted by Anthony and Dave S. > > In model db.py I added this function > > def get_new_amcno(): > rows = db.executesql("exec gen_amcno_new @ucod = > ?,@divcod=?,@sec=?",placeholders=([session.unit,ses

[web2py] Re: Codec MS-SQL, unicode Latin1 UTF8

2017-05-23 Thread Tomasz Wrona
HI, I am using mssql4 adapter. For table: CREATE TABLE myTable ( Column_a varchar (10) COLLATE French_CI_AS NOT NULL, Column_b varchar (10) COLLATE Latin1_General_CI_AS NOT NULL, Column_c varchar (10) COLLATE Estonian_CS_AS NOT NULL) I create a view: CREATE VIEW v_myTable AS SELECT CONVERT (nv

[web2py] I to access the admin from Mozilla on Ubuntu ?

2017-05-23 Thread robin deatherage
Ive tried many times and have reset everything and also deleted all browser history. Here is the Ticket error it sends-- Internal errorTicket issued: admin/127.0.0.1.2017-05-22.12-36-19.2dbabf02-f0f8-4cef-9c53-9287f3212a47

[web2py] How to make virtualenv, uwsgi, and web2py play nice...

2017-05-23 Thread Brad Miller
Second question, At one point I had uwsgi and web2py and my virtualenv all working together nicely. But I was forced onto new hardware/os and had to rebuild the virtual environment and uwsgi.I have a line in my uwsgi config file that points to the correct virtualenv, where I have things li

[web2py] how to add button in UI to call functin written controller/default.py

2017-05-23 Thread vinay
i am in need of little help to provide 1. a box to upload image , 2 a provision to provide user input in text 3. A button to call a function from default.py any sample code , suggestions are welcome . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gith

[web2py] How to force an update to the scheduler schema

2017-05-23 Thread Brad Miller
Due to a forced migration to new hardware/os on webfaction, I just recently had to upgrade from 2.5.1 to 2.14.6. In the process I have managed to get myself into a state where the scheduler schema is wrong. (I'm using postgresql) I get the following error: ProgrammingError: ('ERROR', '42703'

[web2py] Re: I to access the admin from Mozilla on Ubuntu ?

2017-05-23 Thread Anthony
We can't access your error ticket. How about a fresh web2py install? Which version of Python? Do other apps work? Other browsers? On Tuesday, May 23, 2017 at 8:30:08 AM UTC-4, robin deatherage wrote: > > Ive tried many times and have reset everything and also deleted all > browser history. Here

[web2py] Re: DAL can't connect to database with auto_import=True using other user than one of the first execution

2017-05-23 Thread Lisandro
I think I got it solved, I had to use another DAL parameter: table_hash If you look into databases folder, you will see that every .table file begins with a hash. That hash was initialy generated by web2py when the tables were created, the first time the models were run. I think that web2py gen

[web2py] Re: function contingent on registration

2017-05-23 Thread runruh11
this feels like checkmate. I did get the 'is not callable' error as you anticipated. Is there an avenue that I don't see? At this point I am resigned to running the code a bunch of times and creating a bunch of lists; then assign one to each user; any advice before I go down that road? On

[web2py] Determine if a website is being accessed from a WebView?

2017-05-23 Thread Spokes
I've created Android application, which is essentially a web2py website wrapped in a React Native WebView. I'd like the website to present slightly different content, depending on whether it's being accessed from an app or a browser.

[web2py] Re: function contingent on registration

2017-05-23 Thread Anthony
On Tuesday, May 23, 2017 at 11:39:17 AM UTC-4, runru...@gmail.com wrote: > > this feels like checkmate. > Why? Just write a function that accepts a form as an argument (you don't have to actually do anything with the form in the function) and does the inserts, and use that as the register_onacce

[web2py] Re: Determine if a website is being accessed from a WebView?

2017-05-23 Thread Anthony
I don't think web2py includes anything specific, but there are general solutions to the problem. For example, see https://www.npmjs.com/package/is-webview (and the "Sources" links at the bottom of the page). Anthony On Tuesday, May 23, 2017 at 12:02:07 PM UTC-4, Spokes wrote: > > > I've create

[web2py] Re: I to access the admin from Mozilla on Ubuntu ?

2017-05-23 Thread lyn2py
Is this an web2py an instance on a production server or virtualenv or local desktop? On Tuesday, May 23, 2017 at 8:30:08 PM UTC+8, robin deatherage wrote: > > Ive tried many times and have reset everything and also deleted all > browser history. Here is the Ticket error it sends-- > Internal er

[web2py] Re: How to force an update to the scheduler schema

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 5:30:08 AM UTC-7, Brad Miller wrote: > > Due to a forced migration to new hardware/os on webfaction, I just > recently had to upgrade from 2.5.1 to 2.14.6. > > In the process I have managed to get myself into a state where the > scheduler schema is wrong. (I'm usin

[web2py] Re: how to add button in UI to call functin written controller/default.py

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 5:30:09 AM UTC-7, vinay wrote: > > i am in need of little help to provide > 1. a box to upload image , > 2 a provision to provide user input in text > 3. A button to call a function from default.py > > any sample code , suggestions are welcome . > I'd start wit

[web2py] Re: Determine if a website is being accessed from a WebView?

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 9:33:11 AM UTC-7, Anthony wrote: > > I don't think web2py includes anything specific, but there are general > solutions to the problem. For example, see > https://www.npmjs.com/package/is-webview (and the "Sources" links at the > bottom of the page). > > Anthony > >

[web2py] Re: I to access the admin from Mozilla on Ubuntu ?

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 5:32:08 AM UTC-7, Anthony wrote: > > We can't access your error ticket. How about a fresh web2py install? Which > version of Python? Do other apps work? Other browsers? > The OP should note that if they have a local console, the ticket can be found at [web2py folde

[web2py] Re: Determine if a website is being accessed from a WebView?

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 11:53:07 AM UTC-7, Dave S wrote: > > > > On Tuesday, May 23, 2017 at 9:33:11 AM UTC-7, Anthony wrote: >> >> I don't think web2py includes anything specific, but there are general >> solutions to the problem. For example, see >> https://www.npmjs.com/package/is-webvie

[web2py] Re: DAL can't connect to database with auto_import=True using other user than one of the first execution

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 7:28:42 AM UTC-7, Lisandro wrote: > > I think I got it solved, I had to use another DAL parameter: table_hash > > If you look into databases folder, you will see that every .table file > begins with a hash. > That hash was initialy generated by web2py when the tables

[web2py] Re: DAL can't connect to database with auto_import=True using other user than one of the first execution

2017-05-23 Thread Dave S
On Tuesday, May 23, 2017 at 12:25:27 PM UTC-7, Dave S wrote: > > > > On Tuesday, May 23, 2017 at 7:28:42 AM UTC-7, Lisandro wrote: >> >> I think I got it solved, I had to use another DAL parameter: table_hash >> >> If you look into databases folder, you will see that every .table file >> begins

Re: [web2py] Re: Editing an SQLFORM.grid - use check boxes to select downloads.

2017-05-23 Thread 'Matthew J Watts' via web2py-users
Ok great thanks , i will check it out On Tue, May 23, 2017 at 1:53 AM, 黄祥 wrote: > i think you can use widget to show checkbox : SQLFORM.widgets.checkboxes. > widget > ref: > http://web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets > and use record representation for download >

[web2py] Re: Cassandra and web2py

2017-05-23 Thread Nicolas Petitclerc
Sorry, it took me a while to test that out, but it works great! Thank you, that's exactly what I needed. I had to wrap my head around how cache works, but this tread help me out: https://groups.google.com/forum/#!topic/web2py/w1b5ZvO9JqY -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: Determine if a website is being accessed from a WebView?

2017-05-23 Thread Anthony
> Does request.env.http_user_agent help? >> > > There's actually a call request.user_agent() that returns a Storage with > "os.name", "is_tablet", "is_mobile", and "browser" (shortened version of > the env value). > Sure, request.user_agent() can help (though there are other methods as well)

[web2py] Re: Determine if a website is being accessed from a WebView?

2017-05-23 Thread Spokes
Anthony is correct about request.user_agent(): it will show the OS as Linux, it will show the distribution as 'Android', and it shows an inscrutable and unhelpful browser agent string. I followed Dave's suggestion, in checking request.env.http_user_agent, and it turns out that it does contain

[web2py] change background color of a form

2017-05-23 Thread rajjmatthur
Doing this below, I can change the button color. How would I change the background string or textarea color? Below don't seem to work. Thanks in advance in db.py db.define_table("contact", Field("your_name", "string", label='Name', ), Field("your_email", label='

[web2py] Re: change background color of a form

2017-05-23 Thread Ron Chatterjee
try this. {{form.element('input[type=submit]').update(_class="btn btn-primary")}} {{form.element('input[type=text]').update(_class="custom")}} {{=form}} $('textarea').css('background', 'blue'); .custom { background-color: green; } On Tuesday, May 23, 2017 at 11:41:04 PM UTC-4, rajjm...

[web2py] Re: grid edit

2017-05-23 Thread T.R.Rajkumar
Why is DAL trying to update id column in grid edit form submission. -- 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

[web2py] Re: grid oncreate

2017-05-23 Thread T.R.Rajkumar
First, why use db.executesql rather than a regular DAL query? Second, you should move the call to get_new_amcno to the controller function where you need to do this insert and set the defaults there -- otherwise, you are doing this database query on every single request to the app, even all the