[web2py] Re: problem with PostgreSQL database

2016-01-11 Thread Massimo Di Pierro
very strange. ConnectionWrapper is not a web2py/dal object. which version of psycopg2 are you using? On Monday, 11 January 2016 21:27:24 UTC-6, Júlia Rizza wrote: > > I have an web2py app connected with a PostgreSQL database and it's raising > the following error: > > must be psycopg2._psycopg.

[web2py] Re: Why my mail doesn't work?

2016-01-11 Thread Massimo Di Pierro
I have been having lots of problems with gmail recently. google rejecting calls and not logging them. For my apps I moved to fastmail.com and it works well. On Saturday, 9 January 2016 11:30:12 UTC-6, rgbap...@gmail.com wrote: > > in db.py I have: > > ## configure email > mail = auth.settings.m

[web2py] Re: web2py session disable

2016-01-11 Thread T.R.Rajkumar
@Anthony Earlier I had this in routes.py routes_in = ( ('/ts2', '/web_ts2_site/home/home'), [('/web_ts2_site', '/web_ts2_site', dict(web2py_disable_session=True)], ) routes_out = () After your kind question I looked into the error ticket. It reported a syntax error near the square bracket.

[web2py] problem with PostgreSQL database

2016-01-11 Thread Júlia Rizza
I have an web2py app connected with a PostgreSQL database and it's raising the following error: must be psycopg2._psycopg.connection, not ConnectionWrapper I couldn't figure it out. This is the traceback: Traceback (most recent call last): File "/var/www/web2py/gluon/restricted.py", line

[web2py] Re: SQLFORM.grid(): help requested

2016-01-11 Thread Anthony
On Monday, January 11, 2016 at 4:18:09 PM UTC-5, Wolf-Dieter Klotz wrote: > > grid.element('.web2py_form') is the FORM object, right? ...never had the > idea to look in this direction - tanks a lot. > Yes, but I guess that's not what you want. You don't want to add a button to a form, but to the

Re: [web2py] Re: +Add Record in smartgrid

2016-01-11 Thread Ron Chatterjee
How do I change the field name using smartgrid? Or add extra field name when I link tables? On Monday, January 11, 2016 at 3:53:51 PM UTC-5, Richard wrote: > > What about : > > grid.element(_title='Add record to database', _class="btn btn-primary') > > Or you may try with _style='background:

Re: [web2py] Email Registration

2016-01-11 Thread Alessio Varalta
write in the pythonanywhere forum because for example on my server there are a service that web2py use automatic for the email we use our server...but i use also pythonanywhere and i know that have specific services for example for generate pdf ecc..( i don't use pythonanywhere with email) So w

[web2py] Re: Can we use a web2py app on Android mobile?

2016-01-11 Thread Alessio Varalta
Sorry, , you are right. Now i have developed only in Android now in these day for a project i start to study cordova and is true that you can upload on Google market this my first time with Hybrid app Il giorno lunedì 11 gennaio 2016 13:17:14 UTC+1, Andrew Buchan ha scritto: > > Just to butt-in

[web2py] Re: SQLFORM.grid(): help requested

2016-01-11 Thread Wolf-Dieter Klotz
grid.element('.web2py_form') is the FORM object, right? ...never had the idea to look in this direction - tanks a lot. -WDK On Monday, 11 January 2016 20:13:39 UTC+1, Anthony wrote: > > Presumably you only want to add a button to create and edit forms, so: > > if 'new' in request.args or 'ed

[web2py] Re: SQLFORM.grid(): help requested

2016-01-11 Thread Wolf-Dieter Klotz
I want to place a button on the line where the csv buttons appear or above the grid in-line with the search and clear buttons. -WD On Monday, 11 January 2016 18:23:39 UTC+1, Jim S wrote: > > Do you want to add buttons to each row in the grid? > > -Jim > > On Monday, January 11, 2016 at 10:39:53

Re: [web2py] Re: +Add Record in smartgrid

2016-01-11 Thread Richard Vézina
What about : grid.element(_title='Add record to database', _class="btn btn-primary') Or you may try with _style='background: blue;' Though, would be better with the first option because the whole button style with be manage by bootstrap properly... Changing only background color will result it

[web2py] Re: +Add Record in smartgrid

2016-01-11 Thread Ron Chatterjee
It works Anthony. Thank you. You happen to know how to change the color or the box to blue? lol. On Friday, January 8, 2016 at 5:42:27 PM UTC-5, Anthony wrote: > > Unfortunately, that's hard coded. You can do: > > grid = ... > addspan = grid.element(_title='Add record to database') > addspan[0]

[web2py] Re: Can I use phonegap to create my android app written using web2py?

2016-01-11 Thread Leonel Câmara
Yes I have done it many times. Usually I just use web2py's REST decorator to provide an interface that returns json which I get using jquery ajax. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

Re: [web2py] Re: web2py httpserver log file location

2016-01-11 Thread Vid Ogris
What do u suggest I use to startthe exe program. It takes one parameter (script id)? On Jan 11, 2016 8:50 PM, "Niphlod" wrote: > you can't os.chdir in web2py. first it's not threadsafe. second, you screw > up all web2py relative imports. > > BTW: httpserver.log is put on the same folder web2py.py

Re: [web2py] Re: import_from_csv_file

2016-01-11 Thread Marcello Console
Thank you 2016-01-11 20:25 GMT+01:00, Anthony : > db.mytable.import_from_csv(..., unique='my_unique_column') > > will do an update instead of an insert if the value of the > "my_unique_column" field matches that of an existing record in the > database. > > Anthony > > On Monday, January 11, 20

[web2py] Re: web2py httpserver log file location

2016-01-11 Thread Niphlod
you can't os.chdir in web2py. first it's not threadsafe. second, you screw up all web2py relative imports. BTW: httpserver.log is put on the same folder web2py.py is, unless you are using the -f parameter, in which case it sits in that directory, which is the one containing the "applications" f

Re: [web2py] Re: server function not triggered in some cases

2016-01-11 Thread Niphlod
sooo. finally. The external process is started from within web2py. Which is handled by a webserver. Which ALWAYS imposes a timeout. You can't start a neverending process inside a web request. That's why long-running processes NEED to be managed OUTSIDE web2py (and why web2py provides a

[web2py] Re: Can I use phonegap to create my android app written using web2py?

2016-01-11 Thread Niphlod
phonegap just takes care of the frontend. and is not anywhere compatible with python. You can use html, css and js only On Monday, January 11, 2016 at 7:28:41 PM UTC+1, aston...@gmail.com wrote: > > If yes, how? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

Re: [web2py] 2.13.4 and routes.py

2016-01-11 Thread Richard Vézina
Yes I found it, but it was talking that someone can leave it in the app folder so I wasn't so sure, that this was the right template file. Issues that I have shouldn't come from there anyway scince my app routing looks fine. And I found some thing more relevant as explanation of some my issues. T

Re: [web2py] Re: why you should upgrade to web2py 2.13.4

2016-01-11 Thread Richard Vézina
I think I found where was coming from some of the weird issues that I had... I forgot to restart an instance of web2py that I use securely over ssh to access admin and appadmin from remote computer when in production... I keep looking at all the weird things I face. Sorry if I come up with some fa

[web2py] Re: import_from_csv_file

2016-01-11 Thread Anthony
db.mytable.import_from_csv(..., unique='my_unique_column') will do an update instead of an insert if the value of the "my_unique_column" field matches that of an existing record in the database. Anthony On Monday, January 11, 2016 at 12:07:55 PM UTC-5, goome wrote: > > hi > Does import_from_csv

Re: [web2py] 2.13.4 and routes.py

2016-01-11 Thread Anthony
Should still work. Note, the routes.py example files were moved to /web2py/examples quite a while ago. Anthony On Monday, January 11, 2016 at 12:31:37 PM UTC-5, Richard wrote: > > Hello, > > I would like to know if anything as change with routes in this version > (2.13.4). I am experimenting al

[web2py] Re: SQLFORM.grid(): help requested

2016-01-11 Thread Anthony
Presumably you only want to add a button to create and edit forms, so: if 'new' in request.args or 'edit' in request.args: grid.element('.web2py_form').add_button(...) Anthony On Monday, January 11, 2016 at 11:39:53 AM UTC-5, Wolf-Dieter Klotz wrote: > > I was struggling quite some t

[web2py] Re: web2py is giving me wrong time when I am using request.now for datetime. How to get time a/c as GMT?

2016-01-11 Thread Anthony
web2py isn't giving you the "wrong" time -- it's the local time on your server. If you want UTC, you can use request.utcnow (request.now and request.utcnow are just datetime.datetime.now() and datetime.datetime.utcnow(), respectively). Anthony On Monday, January 11, 2016 at 12:50:05 PM UTC-5,

[web2py] Re: Why I am always being redirected? How to get a response.flash instead here?

2016-01-11 Thread Anthony
On Monday, January 11, 2016 at 1:03:25 PM UTC-5, RAGHIB R wrote: > > {{= > x.name}} > this in my view calls this functions: > def my_insert_function(): > _id = request.args(0) > db.store.insert(stuff = _id) > > > if I don't put any redirect("sm page") here it takes me to a null page. > How

Re: [web2py] Re: Support for BIT(1) as boolean?

2016-01-11 Thread Alfonso Serra
Its weird the application seems to work fine but cant create a select() at the console. The queries in the controllers doesnt fail. This is the db definition: if not request.env.web2py_runtime_gae: db = DAL("mysql://root:@localhost/mydb", pool_size = 10, check_reserved= None, migrate=True)

[web2py] Can I use phonegap to create my android app written using web2py?

2016-01-11 Thread aston . ribat
If yes, how? -- 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 subscribed to the Google Groups "web2py-users" gro

[web2py] Why I am always being redirected? How to get a response.flash instead here?

2016-01-11 Thread RAGHIB R
{{= x.name}} this in my view calls this functions: def my_insert_function(): _id = request.args(0) db.store.insert(stuff = _id) if I don't put any redirect("sm page") here it takes me to a null page. How to prevent this and get a response.flash instead? -- Resources: - http://web2py.com

[web2py] web2py is giving me wrong time when I am using request.now for datetime. How to get time a/c as GMT?

2016-01-11 Thread RAGHIB R
Can we do it without any plugin? If yes, how? -- 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 subscribed to the

[web2py] 2.13.4 and routes.py

2016-01-11 Thread Richard
Hello, I would like to know if anything as change with routes in this version (2.13.4). I am experimenting all sorts of weird issues... I try to investiguate... I don't find anymore the routes.py example in web2py tree... The one that we set in web2py folder... The only thing I use this : ro

[web2py] Re: SQLFORM.grid(): help requested

2016-01-11 Thread Jim S
Do you want to add buttons to each row in the grid? -Jim On Monday, January 11, 2016 at 10:39:53 AM UTC-6, Wolf-Dieter Klotz wrote: > > I was struggling quite some time with web2py, but finally solved a lot of > misunderstood problems myself. However I never succeeded in the following. > In my

[web2py] import_from_csv_file

2016-01-11 Thread goome
hi Does import_from_csv_file only operate insert sql statement or it could also operate update record? In this case would it be enough the presence of unique column in the csv(without id) for it? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.c

Re: [web2py] Re: Support for BIT(1) as boolean?

2016-01-11 Thread Massimiliano
Eventually take a look here: http://www.web2pyslices.com/slice/show/1611/postgresql-custom-adapter On Mon, Jan 11, 2016 at 5:57 PM, Alfonso Serra wrote: > Im sorry i just seen Massimo's answer at the post: > > https://groups.google.com/forum/#!searchin/web2py/boolean$20values/web2py/IukqqZF_P

[web2py] Re: Support for BIT(1) as boolean?

2016-01-11 Thread Alfonso Serra
Im sorry i just seen Massimo's answer at the post: https://groups.google.com/forum/#!searchin/web2py/boolean$20values/web2py/IukqqZF_PPE/Dehg9dKUT58J import copy db =DAL() db._adapter.types = copy.copy(db._adapter.types) db._adapter.types['boolean']='TINYINT(1)' db._adapter.TRUE = 1 db._adapter.FA

[web2py] Support for BIT(1) as boolean?

2016-01-11 Thread Alfonso Serra
I need to do some rawsql calculations involving booleans and I would like to add boolean support to web2py using 0 or 1 BIT(1) in the database, so i dont have to convert "T" or "F" every time. My question are: Where can i find the code that does the conversion from CHAR() "T" to boolean and mys

[web2py] SQLFORM.grid(): help requested

2016-01-11 Thread Wolf-Dieter Klotz
I was struggling quite some time with web2py, but finally solved a lot of misunderstood problems myself. However I never succeeded in the following. In my controller I create a grid with form=SQLFORM.grid(...). form is not an object it is a member of SQLFORM. I want to add custom buttons to the

Re: [web2py] Re: why you should upgrade to web2py 2.13.4

2016-01-11 Thread Richard Vézina
I don't understand why tracebask get generated as owned by root instead of www-data in ubuntu... Richard On Sat, Jan 9, 2016 at 7:44 PM, Richard Vézina wrote: > There were an issue with w2p_flash in admin app for which I submit a PR... > > On Thu, Jan 7, 2016 at 2:18 PM, wrote: > >> El sábado,

Re: [web2py] Re: server function not triggered in some cases

2016-01-11 Thread Vid Ogris
I went trough my code again This is the way i start my eternal process try: count = 0 while ( count < 10 and ( os.path.isfile(outPath))): count += 1 os.remove(outPath) time.sleep(0.05) # Run woshi engine path_1 = os.path.join

[web2py] web2py httpserver log file location

2016-01-11 Thread Yebach
Hello I have a strange behavior of my log file, or better to say the location of my log file. If I understand correctly httpserver.log file is usually located in application folder. When I have to run the engine the following code is executed path = applications/applicationName/engine

Re: [web2py] Re: server function not triggered in some cases

2016-01-11 Thread Niphlod
I'm sorry but you need to rephrase your issue then. On Monday, January 11, 2016 at 12:46:05 PM UTC+1, Yebach wrote: > > External process never drops dead. The request comes to server but > sometimes, the function that reads the file, an external process created is > not started. There are no is

[web2py] Re: web2py session disable

2016-01-11 Thread Anthony
Are you saying you have routes_in defined twice in your routes.py? If so, note the second overwrites the first. Also, exactly what error are you getting? Anthony On Friday, January 8, 2016 at 6:00:17 AM UTC-5, T.R.Rajkumar wrote: > > I have in my routes.py in web2py folder the following. > rout

Re: [web2py] ipython notebook and web2py

2016-01-11 Thread Anthony
On Monday, January 11, 2016 at 3:04:38 AM UTC-5, Manuele wrote: > > Il 12/05/14 22:59, Johann Spies ha scritto: > > Anthony I have been thinking of writing to you to ask about how you > > got to know the inner workings of Web2py and you have answered about > > everything in your talk at the conf

[web2py] Re: Can we use a web2py app on Android mobile?

2016-01-11 Thread Andrew Buchan
Just to butt-in on what Richard said: "But this kind of app are often not that interresting from user stand point... I mean you don't have a good mobile app user experience with them most of the time because they to simple that you can just access the real web app and it could be even better...

Re: [web2py] Re: server function not triggered in some cases

2016-01-11 Thread Vid Ogris
External process never drops dead. The request comes to server but sometimes, the function that reads the file, an external process created is not started. There are no issues with external process. 2016-01-08 17:23 GMT+01:00 Niphlod : > so what's the issue with web2py if your external process s

Re: [web2py] ipython notebook and web2py

2016-01-11 Thread Manuele Pesenti
Il 12/05/14 22:59, Johann Spies ha scritto: > Anthony I have been thinking of writing to you to ask about how you > got to know the inner workings of Web2py and you have answered about > everything in your talk at the conference - of which I saw the video > today. Hi Johann, can you paste the url t