[web2py] Re: general error handling

2015-11-25 Thread Alex Glaros
I'm not sure what potential users would see on PythonAnywhere. I think when they click on the error link, a message would say something like "not logged on to Admin" or "requires admin password". Actually I guess that is ok -- Resources: - http://web2py.com - http://web2py.com/book (Do

[web2py] Re: general error handling

2015-11-25 Thread Dave S
On Wednesday, November 25, 2015 at 4:25:59 PM UTC-8, Alex Glaros wrote: > > is there a way to direct user from any un-handled errors to a generic page > so they don't see the raw dump? > > I mean any errors that I missed and do not handle, could they be handled > by a general error handling fun

[web2py] general error handling

2015-11-25 Thread Alex Glaros
is there a way to direct user from any un-handled errors to a generic page so they don't see the raw dump? I mean any errors that I missed and do not handle, could they be handled by a general error handling function? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
Code available @ https://github.com/gravesmedical/migration Its just a series of scripts that gets run in the order they are in the scripts directory. -Mark On Sunday, November 22, 2015 at 8:58:05 PM UTC-6, Mark Graves wrote: > > Are there any caveats to know about running applications in she

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
I tried both, unfortunately. Working on posting the code right now -Mark On Wed, Nov 25, 2015 at 12:41 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > very strange. Are you using psycopg2 or pg8000? I do not trust the latter. > > > On Tuesday, 24 November 2015 12:42:44 UTC-6, Mark

[web2py] Re: managing project source

2015-11-25 Thread Dave S
On Wednesday, November 25, 2015 at 10:43:41 AM UTC-8, Brian Craft wrote: > > Just looking at web2py for the first time, and I'm not sure what to do > with it: can't manage it with pip, and app code is edited in-place with the > web2py code? I was expecting to be able to install & manage web2py

[web2py] Re: managing project source

2015-11-25 Thread Niphlod
You're right, web2py **should** at some point provide pypi packages. Bonus points to niphlod being the first one who asked years ago :P For the time being, I really don't see the issue: either you want to help with web2py development OR you want to develop your app. In the former case, you use w

[web2py] managing project source

2015-11-25 Thread Brian Craft
Just looking at web2py for the first time, and I'm not sure what to do with it: can't manage it with pip, and app code is edited in-place with the web2py code? I was expecting to be able to install & manage web2py with standard python tools & manage my app code separately, in its own repo. How

[web2py] Re: pyDal error: prepared statement pg8000_statement_0 does not exist

2015-11-25 Thread Massimo Di Pierro
Please use psycopg2 On Wednesday, 25 November 2015 12:12:26 UTC-6, Lisandro wrote: > > I can't get to work a fresh installation of web2py using postgresql > database, it fails trying to connect to the database. > > I have a new fresh installation of Ubuntu 14.04 + PostgreSQL 9.3.10 + > Web2py 2.

[web2py] Re: 5 fields with requires IS_IN_DB in database table makes loading of SQLFORM.grid very slow

2015-11-25 Thread Anthony
If you have requires=IS_IN_DB(...), you will get a default select widget with all the options listed. If there are a large number of options, this could slow things down (not to mention creating a bad user experience, forcing the user to scroll through thousands of options). In that case, you s

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Massimo Di Pierro
very strange. Are you using psycopg2 or pg8000? I do not trust the latter. On Tuesday, 24 November 2015 12:42:44 UTC-6, Mark Graves wrote: > > I'm using postgres, migrating from latin-1 mysql. > > Its a referenced table, and yes I definitely am calling db.commit() > > I will post the entire code t

[web2py] Re: Using web2py with werkzeug?

2015-11-25 Thread Massimo Di Pierro
Hello Lilian, you do not need any middleware but this can be tricky. You need to configure the web server (nginx? apache?) to map some URLs into mezzanine and some into web2py. The problem is if they login into mezzanine and then go to a web2py page, how are user credential transferred? I can

[web2py] pyDal error: prepared statement pg8000_statement_0 does not exist

2015-11-25 Thread Lisandro
I can't get to work a fresh installation of web2py using postgresql database, it fails trying to connect to the database. I have a new fresh installation of Ubuntu 14.04 + PostgreSQL 9.3.10 + Web2py 2.12.3 I've created the role "mytest" to login (in postgres), and I've created the database "myt

[web2py] 5 fields with requires IS_IN_DB in database table makes loading of SQLFORM.grid very slow

2015-11-25 Thread Karl Florian
Hi, 5 fields with requires IS_IN_DB in one of my database tables makes loading of my SQLFORM.grid and SQLFORM very slow. It takes about 20 seconds to open up the SQLFORM.grid view. The users need to pick values out of these 5 masterdata tables. My Impression is that alle of these table are comp

Re: [web2py] Linking webform to specific users in database

2015-11-25 Thread aetagothno
Of course I would do something like that. It works now! Thank you so much for your help and explaining everything. On Tuesday, November 24, 2015 at 6:05:52 PM UTC-5, Anthony wrote: > > In the model, you changed the field name from "location" to "located" > (probably because "location" is a reser

Re: [web2py] Re: how to custom the view sqlform.grid

2015-11-25 Thread Laurent Lc
Ok thank you very much Le 25 nov. 2015 1:23 PM, "Anthony" a écrit : > def mygrid(): > if 'view' in request.args: > db.mytable.field1.readable = db.mytable.field2.readable = ... = > False > ... > > You can change the readable and writable attributes of a field anywhere. > > Anthony

Re: [web2py] Re: how to custom the view sqlform.grid

2015-11-25 Thread Anthony
def mygrid(): if 'view' in request.args: db.mytable.field1.readable = db.mytable.field2.readable = ... = False ... You can change the readable and writable attributes of a field anywhere. Anthony On Wednesday, November 25, 2015 at 3:08:01 AM UTC-5, Laurent Lc wrote: > > Thank yo

Re: [web2py] Re: how to custom the view sqlform.grid

2015-11-25 Thread Laurent Lc
You are right but i do not want to display some fields in the view and not all Le 25 nov. 2015 10:58 AM, "Nico de Groot" a écrit : > You can also set the attribute 'readable' in the controller. > > Nico > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http:

Re: [web2py] Re: how to custom the view sqlform.grid

2015-11-25 Thread Nico de Groot
You can also set the attribute 'readable' in the controller. Nico -- 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 a

Re: [web2py] Re: how to custom the view sqlform.grid

2015-11-25 Thread Laurent Lc
Thank you But i want to change in the view Le 25 nov. 2015 8:37 AM, "Alessio Varalta" < alessio.vara...@ethicalsoftware.it> a écrit : > Hi, you can change your db file. For example set the attribute readable > false if you want that this attribute don't appear in form > > On Wednesday, 25 November