[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread Niphlod
use the links argument links = [ ... dict(header='additional buttons', body=lambda row: BUTTON(.) if row.needs_button == 0 else '' ) ] On Thursday, June 11, 2015 at 12:45:29 AM UTC+2, LoveWeb2py wrote: I should have been more specific. I meant I

[web2py] Re: Expose public ip address with SOAP

2015-06-11 Thread Niphlod
it seems that web2py uses request.env.wsgi_url_scheme, request.env.http_host to build the url. How is your server configured ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread LoveWeb2py
Niphlod!! This is perfect! Exactly what I was looking for. Thank you! On Thursday, June 11, 2015 at 4:53:52 AM UTC-4, Niphlod wrote: use the links argument links = [ ... dict(header='additional buttons', body=lambda row: BUTTON(.) if row.needs_button == 0 else

[web2py] How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
Hi @ll! After performing a specific operation system, I need the record in auth_event. How to do? thanks in advance, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] change soap wsdl targetnamespace

2015-06-11 Thread Pengfei Yu
Hi, I want to change the target namespace to http://tempuri.org/; in the SOAP WSDL xml file. From the pysimplesoap's server.py, I see that I can specify it in SoapDispatcher class with namespace parameter. But I wonder how can I specify it in web2py controller's @service.soap decorator.

[web2py] Basic usage statistics

2015-06-11 Thread Leonel Câmara
Minor implementation details aside, has anyone came up with a better way to do this? http://www.web2pyslices.com/slice/show/1618/basic-usage-statistics-log-what-your-users-do Particularly, in terms of not hitting the database so much. I'm thinking of making my own system but I may as well ask

Re: [web2py] Basic usage statistics

2015-06-11 Thread Richard Vézina
You may consider, log in memory and write once you have an hundred records with scheduler... This could be a great improve and a better log system on that matter... So far, with more then an hundred user, it never been an issue... Richard On Thu, Jun 11, 2015 at 12:55 PM, Leonel Câmara

Re: [web2py] Basic usage statistics

2015-06-11 Thread Richard Vézina
I am not sure though that this is possible, I mean, is there a way to db.table.insert() without db.commit() even if other change are commited... Or say differently, is possible to specifically commit db operation?? You may also just remove the db.commit() and insert will be commited the next time

Re: [web2py] Basic usage statistics

2015-06-11 Thread Richard Vézina
Also Leonel, if you have an app that really requires more then that (I mean not an in house intranet app) you may consider Piwik : http://piwik.org/ Richard On Thu, Jun 11, 2015 at 1:09 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I am not sure though that this is possible, I mean,

[web2py] Re: How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
origin = '' description='' db.auth_event.insert(time_stamp=request.now, client_ip=request.client, user_id=auth.user.id, origin=origin, description=description) Em quinta-feira, 11 de junho de 2015 13:20:29 UTC-3, Fabiano Almeida escreveu: Hi @ll! After performing a specific

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread Ron Chatterjee
Don't want to go Off Topic, but if we can just have auto complete in the web2py web based IDE, then what does the sublime provides extra over what we already have? I like sublime. That's not the point. I believe the current IDE is good for what it does just need the auto complete and few minor

[web2py] Re: Basic usage statistics

2015-06-11 Thread Derek
Google has, it's called Google Analytics. There are alternatives out there. You could also use your web server log files. On Thursday, June 11, 2015 at 9:55:18 AM UTC-7, Leonel Câmara wrote: Minor implementation details aside, has anyone came up with a better way to do this?

[web2py] nginx, uwsgi, profiler

2015-06-11 Thread Martin Weissenboeck
​I have tried the option -F with a simple web2py start: python web2py.py -F profilerdir... Works fine, no problem. But now I want to do the same with nginx and emperor: where is the place to add the -F parameter? And, by the way, is there a web2py app to read and display the *.prof files? I have

[web2py] Re: How to register custom events in auth_event?

2015-06-11 Thread 黄祥
please take a look at this discussion : https://groups.google.com/forum/#!topic/web2py/sp4fpYz36HI 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

Re: [web2py] Re: Basic usage statistics

2015-06-11 Thread Richard Vézina
For LAN Piwik!! Richard On Thu, Jun 11, 2015 at 2:36 PM, Derek sp1d...@gmail.com wrote: Google has, it's called Google Analytics. There are alternatives out there. You could also use your web server log files. On Thursday, June 11, 2015 at 9:55:18 AM UTC-7, Leonel Câmara wrote: Minor

[web2py] Re: Basic usage statistics

2015-06-11 Thread Niphlod
you could use a redis queue to push events into, and then a scheduler tasks that consolidates the data in a table once in a while. On Thursday, June 11, 2015 at 6:55:18 PM UTC+2, Leonel Câmara wrote: Minor implementation details aside, has anyone came up with a better way to do this?

Re: [web2py] Re: Basic usage statistics

2015-06-11 Thread Richard Vézina
Not sure how you can know which user access what without using my usage statistics stuff... With Piwik or Google Analytic you will rely on IP address? I use Google Analytic a little long time ago... Richard On Thu, Jun 11, 2015 at 3:10 PM, Niphlod niph...@gmail.com wrote: you could use a redis

[web2py] Re: nginx, uwsgi, profiler

2015-06-11 Thread Niphlod
runsnakerun is the best tool for the job. for running with profiler and another webserver, you need to tweak wsgihandler.py pass a directory to profiler_dir On Thursday, June 11, 2015 at 8:39:45 PM UTC+2, mweissen wrote: ​I have tried the option -F with a simple web2py start: python

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Niphlod
isn't a simple def what_you_serve(): ..foo bar response.namespace = 'http://tempuri.org/' return dict(a=1) working ? On Thursday, June 11, 2015 at 6:36:31 PM UTC+2, Pengfei Yu wrote: Hi, I want to change the target namespace to http://tempuri.org/; in the SOAP WSDL

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Pengfei Yu
Yeah, you are right. Stupid question. I am not familiar with how response works. def call(): response.namespace = 'http://tempuri.org/' return service() This is enough in call() function. Thanks! On Thursday, June 11, 2015 at 3:18:13 PM UTC-4, Niphlod wrote: isn't a simple def

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Niphlod
even in the called function should be enough. On Thursday, June 11, 2015 at 9:39:32 PM UTC+2, Pengfei Yu wrote: Yeah, you are right. Stupid question. I am not familiar with how response works. def call(): response.namespace = 'http://tempuri.org/' return service() This is

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread Gergely Orosz
Hi Everyone, I just tweaked the plug-in a little bit. Please uninstall the plug-in completely and install it again to get it work Steps are the following: 1. Package Control - Remove Package - W2P 2. Restart Sublime 3. Package Control - Install Package - W2P 4. Restart Sublime

[web2py] Re: caching model data

2015-06-11 Thread Fabiano Faver
Niphlod, I have a small app the DB is getting big quickly and was asked to do a cache layer..I just started started to learn about it and i'm already lost. Could you point the direction to a newbie how to do it? Is it just some code change in web2py? I saw there is this Redis but didn't read

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread António Ramos
SO COOL!! the w2py shell what is the admin password that it sets when starts the server ? 2015-06-11 14:01 GMT+01:00 Gergely Orosz oroszgergely840...@gmail.com: Hi Everyone, I just tweaked the plug-in a little bit. Please uninstall the plug-in completely and install it again to get it

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread António Ramos
just saw it in sublime-settings 2015-06-11 14:07 GMT+01:00 António Ramos ramstei...@gmail.com: SO COOL!! the w2py shell what is the admin password that it sets when starts the server ? 2015-06-11 14:01 GMT+01:00 Gergely Orosz oroszgergely840...@gmail.com: Hi Everyone, I just

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread António Ramos
I got a database locked error opening web2py shell in sublime I think this is a sqlite problem right ? 2015-06-11 14:15 GMT+01:00 António Ramos ramstei...@gmail.com: just saw it in sublime-settings 2015-06-11 14:07 GMT+01:00 António Ramos ramstei...@gmail.com: SO COOL!! the w2py shell

Re: [web2py] Re: Basic usage statistics

2015-06-11 Thread Richard Vézina
Yes, Simone proposition is really good... Richard On Thu, Jun 11, 2015 at 4:20 PM, Leonel Câmara leonelcam...@gmail.com wrote: Exactly Richard, I would like to know which users are accessing what, because the users like to see it. The redis solution may be the best one if I want to give the

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-11 Thread António Ramos
In my opinion we should leave the IDE to an external tool like Sublime that has a lot more power over the web2py web IDE and get the people behind the web IDE to concentrate just on web2py that need a litle REVAMPING. For me the webIDE its very usefull but not compared to sublime or other like it

Re: [web2py] Re: How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
Great! Thanks a lot! Fabiano. 2015-06-11 15:56 GMT-03:00 黄祥 steve.van.chris...@gmail.com: please take a look at this discussion : https://groups.google.com/forum/#!topic/web2py/sp4fpYz36HI best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Basic usage statistics

2015-06-11 Thread Leonel Câmara
Exactly Richard, I would like to know which users are accessing what, because the users like to see it. The redis solution may be the best one if I want to give the database a break. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: change soap wsdl targetnamespace

2015-06-11 Thread Pengfei Yu
yeah, but I have several different functions in the SOAP service. if I set it in call() function, i just need to set it once. Otherwise I need to set this for each called function. On Thursday, June 11, 2015 at 3:43:17 PM UTC-4, Niphlod wrote: even in the called function should be enough.

[web2py] Re: object 'DAL' has no attribute 'Field' - After update 2.11.2

2015-06-11 Thread Tomeu Roig
It works, Thanks. El martes, 9 de junio de 2015, 18:22:48 (UTC+2), Niphlod escribió: if you'r ecoming from an older version, the structure of packages changed a bit and so the usual unzip over it doesn't work . Try to start with a unzip in a fresh folder and then copy over your applications

[web2py] sqlform.grid maxtextlengths shoots blanks

2015-06-11 Thread jackson . read
I get the same truncated display for the log message text no matter what I set maxtextlengths...This app is rock+1 on the IQ simplicity scale and yet it does not work...BTW: I removed all layouts stuff so its not some css problem. The truncated fields are what the grid wants to display. Its

[web2py] form.add_button() looks different than the Submit button displayed with SQLFORM

2015-06-11 Thread Msak
I am using SQLFORM to generate and display form from the database table. I am adding a Reset button next to default Submit button using form.add_button('Reset',URL('visitorInfoForm')) The issue is Submit button has a different style (background-color: blue and color: white) than the Reset

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-11 Thread Massimo Di Pierro
Not sure. It was just an impression. I noticed ractive.js depends on jQuery. vue.js does not. the template language is the same in both (mustache). ractive.js requires a script type=ractive/ while vue.js acts in place (which is clever). Ractive has more example which makes me think it may have

[web2py] Re: nginx, uwsgi, profiler

2015-06-11 Thread Martin Weissenboeck
Thank you very much for your fast response. 2015-06-11 21:15 GMT+02:00 Niphlod niph...@gmail.com: runsnakerun is the best tool for the job. for running with profiler and another webserver, you need to tweak wsgihandler.py pass a directory to profiler_dir On Thursday, June 11, 2015 at

[web2py] Re: nginx, uwsgi, profiler

2015-06-11 Thread Martin Weissenboeck
A second question: I have found that a read-command consumes a lot of time. All other statements are not conspicuous. ncalls tottime percall cumtime percall filename:lineno(function) 12.9392.9392.9392.939 {built-in method read} 15.0805.0805.0805.080

[web2py] using database record or database query in terms of performance

2015-06-11 Thread 黄祥
hi, just wondering which is the best approach between using database record or database query in terms of performance? case 1: models customer sale_order controllers report_customer when i click report customer, i want to have, customer order info something like (total_sale_order,

Re: [web2py] Re: Recaptcha on pythonanywhere.com https error

2015-06-11 Thread webpypy
Hi, I am trying recaptcha2 on pythonanywhere, it is working, but no image , only verify check. using options = dict(theme='dark'), will switch to the dark theme. using options = dict(type='image'), is not showing any images, only the verify check. Can i know

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-11 Thread António Ramos
Massimo why do you call Vuejs a stripped version? what does it lack compared to Ractive? Thank you António 2015-06-10 4:05 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: vue.js look like a stripped version of ractive.js. The syntax is identical for what it provides. On Tuesday, 9

[web2py] Re: caching model data

2015-06-11 Thread Niphlod
there is not much really http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Caching-selects to see how to cache (it's not that different from the usual cache in web2py). instead of db(db.table.id0).select() you use db(db.table.id0).select(cache=(cache.ram,