[web2py] Re: DAL calls fail after first stored procedure call

2016-01-20 Thread Alfonso Serra
I have exactly the same issue.

Call a procedure once and works.
Call another procedure again, returns None and from this point on, simple 
db(..).select() are broken.

Its definetly a DAL issue since using mysql connector does works well.

This is an example:
Download mysql connectors  
for python

import mysql.connector as mysql
cnn = mysql.connect(user="root", password ="root", database="metrily")
cur = cnn.cursor()

cur.callproc("grp_groups_checkin", ('2013-01-01', '2013-12-31'))
for res in cur.stored_results():
rows = res.fetchall()

cur.callproc("grp_subgroups_checkin", ('2013-01-01', '2013-12-31'))
for res in cur.stored_results():
rows2 = res.fetchall()

cur.close()
cnn.close()

Maybe advancing the cursor or creating a new DAL method for procedures 
might do the trick.




-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread Niphlod
if you followed the manual 
(http://web2py.com/books/default/chapter/29/13/deployment-recipes#IIS) for 
deploying web2py behind iis, your app is served by IIS directly on 
whichever port IIS is configured to listen on. 
If that port is set to be ssl protected (usually the *:443 binding) then 
you have the standard setup for SSL.

On Wednesday, January 20, 2016 at 1:50:22 AM UTC+1, José Eloy wrote:
>
> Thanks again for the help.
>
> I could create my own certificate, but I have a dude: The standard port 
> for SSL is 443 and my application runs using the port 8001, How I have to 
> configure the port in IIS and web2py? How I have to lauch web2py?
>
> Regards.
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Edit form style

2016-01-20 Thread desta
I made the necessary changes to the "formstyle_bootstrap3_inline_factory" 
function in sqlhtml.py but they are not applied to the form when it is 
presented to in the browser. What am I missing here?

Thank you.

On Monday, January 18, 2016 at 10:36:51 AM UTC+2, desta wrote:
>
> Denes, indeed that is what I was looking for. Thank you very much!
>
>
>
> On Sunday, January 17, 2016 at 7:03:49 PM UTC+2, DenesL wrote:
>>
>> The 3 at the end is calculated in the _inner function of the 
>> formstyle_bootstrap3_inline_factory function in sqlhtml.py (around line 909 
>> in 2.12.03).
>>
>> Denes 
>>
>> On Friday, January 15, 2016 at 4:41:33 AM UTC-5, desta wrote:
>>>
>>> I would like to make a change a the Login form.
>>> Currently I see that the login button has a slight offset which I like 
>>> to remove
>>>
>>> 
>>>   
>>> 
>>>
>>> I tried to search for *col-sm-offset-3 *to find where the form is 
>>> generated but I could only find .css files where the style is defined. I 
>>> searched in the gluon/sqlhtml.py but again I couldn't find how to edit 
>>> this. Where are those divs generated?
>>>
>>> Thanks.
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-01-20 Thread Yebach
The issues solved with a great help of Niphlod. I answered my own question 
on stackoverflow. 

please correct if it is not correct

http://stackoverflow.com/questions/34661782/web2py-function-not-triggered-on-user-request/34895532#34895532

Thank you 

On Monday, January 18, 2016 at 1:54:48 PM UTC+1, Niphlod wrote:
>
> "neverending" for this sake is "running for more than the usual timeout 
> imposed by webservers" which is 60 seconds.
>
> a task can be queued and also stopped via the scheduler APIs (queue_task 
> and stop_task) 
>
> On Monday, January 18, 2016 at 12:43:36 PM UTC+1, Yebach wrote:
>>
>> I do not think you can treat it as a never ending process. 
>>
>> There is a *.exe program that is started when user sends request, and 
>> also user stops it whenever he/she wants. I do not know how to treat this 
>> kind of process.I tried with scheduler but there was the same problem 
>>
>> I really need some help here.
>> Anyone?
>> Thank you
>>
>>
>> On Monday, January 11, 2016 at 8:47:45 PM UTC+1, Niphlod wrote:
>>>
>>> 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 nifty out-of-band processor called scheduler)
>>>
>>> PS: it was the first thing I said.
>>>
>>> On Monday, January 11, 2016 at 4:08:59 PM UTC+1, Yebach wrote:

 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(path, 'e1')
 os.chdir(path_1)

 p = subprocess.Popen(['woshi_engine.exe', scriptId], 
 shell=True, stdout = subprocess.PIPE)
 
 return dict(status = 1)

 Is it possible this has an effect on the whole situation? But like I 
 said. The problem is that while process is executing and woshi_engine.exe 
 creates an txt file I read with a cirtain function, this function is not 
 triggered, although the request comes to server.




 2016-01-11 14:17 GMT+01:00 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 issues with external process. 
>>
>>
>> 2016-01-08 17:23 GMT+01:00 Niphlod :
>>
>>> so what's the issue with web2py if your external process sometimes 
>>> drops dead ? who starts the external process ?
>>>
>>> On Friday, January 8, 2016 at 12:32:20 PM UTC+1, Yebach wrote:

 It is external process

 2016-01-08 11:04 GMT+01:00 Niphlod :

> you're missing the point. the "calculation" is running inside the 
> web2py environment or on an external process ?
>
>
> On Thursday, January 7, 2016 at 8:58:04 PM UTC+1, Yebach wrote:
>>
>> The calculation runs on the same server. When user starts a 
>> calculation a function creates a txt file and puts it in a folder in 
>> my 
>> application. The engine checks if the file is there. if file exists 
>> it 
>> starts a calculation. The way user stops calculation another 
>> function 
>> actually deletes that file and that is it. But the refresh button or 
>> view 
>> button as we call it  (the function associated with ), just checks 
>> the out 
>> file engine produces. 
>>
>> How can I go around timeout? I am not sure I understand your 
>> answer
>>
>> Thank you
>>
>> On Thursday, January 7, 2016 at 8:40:05 PM UTC+1, Niphlod wrote:
>>>
>>> what are you to run the actual calculation ? because if you're 
>>> using the webserver, you may need to pay attention to the fact that 
>>> there 
>>> is ALWAYS a timeout imposed on the request coming in to avoid 
>>> runaway 
>>> calculations. 
>>>
>>> On Thursday, January 7, 2016 at 6:47:47 PM UTC+1, Yebach wrote:

 Hello

 Using web2py (Version 
 2.8.2-stable+timestamp.2013.11.28.13.54.07), on 64-bit Windows, I 
 have the 
 following problem

 User triggers an engine that does some work and this engine 

[web2py] Re: DAL calls fail after first stored procedure call

2016-01-20 Thread Alfonso Serra
Ive solved it by creating a function as:

def callproc(name, args):
cur = db._adapter.cursor
cur.callproc(name, args)
if hasattr(cur, "stored_results"):
for r in cur.stored_results():
return r.fetchall()
else:
return cur.fetchall()

Im not sure if its working because ive mysql connectors installed but ye it 
looks like it does.

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Encoding while reading postgres data

2016-01-20 Thread Yebach
In this case I get the list of string 

users = [u'Ga\u0161peri\u010d', u'GovednikK', u'Jam\u0161ek', 
u'Jurejev\u010di\u010d', u'Kati\u0107', u'Kostelec', u'Ko\u0161ele', 
u'Male\u0161i\u010d', u'Muhi\u010d', u'Re\u017eek', u'Sitar', 
u'Toma\u017ei\u010d', u'Viktorovski', u'Vuk\u0161ini\u010dD', 
u'\u010cerni\u010d', u'\u017defran'];
And there is a JS error Uncaught SyntaxError: Unexpected string




On Monday, January 4, 2016 at 6:37:13 PM UTC+1, Richard wrote:
>
> From js directly? I not really good with js but I guess there is encoding 
> too... From web2py you can't since everything use byte (str('byte string')) 
> and not unicode (u'your properly encoded string')... So if you pass data 
> from web2py what I showed you is the way of doing it...
>
> Richard
>
> On Mon, Jan 4, 2016 at 11:59 AM, Yebach > 
> wrote:
>
>> Ok, but I would like to already see the right endocing when I get data 
>> from server database?
>>
>> On Monday, January 4, 2016 at 5:39:32 PM UTC+1, Richard wrote:
>>>
>>> When passing data from python to javascript I guess you will need to use 
>>> unicode or decode 
>>>
>>> try 
>>>
>>> javascritp_string_var = s.decode('utf8')
>>>
>>> Or
>>>
>>> javascritp_string_var = unicode(s, 'utf8')
>>>
>>> Richard
>>>
>>>
>>> On Mon, Jan 4, 2016 at 11:34 AM, Yebach  wrote:
>>>
 Hello

 I have the following scenario. 

 Database is PostgreSQL, encoding set to UTF-8

 When I read data from database with web2py I get a string reading in 
 type of *Bolni\xc4\x8dar* where it was suppose to be *Bolničar*. 

 Now, when i use web2py to present data in my view is all fine (so I can 
 see *Bolničar*), but when i use Java Script or anything else to 
 present data I get weird behavior, where ščžć is not presented.
 I would like that  my reading from db would be Bolničar from beginning 
 so I have no more hassle later.

 also the data in my database is *Bolničar*.

 I do all the db inserts with web2py and they are all ok. Looks like 
 only reading is kind of "wrong"

 Any suggestions?
 Thank you

 -- 
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web3py

2016-01-20 Thread Paolo Amboni
All option are good, the important is to have python 3 compatibility!!

Il giorno giovedì 14 gennaio 2016 06:35:36 UTC+1, Massimo Di Pierro ha 
scritto:
>
> It is another experiment.
>
> It is a rewrite of some of the web2py modules and supports 90% of the 
> current web2py syntax at 2.5x the speed. It works. It it cleaner and should 
> be easier to port to python 3 than current web2py. 
>
> We are debating on web2py developers what to do:
> 1) backport some of the new modules to web2py (specifically the new Form 
> class instead of SQLFORM)
> 2) try to reach a 99.9% compatibility and release it as new major version 
> with guidelines for porting legacy apps
> 3) make some drastic changes in backward compatibility and release as a 
> different framework (but change what? we like web2py as it is)
>
> For now I am working on 2 to see how far I can push the backward 
> compatibility. But there are some functionalities I want remove or move in 
> an optional module (from legacy_web2py import *).
>
> Feel free to share your opinion on web2py developers.
>
> Massimo
>
>
> On Wed, Jan 13, 2016 at 11:04 PM, kelson _  > wrote:
>
>> I was looking at your recent web3py commits and hoped you could provide 
>> the web3py vision/intent (or point me towards it if I missed the 
>> discussion).
>>
>> Thanks,
>> kelson
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Why my snippet for new button from the controller not working?

2016-01-20 Thread aston . ribat

cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
URL('default','index'))

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Web2py Integration with Sentry

2016-01-20 Thread Stefan van den Eertwegh
James, Massimo, is there any news over a possible patch for sentry with 
web2py i.e. WSGI middleware?


Op donderdag 16 januari 2014 19:00:13 UTC+1 schreef James Q:
>
> Great. I won't be able to get to this soon, but I assume the standard 
> process: git clone, make change and make a pull request?
>
> -- james
> On Jan 15, 2014 12:17 PM, "Massimo Di Pierro"  > wrote:
>
>> Always. :-)
>>
>> Rules are simple. I always take a patch if:
>> 1) fixes a security issue OR
>> 2) does not break backward compatibility AND
>> 3) makes web2py faster OR
>> 4) add a new functionality without making previous behavior slower
>>
>> On Wednesday, 15 January 2014 00:41:54 UTC-6, James Q wrote:
>>>
>>> Massimo: Would you consider taking a patch / pull request for a new 
>>> script?
>>>
>>> -- James
>>>
>>> On Thursday, January 9, 2014 9:16:02 AM UTC-5, Massimo Di Pierro wrote:

 The problem is that it would not work. you can have exceptions at two 
 levels: web2py apps, web2py itself. In other frameworks these two levels 
 are mixed up so sentry will catch either exceptions. In web2py the two 
 levels are well separated and web2py catches app exceptions before they 
 propagate up and sentry would not catch them. sentry would only catch 
 exceptions in web2py itself and that is pretty much useless. 

 You can think about it in another way, web2py already has a mechanism 
 to catch exceptions and log them. and you cannot do:

 try:
 try:
   do something
exceptiion: 
   web2py ticket system
 except:
sentry logging system

 and expect the second except to catch anything. Look instead into 
 scritps/tickets2db.py and scripts/tickets2email.py and modify them to do 
 what you need to do.


 On Wednesday, 8 January 2014 23:27:46 UTC-6, James Q wrote:
>
> Interesting. I have never written wsgi middleware, any pointers on 
> that? As middleware, I would still need to have an understanding of how 
> to 
> detect if an exception has been logged in the request, no?
>
> Thanks!
>
> -- J
>
> On Tuesday, January 7, 2014 8:24:14 PM UTC-5, Derek wrote:
>>
>> I haven't, but I've done something similar with a different piece of 
>> software. You'd usually just use it as a wsgi middleware around your 
>> app. 
>> So you'd need to run web2py as wsgi and wrap it with Sentry.
>>
>> On Monday, January 6, 2014 8:14:46 PM UTC-7, James Q wrote:
>>>
>>> Has anyone ever integrated web2py an Sentry (
>>> https://github.com/getsentry/sentry)? I would like it if all web2py 
>>> generated exceptions generate a ticket like usual, but also generates 
>>> an 
>>> event to a sentry server. Has anyone ever done this? If not, could 
>>> anyone 
>>> point to where I would need to patch web2py or how best this 
>>> integration 
>>> would work?
>>>
>>> Thanks for any help!
>>>
>> -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/cYXGl7rlvKQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] nginx/uwsgi problem on Debian

2016-01-20 Thread Johann Spies
The combination uwsgi/nginx has been recommended often on this list.

After an upgrade from wheezy to jessy the nginx, uswgi-combination does not
play nicely together.  We have also tried to move the socket to tmp, but
that did not change anything in as far as the refused connection is
concerned.

Any idea why this problem is there? And how to solve it?

The socket:
ls -la /var/uwsgi/app/web2py/socket
srwxrwxrwx 1 www-data www-data 0 Jan 20 14:40 /var/uwsgi/app/web2py/socket

The logs:

$ tail -n 1 /var/log/nginx/error.log
2016/01/20 14:33:27 [error] 4103#0: *8 connect() to
unix:///var/uwsgi/app/web2py/socket failed (111: Connection refused) while
connecting to upstream, client: 146.232.117.197, server: crest2, request:
"GET / HTTP/1.1", upstream: "uwsgi://unix:///var/uwsgi/app/web2py/socket:",
host: "crest2.sun.ac.za"


$ tail emperor.log -n 5
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/uwsgi/app/web2py/socket fd 3
bind(): Permission denied [core/socket.c line 227]
Wed Jan 20 14:40:45 2016 - [emperor] curse the uwsgi instance web2py.xml
(pid: 4957)
Wed Jan 20 14:40:45 2016 - [emperor] removed uwsgi instance web2py.xml

The configurations:

server {
listen  80;
server_name $hostname;
uwsgi_read_timeout 2400;
location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
alias /home/www-data/web2py/applications/$1/static/$2;
expires max;
}
 location / {
uwsgi_pass  unix:///var/uwsgi/app/web2py/socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;

}
}


server {
listen 443 default_server ssl;
server_name $hostname;
ssl_certificate /etc/nginx/ssl/web2py.crt;
ssl_certificate_key /etc/nginx/ssl/web2py.key;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers
ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA;
ssl_protocols TLSv1.2;
keepalive_timeout70;
location ~* /(\w+)/static(?:/_[\d]+.[\d]+.[\d]+)?/(.*)$ {
alias /home/www-data/web2py/applications/$1/static/$2;
expires max;
}
location / {
uwsgi_pass
unix:///var/uwsgi/app/web2py/socket;

uwsgi_buffer_size   128k;
uwsgi_buffers   8 256k;
uwsgi_busy_buffers_size   256k;
include
uwsgi_params;

uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;

}
}

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why my snippet for new button from the controller not working?

2016-01-20 Thread Niphlod
_onclick should be at the very least a piece of javascript. You're just 
passing an URL.

On Wednesday, January 20, 2016 at 1:50:11 PM UTC+1, aston...@gmail.com 
wrote:
>
>
> cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
> URL('default','index'))
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-01-20 Thread Niphlod
perfect. Glad that everything is working fine.

On Wednesday, January 20, 2016 at 10:02:04 AM UTC+1, Yebach wrote:
>
> The issues solved with a great help of Niphlod. I answered my own question 
> on stackoverflow. 
>
> please correct if it is not correct
>
>
> http://stackoverflow.com/questions/34661782/web2py-function-not-triggered-on-user-request/34895532#34895532
>
> Thank you 
>
> On Monday, January 18, 2016 at 1:54:48 PM UTC+1, Niphlod wrote:
>>
>> "neverending" for this sake is "running for more than the usual timeout 
>> imposed by webservers" which is 60 seconds.
>>
>> a task can be queued and also stopped via the scheduler APIs (queue_task 
>> and stop_task) 
>>
>> On Monday, January 18, 2016 at 12:43:36 PM UTC+1, Yebach wrote:
>>>
>>> I do not think you can treat it as a never ending process. 
>>>
>>> There is a *.exe program that is started when user sends request, and 
>>> also user stops it whenever he/she wants. I do not know how to treat this 
>>> kind of process.I tried with scheduler but there was the same problem 
>>>
>>> I really need some help here.
>>> Anyone?
>>> Thank you
>>>
>>>
>>> On Monday, January 11, 2016 at 8:47:45 PM UTC+1, Niphlod wrote:

 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 nifty out-of-band processor called scheduler)

 PS: it was the first thing I said.

 On Monday, January 11, 2016 at 4:08:59 PM UTC+1, Yebach wrote:
>
> 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(path, 'e1')
> os.chdir(path_1)
>
> p = subprocess.Popen(['woshi_engine.exe', scriptId], 
> shell=True, stdout = subprocess.PIPE)
> 
> return dict(status = 1)
>
> Is it possible this has an effect on the whole situation? But like I 
> said. The problem is that while process is executing and woshi_engine.exe 
> creates an txt file I read with a cirtain function, this function is not 
> triggered, although the request comes to server.
>
>
>
>
> 2016-01-11 14:17 GMT+01:00 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 issues with external process. 
>>>
>>>
>>> 2016-01-08 17:23 GMT+01:00 Niphlod :
>>>
 so what's the issue with web2py if your external process sometimes 
 drops dead ? who starts the external process ?

 On Friday, January 8, 2016 at 12:32:20 PM UTC+1, Yebach wrote:
>
> It is external process
>
> 2016-01-08 11:04 GMT+01:00 Niphlod :
>
>> you're missing the point. the "calculation" is running inside the 
>> web2py environment or on an external process ?
>>
>>
>> On Thursday, January 7, 2016 at 8:58:04 PM UTC+1, Yebach wrote:
>>>
>>> The calculation runs on the same server. When user starts a 
>>> calculation a function creates a txt file and puts it in a folder 
>>> in my 
>>> application. The engine checks if the file is there. if file exists 
>>> it 
>>> starts a calculation. The way user stops calculation another 
>>> function 
>>> actually deletes that file and that is it. But the refresh button 
>>> or view 
>>> button as we call it  (the function associated with ), just checks 
>>> the out 
>>> file engine produces. 
>>>
>>> How can I go around timeout? I am not sure I understand your 
>>> answer
>>>
>>> Thank you
>>>
>>> On Thursday, January 7, 2016 at 8:40:05 PM UTC+1, Niphlod wrote:

 what are you to run the actual calculation ? because if you're 
 using the webserver, you may need to pay attention to the fact 
 that there 
 is ALWAYS a timeout imposed on the request coming in to avoid 
 runaway 
 calculations. 

 On Thursday, January 7, 2016 at 6:47:47 PM UTC+1, Yebach wrote:
>
> Hello

[web2py] Re: How do I make my web2py app able to use the device hardwares like camera?

2016-01-20 Thread Paolo Amboni
For camera try opencv, it has a nice python library

Il giorno domenica 17 gennaio 2016 18:05:50 UTC+1, henryj...@gmail.com ha 
scritto:
>
> also how to make it able to use some other apps on the device?
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Why are the fields not hiding when using ajax for the forms? Look below.

2016-01-20 Thread aston . ribat
this is what my controller reads:
def index():
return locals()

def add_bottle():
form=SQLFORM(db.bottle, 3 , deletable=True, fields = 
['request_expiryDate']).process()
return locals()


this is what my default/index.html reads:

{{extend 'layout.html'}}
{{=LOAD('default', 'add_bottle.load', ajax=True)}}

this is what my default/add_bottle.load reads:


jQuery(document).ready(function(){
jQuery('#bottle_user_id__row').hide();
});


{{=form}}


what's wrong here as the user_id isn't hiding at all

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why my snippet for new button from the controller not working?

2016-01-20 Thread aston . ribat
Well thanks for pointing out that Niphlod. So how should I correct it?

On Wednesday, January 20, 2016 at 6:57:57 PM UTC+5:30, Niphlod wrote:
>
> _onclick should be at the very least a piece of javascript. You're just 
> passing an URL.
>
> On Wednesday, January 20, 2016 at 1:50:11 PM UTC+1, aston...@gmail.com 
> wrote:
>>
>>
>> cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
>> URL('default','index'))
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] pygal and SQL.form

2016-01-20 Thread kecajkecaj123
Hi Guys, 

I try to use pygal to draw some charts and it works fine. I used example 
from:

http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal

However i don't know how to display SQL.form and pygal chart in one view.

My code 


def form_and_chart():
 chart = plot_pygal()
 form = SQLFORM.factory( Field('time') )
 return dict(form=form),chart


def plot_pygal():
 response.headers['Content-Type']='image/svg+xml'
 bar_chart = pygal.Bar(style=CleanStyle) # Then create a bar graph object
 bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) # Add 
some values 
 return bar_chart.render()


view: form_and_chart.html

{{extend 'layout.html'}}
{{=form}}
http://localhost/myapp/default/plot_pygal.svg"; type=
"image/svg+xml" />


When i do return(form=form), form is displayed correctly, when i do return 
chart, chart is displayed correctly. How to combine those two to be 
displayed on one page?

Thanks!

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: nginx/uwsgi problem on Debian

2016-01-20 Thread Niphlod
apart from being a clear "not-even-close-to-web2py" error, until you can 
get rid of 

uwsgi socket 0 bound to UNIX address /var/uwsgi/app/web2py/socket fd 3
bind(): Permission denied [core/socket.c line 227]

you'll never going to solve the problem. 

Make sure you create a valid dir with the valid permission for the user 
running uwsgi to be available. Tail the emperor.log to see if it stays up.

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web2py Integration with Sentry

2016-01-20 Thread James Q
Sorry, I ended up not using web2py so I never got to this :(

On Monday, January 6, 2014 at 10:14:46 PM UTC-5, James Q wrote:
>
> Has anyone ever integrated web2py an Sentry (
> https://github.com/getsentry/sentry)? I would like it if all web2py 
> generated exceptions generate a ticket like usual, but also generates an 
> event to a sentry server. Has anyone ever done this? If not, could anyone 
> point to where I would need to patch web2py or how best this integration 
> would work?
>
> Thanks for any help!
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why my snippet for new button from the controller not working?

2016-01-20 Thread Niphlod
uhm. maybe

window.location='%s' % URL('default', 'index')

?

On Wednesday, January 20, 2016 at 2:37:26 PM UTC+1, aston...@gmail.com 
wrote:
>
> Well thanks for pointing out that Niphlod. So how should I correct it?
>
> On Wednesday, January 20, 2016 at 6:57:57 PM UTC+5:30, Niphlod wrote:
>>
>> _onclick should be at the very least a piece of javascript. You're just 
>> passing an URL.
>>
>> On Wednesday, January 20, 2016 at 1:50:11 PM UTC+1, aston...@gmail.com 
>> wrote:
>>>
>>>
>>> cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
>>> URL('default','index'))
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why my snippet for new button from the controller not working?

2016-01-20 Thread aston . ribat
it takes me to default/index.load which is wrong. I should be going to 
default/index.
:(

On Wednesday, January 20, 2016 at 7:31:47 PM UTC+5:30, Niphlod wrote:
>
> uhm. maybe
>
> window.location='%s' % URL('default', 'index')
>
> ?
>
> On Wednesday, January 20, 2016 at 2:37:26 PM UTC+1, aston...@gmail.com 
> wrote:
>>
>> Well thanks for pointing out that Niphlod. So how should I correct it?
>>
>> On Wednesday, January 20, 2016 at 6:57:57 PM UTC+5:30, Niphlod wrote:
>>>
>>> _onclick should be at the very least a piece of javascript. You're just 
>>> passing an URL.
>>>
>>> On Wednesday, January 20, 2016 at 1:50:11 PM UTC+1, aston...@gmail.com 
>>> wrote:


 cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
 URL('default','index'))

>>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: nginx/uwsgi problem on Debian

2016-01-20 Thread Richard Vézina
As Simone says, it seems clear that it come from permission...

Which user is regular "web" user under debian, www-data?

Even if it not the main issue, I would rather start debuging and make work
the 80 port before trying 443...

First link if I google the bind() error :
http://stackoverflow.com/questions/23886018/cant-run-uwsgi-as-root-bind-permission-denied

Good luck.

Richard

On Wed, Jan 20, 2016 at 8:57 AM, Niphlod  wrote:

> apart from being a clear "not-even-close-to-web2py" error, until you can
> get rid of
>
> uwsgi socket 0 bound to UNIX address /var/uwsgi/app/web2py/socket fd 3
> bind(): Permission denied [core/socket.c line 227]
>
> you'll never going to solve the problem.
>
> Make sure you create a valid dir with the valid permission for the user
> running uwsgi to be available. Tail the emperor.log to see if it stays up.
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Encoding while reading postgres data

2016-01-20 Thread Yebach
Solved the problem

I posted on stackoverflow.com

http://stackoverflow.com/questions/34596573/javascript-string-encoding-on-client

vote up or correct if it is not ok


On Wednesday, January 20, 2016 at 3:41:13 PM UTC+1, Richard wrote:
>
> You need XML() web2py helper when you pass python string or generate js 
> code from python you need it... 
>
> In the view :
>
> {{=XML(python_var_containing_text_or_js_code}}
>
> Richard
>
> On Wed, Jan 20, 2016 at 4:52 AM, Yebach > 
> wrote:
>
>> In this case I get the list of string 
>>
>> users = [u'Ga\u0161peri\u010d', u'GovednikK', u'Jam\u0161ek', 
>> u'Jurejev\u010di\u010d', u'Kati\u0107', u'Kostelec', u'Ko\u0161ele', 
>> u'Male\u0161i\u010d', u'Muhi\u010d', u'Re\u017eek', u'Sitar', 
>> u'Toma\u017ei\u010d', u'Viktorovski', u'Vuk\u0161ini\u010dD', 
>> u'\u010cerni\u010d', u'\u017defran'];
>> And there is a JS error Uncaught SyntaxError: Unexpected string
>>
>>
>>
>>
>> On Monday, January 4, 2016 at 6:37:13 PM UTC+1, Richard wrote:
>>>
>>> From js directly? I not really good with js but I guess there is 
>>> encoding too... From web2py you can't since everything use byte (str('byte 
>>> string')) and not unicode (u'your properly encoded string')... So if you 
>>> pass data from web2py what I showed you is the way of doing it...
>>>
>>> Richard
>>>
>>> On Mon, Jan 4, 2016 at 11:59 AM, Yebach  wrote:
>>>
 Ok, but I would like to already see the right endocing when I get data 
 from server database?

 On Monday, January 4, 2016 at 5:39:32 PM UTC+1, Richard wrote:
>
> When passing data from python to javascript I guess you will need to 
> use unicode or decode 
>
> try 
>
> javascritp_string_var = s.decode('utf8')
>
> Or
>
> javascritp_string_var = unicode(s, 'utf8')
>
> Richard
>
>
> On Mon, Jan 4, 2016 at 11:34 AM, Yebach  wrote:
>
>> Hello
>>
>> I have the following scenario. 
>>
>> Database is PostgreSQL, encoding set to UTF-8
>>
>> When I read data from database with web2py I get a string reading in 
>> type of *Bolni\xc4\x8dar* where it was suppose to be *Bolničar*. 
>>
>> Now, when i use web2py to present data in my view is all fine (so I 
>> can see *Bolničar*), but when i use Java Script or anything else to 
>> present data I get weird behavior, where ščžć is not presented.
>> I would like that  my reading from db would be Bolničar from 
>> beginning so I have no more hassle later.
>>
>> also the data in my database is *Bolničar*.
>>
>> I do all the db inserts with web2py and they are all ok. Looks like 
>> only reading is kind of "wrong"
>>
>> Any suggestions?
>> Thank you
>>
>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to web2py+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Encoding while reading postgres data

2016-01-20 Thread Richard Vézina
You need XML() web2py helper when you pass python string or generate js
code from python you need it...

In the view :

{{=XML(python_var_containing_text_or_js_code}}

Richard

On Wed, Jan 20, 2016 at 4:52 AM, Yebach  wrote:

> In this case I get the list of string
>
> users = [u'Ga\u0161peri\u010d', u'GovednikK', u'Jam\u0161ek',
> u'Jurejev\u010di\u010d', u'Kati\u0107', u'Kostelec', u'Ko\u0161ele',
> u'Male\u0161i\u010d', u'Muhi\u010d', u'Re\u017eek', u'Sitar',
> u'Toma\u017ei\u010d', u'Viktorovski', u'Vuk\u0161ini\u010dD',
> u'\u010cerni\u010d', u'\u017defran'];
> And there is a JS error Uncaught SyntaxError: Unexpected string
>
>
>
>
> On Monday, January 4, 2016 at 6:37:13 PM UTC+1, Richard wrote:
>>
>> From js directly? I not really good with js but I guess there is encoding
>> too... From web2py you can't since everything use byte (str('byte string'))
>> and not unicode (u'your properly encoded string')... So if you pass data
>> from web2py what I showed you is the way of doing it...
>>
>> Richard
>>
>> On Mon, Jan 4, 2016 at 11:59 AM, Yebach  wrote:
>>
>>> Ok, but I would like to already see the right endocing when I get data
>>> from server database?
>>>
>>> On Monday, January 4, 2016 at 5:39:32 PM UTC+1, Richard wrote:

 When passing data from python to javascript I guess you will need to
 use unicode or decode

 try

 javascritp_string_var = s.decode('utf8')

 Or

 javascritp_string_var = unicode(s, 'utf8')

 Richard


 On Mon, Jan 4, 2016 at 11:34 AM, Yebach  wrote:

> Hello
>
> I have the following scenario.
>
> Database is PostgreSQL, encoding set to UTF-8
>
> When I read data from database with web2py I get a string reading in
> type of *Bolni\xc4\x8dar* where it was suppose to be *Bolničar*.
>
> Now, when i use web2py to present data in my view is all fine (so I
> can see *Bolničar*), but when i use Java Script or anything else to
> present data I get weird behavior, where ščžć is not presented.
> I would like that  my reading from db would be Bolničar from beginning
> so I have no more hassle later.
>
> also the data in my database is *Bolničar*.
>
> I do all the db inserts with web2py and they are all ok. Looks like
> only reading is kind of "wrong"
>
> Any suggestions?
> Thank you
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 --
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why my snippet for new button from the controller not working?

2016-01-20 Thread Niphlod
URL('default', 'index', extension=None)

On Wednesday, January 20, 2016 at 3:15:17 PM UTC+1, aston...@gmail.com 
wrote:
>
> it takes me to default/index.load which is wrong. I should be going to 
> default/index.
> :(
>
> On Wednesday, January 20, 2016 at 7:31:47 PM UTC+5:30, Niphlod wrote:
>>
>> uhm. maybe
>>
>> window.location='%s' % URL('default', 'index')
>>
>> ?
>>
>> On Wednesday, January 20, 2016 at 2:37:26 PM UTC+1, aston...@gmail.com 
>> wrote:
>>>
>>> Well thanks for pointing out that Niphlod. So how should I correct it?
>>>
>>> On Wednesday, January 20, 2016 at 6:57:57 PM UTC+5:30, Niphlod wrote:

 _onclick should be at the very least a piece of javascript. You're just 
 passing an URL.

 On Wednesday, January 20, 2016 at 1:50:11 PM UTC+1, aston...@gmail.com 
 wrote:
>
>
> cancel=INPUT(_type='button' , _value='Cancel' , _onclick= 
> URL('default','index'))
>


-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] charts on web2py

2016-01-20 Thread Diego Tostes
Hi,

anyone can indicate a good solution to create charts using web2py?

rgds

diego

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread José Eloy
Then, How I should run web2py? 

python web2py.py -a 'yourpassword' -i IP

without port?


Regards

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Virtual field in SQLFORM.grid

2016-01-20 Thread Marcello

In other words... Is there a way to show a total of the child table in each 
row of the master table (grid) ??


Thanks


On Tuesday, January 19, 2016 at 5:52:51 PM UTC-2, Marcello wrote:
>
> Yes. I can see the tables...
> And yes... I can call the function.. It's working OK...
>
> Thanks...
>
> On Tue, Jan 19, 2016 at 4:39 PM, Fabiano Almeida wrote:
>
>> Hi Marcello,
>>
>> Can you see your tables in appadmin?
>>
>> And your lambda, you can create and call function to count in konsulta's 
>> table and return the number.
>>
>> Field.Virtual('total', lambda row: kontagem(row.id))
>>
>>
>> Att.,
>>
>> Fabiano.
>>
>> 2016-01-19 15:09 GMT-02:00 Marcello :
>>
>>> Hello,
>>>
>>> I have a one to many configuration, using mysql database.
>>> I want to show a grid with the "one" table, and for each row, count the 
>>> "many".
>>>
>>> For that I created a total virtual field.
>>> It works OK in the shel, for example
>>>
>>> But when I call the SQLFORM.grid I get an error
>>>
>>> Why do this happen ???
>>> Is there a way to get this ??
>>>
>>>
>>> Thanks
>>> Marcello
>>>
>>> db.define_table(
>>> 'trabalho',
>>> Field('descricao','string'),
>>> Field.Virtual('total', lambda row: row.trabalho.konsulta.count()),
>>> )
>>>
>>> db.define_table(
>>> 'konsulta',
>>> Field('trabalho_id', 'reference trabalho'),
>>> Field('name','string'),
>>> )
>>>
>>>
>>> I want to show a grid with:
>>> grid = SQLFORM.grid(db.trabalho, editable=True, create=False, 
>>> deletable=False)
>>>
>>> When I call it, I get:
>>> 
>>>
>>>
>>>
>>> -- 
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread Richard Vézina
Don't use self-signed certificate, walk the extra mile of creating your own
Certificate Authority, which will be self signed, then sign you
certificate... That way you will get rid of all browser warning... You can
then push by GPO a pk12 file so your user don't even have to handle the
certificate by them self... You will only have Firefox that use it own
certificate store that will complain until you add manually the certificate
:( which can be scripted...

Richard

On Wed, Jan 20, 2016 at 12:45 PM, José Eloy  wrote:

> Then, How I should run web2py?
>
> python web2py.py -a 'yourpassword' -i IP
>
> without port?
>
>
> Regards
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Richard Vézina
Do you know that plotly was open sourced : https://plot.ly/

I it one of your best choice if you want something dynamic... There is
D3.js, but I remember having read that most of it is included in the plotly
stack...

Richard

On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes 
wrote:

> Hi,
>
> anyone can indicate a good solution to create charts using web2py?
>
> rgds
>
> diego
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Javier Pepe
Hi

For simple charts you can use google chart, exist plugin for integrate this

http://www.web2pyslices.com/slice/show/1721/google-charts-plugin



On Wed, Jan 20, 2016 at 3:09 PM, Richard Vézina  wrote:

> Do you know that plotly was open sourced : https://plot.ly/
>
> I it one of your best choice if you want something dynamic... There is
> D3.js, but I remember having read that most of it is included in the plotly
> stack...
>
> Richard
>
> On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes 
> wrote:
>
>> Hi,
>>
>> anyone can indicate a good solution to create charts using web2py?
>>
>> rgds
>>
>> diego
>>
>> --
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Richard Vézina
Also matplotlib, of course...

Richard

On Wed, Jan 20, 2016 at 2:02 PM, Javier Pepe  wrote:

> Hi
>
> For simple charts you can use google chart, exist plugin for integrate this
>
> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin
>
>
>
> On Wed, Jan 20, 2016 at 3:09 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Do you know that plotly was open sourced : https://plot.ly/
>>
>> I it one of your best choice if you want something dynamic... There is
>> D3.js, but I remember having read that most of it is included in the plotly
>> stack...
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes 
>> wrote:
>>
>>> Hi,
>>>
>>> anyone can indicate a good solution to create charts using web2py?
>>>
>>> rgds
>>>
>>> diego
>>>
>>> --
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread Niphlod
if you followed that guide, python will be started automatically by IIS. 
That's part of the beauty of it.

On Wednesday, January 20, 2016 at 6:45:55 PM UTC+1, José Eloy wrote:
>
> Then, How I should run web2py? 
>
> python web2py.py -a 'yourpassword' -i IP
>
> without port?
>
>
> Regards
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Get return value from controller function via ajax

2016-01-20 Thread Ian W. Scott
I'm trying to use ajax calls to update the data for a chart dynamically. I 
don't want to make the chart a component that refreshes, I just want to get 
the controller return value back to the javascript in the view, so that I 
can update the chart via javascript. But web2py's ajax function seems to 
only (a) update a part of the page html, or (b) send page data to the 
controller for use in the back-end. There doesn't seem to be any way to get 
the controller's return value as a data object for the javascript to use.

I've tried just using jquery's get() method like this:

$.get(my_controller_url, function(data){
console.log('got ajax data', data);
});

But if the controller's return value is a tuple there seems to be no data 
sent back, or at least I don't know how to access it from the 'data' 
variable in this example. If I make the controller a dictionary I get html 
back. But I don't want html. I just want the data.

So how can I do this?

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Niphlod
from gluon.serializers import json

def uh():
return json(blablabla)

On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>
> I'm trying to use ajax calls to update the data for a chart dynamically. I 
> don't want to make the chart a component that refreshes, I just want to get 
> the controller return value back to the javascript in the view, so that I 
> can update the chart via javascript. But web2py's ajax function seems to 
> only (a) update a part of the page html, or (b) send page data to the 
> controller for use in the back-end. There doesn't seem to be any way to get 
> the controller's return value as a data object for the javascript to use.
>
> I've tried just using jquery's get() method like this:
>
> $.get(my_controller_url, function(data){
> console.log('got ajax data', data);
> });
>
> But if the controller's return value is a tuple there seems to be no data 
> sent back, or at least I don't know how to access it from the 'data' 
> variable in this example. If I make the controller a dictionary I get html 
> back. But I don't want html. I just want the data.
>
> So how can I do this?
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Dynamic Search

2016-01-20 Thread Anthony Smith
Hi All,

I am guessing this cant be done or I have asked a stupid question

Cheers 

Anthony

On Monday, 18 January 2016 07:16:11 UTC+11, Anthony Smith wrote:
>
> Hi All,
>
> I am using the dynamic search (
> http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it 
> possible to have the results to be a post, if so do I go about it.
>
> cheers 
>
> Anthony
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Ron Chatterjee
Richard, any workable example that you know of matplotlib?


On Wednesday, January 20, 2016 at 2:14:10 PM UTC-5, Richard wrote:
>
> Also matplotlib, of course...
>
> Richard
>
> On Wed, Jan 20, 2016 at 2:02 PM, Javier Pepe  > wrote:
>
>> Hi
>>
>> For simple charts you can use google chart, exist plugin for integrate 
>> this
>>
>> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin
>>
>>
>>
>> On Wed, Jan 20, 2016 at 3:09 PM, Richard Vézina > > wrote:
>>
>>> Do you know that plotly was open sourced : https://plot.ly/
>>>
>>> I it one of your best choice if you want something dynamic... There is 
>>> D3.js, but I remember having read that most of it is included in the plotly 
>>> stack...
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes >> > wrote:
>>>
 Hi,

 anyone can indicate a good solution to create charts using web2py?

 rgds

 diego

 -- 
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Richard Vézina
Not try but : http://www.web2pyslices.com/slice/show/1357/matplotlib-howto

It's basically just a matter of streaming the content of a file generated
by you matplotlib python script, this is not a big deal...

Richard

On Wed, Jan 20, 2016 at 3:12 PM, Ron Chatterjee 
wrote:

> Richard, any workable example that you know of matplotlib?
>
>
> On Wednesday, January 20, 2016 at 2:14:10 PM UTC-5, Richard wrote:
>>
>> Also matplotlib, of course...
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 2:02 PM, Javier Pepe  wrote:
>>
>>> Hi
>>>
>>> For simple charts you can use google chart, exist plugin for integrate
>>> this
>>>
>>> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin
>>>
>>>
>>>
>>> On Wed, Jan 20, 2016 at 3:09 PM, Richard Vézina 
>>> wrote:
>>>
 Do you know that plotly was open sourced : https://plot.ly/

 I it one of your best choice if you want something dynamic... There is
 D3.js, but I remember having read that most of it is included in the plotly
 stack...

 Richard

 On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes 
 wrote:

> Hi,
>
> anyone can indicate a good solution to create charts using web2py?
>
> rgds
>
> diego
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 --
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
Simone,

Since simplejson have be exit, and standard lib json it reputed multifold
time slower what are you suggesting as a remedy?

Richard

On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:

> from gluon.serializers import json
>
> def uh():
> return json(blablabla)
>
>
> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>
>> I'm trying to use ajax calls to update the data for a chart dynamically.
>> I don't want to make the chart a component that refreshes, I just want to
>> get the controller return value back to the javascript in the view, so that
>> I can update the chart via javascript. But web2py's ajax function seems to
>> only (a) update a part of the page html, or (b) send page data to the
>> controller for use in the back-end. There doesn't seem to be any way to get
>> the controller's return value as a data object for the javascript to use.
>>
>> I've tried just using jquery's get() method like this:
>>
>> $.get(my_controller_url, function(data){
>> console.log('got ajax data', data);
>> });
>>
>> But if the controller's return value is a tuple there seems to be no data
>> sent back, or at least I don't know how to access it from the 'data'
>> variable in this example. If I make the controller a dictionary I get html
>> back. But I don't want html. I just want the data.
>>
>> So how can I do this?
>>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2016-01-20 Thread Marcelo Huerta

>
> I'm having the same issue with a PostgreSQL 9.4 backend on Windows 7.
>

Python 2.7.10 (32 bits)
web2py: Version 2.13.4-stable+timestamp.2015.12.26.04.59.39 


2016-01-20 17:34:33,809 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (0)
2016-01-20 17:34:34,312 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (1)
2016-01-20 17:34:34,812 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (2)
2016-01-20 17:34:35,315 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (3)
2016-01-20 17:34:35,816 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (4)
2016-01-20 17:34:36,319 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (5)
2016-01-20 17:34:36,821 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (6)
2016-01-20 17:34:37,322 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (7)
2016-01-20 17:34:37,825 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (8)
2016-01-20 17:34:38,326 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
error assigning tasks (9)

>  
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2016-01-20 Thread Niphlod
all of the sudden or you just started it ?

On Wednesday, January 20, 2016 at 9:38:11 PM UTC+1, Marcelo Huerta wrote:
>
> I'm having the same issue with a PostgreSQL 9.4 backend on Windows 7.
>>
>
> Python 2.7.10 (32 bits)
> web2py: Version 2.13.4-stable+timestamp.2015.12.26.04.59.39 
>
>
> 2016-01-20 17:34:33,809 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (0)
> 2016-01-20 17:34:34,312 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (1)
> 2016-01-20 17:34:34,812 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (2)
> 2016-01-20 17:34:35,315 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (3)
> 2016-01-20 17:34:35,816 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (4)
> 2016-01-20 17:34:36,319 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (5)
> 2016-01-20 17:34:36,821 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (6)
> 2016-01-20 17:34:37,322 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (7)
> 2016-01-20 17:34:37,825 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (8)
> 2016-01-20 17:34:38,326 - web2py.scheduler.RALF#2436 - ERROR - TICKER: 
> error assigning tasks (9)
>
>>  
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Niphlod
ehm.. what again ?

On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>
> Simone,
>
> Since simplejson have be exit, and standard lib json it reputed multifold 
> time slower what are you suggesting as a remedy?
>
> Richard
>
> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod > 
> wrote:
>
>> from gluon.serializers import json
>>
>> def uh():
>> return json(blablabla)
>>
>>
>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>>
>>> I'm trying to use ajax calls to update the data for a chart dynamically. 
>>> I don't want to make the chart a component that refreshes, I just want to 
>>> get the controller return value back to the javascript in the view, so that 
>>> I can update the chart via javascript. But web2py's ajax function seems to 
>>> only (a) update a part of the page html, or (b) send page data to the 
>>> controller for use in the back-end. There doesn't seem to be any way to get 
>>> the controller's return value as a data object for the javascript to use.
>>>
>>> I've tried just using jquery's get() method like this:
>>>
>>> $.get(my_controller_url, function(data){
>>> console.log('got ajax data', data);
>>> });
>>>
>>> But if the controller's return value is a tuple there seems to be no 
>>> data sent back, or at least I don't know how to access it from the 'data' 
>>> variable in this example. If I make the controller a dictionary I get html 
>>> back. But I don't want html. I just want the data.
>>>
>>> So how can I do this?
>>>
>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2016-01-20 Thread Marcelo Huerta
Niphlod decía, en el mensaje "[web2py] Re: Scheduler Tasks show TICKER: error
assigningt task (0) and task never start" del 20/1/2016 17:42:40:
> all of the sudden or you just started it ?

No, I just incorporated the Scheduler to my application. Previously I wasn't
using it. It never worked from the moment I created the Scheduler object and I
didn't know why until I started running manually the "web2py.py -K app"
(previously I was using the "-K app -X" parameters in my service so I wasn't
seeing the errors).

I've tried removing the *.table files for all the schedule* tables and removed
them manually from the server using the backend console, and then restarted
the admin app and ran the scheduler manually again, to no avail.

-- 
   o-=< Marcelo >=-o

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
again what, off topic, ever!!

:)

Richard

On Wed, Jan 20, 2016 at 3:43 PM, Niphlod  wrote:

> ehm.. what again ?
>
> On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>>
>> Simone,
>>
>> Since simplejson have be exit, and standard lib json it reputed multifold
>> time slower what are you suggesting as a remedy?
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:
>>
>>> from gluon.serializers import json
>>>
>>> def uh():
>>> return json(blablabla)
>>>
>>>
>>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:

 I'm trying to use ajax calls to update the data for a chart
 dynamically. I don't want to make the chart a component that refreshes, I
 just want to get the controller return value back to the javascript in the
 view, so that I can update the chart via javascript. But web2py's ajax
 function seems to only (a) update a part of the page html, or (b) send page
 data to the controller for use in the back-end. There doesn't seem to be
 any way to get the controller's return value as a data object for the
 javascript to use.

 I've tried just using jquery's get() method like this:

 $.get(my_controller_url, function(data){
 console.log('got ajax data', data);
 });

 But if the controller's return value is a tuple there seems to be no
 data sent back, or at least I don't know how to access it from the 'data'
 variable in this example. If I make the controller a dictionary I get html
 back. But I don't want html. I just want the data.

 So how can I do this?

>>> --
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2016-01-20 Thread Niphlod
well, don't know what to say without seeing your app's code. The thing is, 
that kind of error is pretty "down the line" and usually is given by a 
wrong table structure or a completely locked down database. if you use 
another DAL connection (e.g., just to try, sqlite) does it raise the same 
exception ?

On Wednesday, January 20, 2016 at 9:48:05 PM UTC+1, Marcelo Huerta wrote:
>
> Niphlod decía, en el mensaje "[web2py] Re: Scheduler Tasks show TICKER: 
> error 
> assigningt task (0) and task never start" del 20/1/2016 17:42:40: 
> > all of the sudden or you just started it ? 
>
> No, I just incorporated the Scheduler to my application. Previously I 
> wasn't 
> using it. It never worked from the moment I created the Scheduler object 
> and I 
> didn't know why until I started running manually the "web2py.py -K app" 
> (previously I was using the "-K app -X" parameters in my service so I 
> wasn't 
> seeing the errors). 
>
> I've tried removing the *.table files for all the schedule* tables and 
> removed 
> them manually from the server using the backend console, and then 
> restarted 
> the admin app and ran the scheduler manually again, to no avail. 
>
> -- 
>o-=< Marcelo >=-o 
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Niphlod
I really don't know what you meant (ontopic or offtopic)

On Wednesday, January 20, 2016 at 9:49:58 PM UTC+1, Richard wrote:
>
> again what, off topic, ever!!
>
> :)
>
> Richard
>
> On Wed, Jan 20, 2016 at 3:43 PM, Niphlod > 
> wrote:
>
>> ehm.. what again ?
>>
>> On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>>>
>>> Simone,
>>>
>>> Since simplejson have be exit, and standard lib json it reputed 
>>> multifold time slower what are you suggesting as a remedy?
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:
>>>
 from gluon.serializers import json

 def uh():
 return json(blablabla)


 On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>
> I'm trying to use ajax calls to update the data for a chart 
> dynamically. I don't want to make the chart a component that refreshes, I 
> just want to get the controller return value back to the javascript in 
> the 
> view, so that I can update the chart via javascript. But web2py's ajax 
> function seems to only (a) update a part of the page html, or (b) send 
> page 
> data to the controller for use in the back-end. There doesn't seem to be 
> any way to get the controller's return value as a data object for the 
> javascript to use.
>
> I've tried just using jquery's get() method like this:
>
> $.get(my_controller_url, function(data){
> console.log('got ajax data', data);
> });
>
> But if the controller's return value is a tuple there seems to be no 
> data sent back, or at least I don't know how to access it from the 'data' 
> variable in this example. If I make the controller a dictionary I get 
> html 
> back. But I don't want html. I just want the data.
>
> So how can I do this?
>
 -- 
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
I mean, before in gluon/contrib there were simplejson, but I notice it had
been removed in 2.10.x if I remember because it was not py3 compliant... I
discover it hadly when my production app shown some strange behavior in
some search field or autocomplete field where I was using it...

I did't replace it with ujson which is really fast, but I would like to
know what you propose instead of plain json from standard library?

Richard

On Wed, Jan 20, 2016 at 3:59 PM, Niphlod  wrote:

> I really don't know what you meant (ontopic or offtopic)
>
> On Wednesday, January 20, 2016 at 9:49:58 PM UTC+1, Richard wrote:
>>
>> again what, off topic, ever!!
>>
>> :)
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 3:43 PM, Niphlod  wrote:
>>
>>> ehm.. what again ?
>>>
>>> On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:

 Simone,

 Since simplejson have be exit, and standard lib json it reputed
 multifold time slower what are you suggesting as a remedy?

 Richard

 On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:

> from gluon.serializers import json
>
> def uh():
> return json(blablabla)
>
>
> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>
>> I'm trying to use ajax calls to update the data for a chart
>> dynamically. I don't want to make the chart a component that refreshes, I
>> just want to get the controller return value back to the javascript in 
>> the
>> view, so that I can update the chart via javascript. But web2py's ajax
>> function seems to only (a) update a part of the page html, or (b) send 
>> page
>> data to the controller for use in the back-end. There doesn't seem to be
>> any way to get the controller's return value as a data object for the
>> javascript to use.
>>
>> I've tried just using jquery's get() method like this:
>>
>> $.get(my_controller_url, function(data){
>> console.log('got ajax data', data);
>> });
>>
>> But if the controller's return value is a tuple there seems to be no
>> data sent back, or at least I don't know how to access it from the 'data'
>> variable in this example. If I make the controller a dictionary I get 
>> html
>> back. But I don't want html. I just want the data.
>>
>> So how can I do this?
>>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 --
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
To my knowlege simplejson contrib was there because of standard json lib
was too slow...

Richard

On Wed, Jan 20, 2016 at 4:04 PM, Richard Vézina  wrote:

> I mean, before in gluon/contrib there were simplejson, but I notice it had
> been removed in 2.10.x if I remember because it was not py3 compliant... I
> discover it hadly when my production app shown some strange behavior in
> some search field or autocomplete field where I was using it...
>
> I did't replace it with ujson which is really fast, but I would like to
> know what you propose instead of plain json from standard library?
>
> Richard
>
> On Wed, Jan 20, 2016 at 3:59 PM, Niphlod  wrote:
>
>> I really don't know what you meant (ontopic or offtopic)
>>
>> On Wednesday, January 20, 2016 at 9:49:58 PM UTC+1, Richard wrote:
>>>
>>> again what, off topic, ever!!
>>>
>>> :)
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 3:43 PM, Niphlod  wrote:
>>>
 ehm.. what again ?

 On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>
> Simone,
>
> Since simplejson have be exit, and standard lib json it reputed
> multifold time slower what are you suggesting as a remedy?
>
> Richard
>
> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:
>
>> from gluon.serializers import json
>>
>> def uh():
>> return json(blablabla)
>>
>>
>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott
>> wrote:
>>>
>>> I'm trying to use ajax calls to update the data for a chart
>>> dynamically. I don't want to make the chart a component that refreshes, 
>>> I
>>> just want to get the controller return value back to the javascript in 
>>> the
>>> view, so that I can update the chart via javascript. But web2py's ajax
>>> function seems to only (a) update a part of the page html, or (b) send 
>>> page
>>> data to the controller for use in the back-end. There doesn't seem to be
>>> any way to get the controller's return value as a data object for the
>>> javascript to use.
>>>
>>> I've tried just using jquery's get() method like this:
>>>
>>> $.get(my_controller_url, function(data){
>>> console.log('got ajax data', data);
>>> });
>>>
>>> But if the controller's return value is a tuple there seems to be no
>>> data sent back, or at least I don't know how to access it from the 
>>> 'data'
>>> variable in this example. If I make the controller a dictionary I get 
>>> html
>>> back. But I don't want html. I just want the data.
>>>
>>> So how can I do this?
>>>
>> --
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to web2py+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Dynamic Search

2016-01-20 Thread Richard Vézina
To my knowledge crud.search() does just that with all the overhead...

Richard

On Wed, Jan 20, 2016 at 3:09 PM, Anthony Smith 
wrote:

> Hi All,
>
> I am guessing this cant be done or I have asked a stupid question
>
> Cheers
>
> Anthony
>
>
> On Monday, 18 January 2016 07:16:11 UTC+11, Anthony Smith wrote:
>>
>> Hi All,
>>
>> I am using the dynamic search (
>> http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it
>> possible to have the results to be a post, if so do I go about it.
>>
>> cheers
>>
>> Anthony
>>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Niphlod
I suggest a good pair of goggles 
. https://github.com/web2py/web2py/tree/R-2.13.4/gluon/contrib/simplejson

On Wednesday, January 20, 2016 at 10:05:17 PM UTC+1, Richard wrote:
>
> To my knowlege simplejson contrib was there because of standard json lib 
> was too slow...
>
> Richard
>
> On Wed, Jan 20, 2016 at 4:04 PM, Richard Vézina  > wrote:
>
>> I mean, before in gluon/contrib there were simplejson, but I notice it 
>> had been removed in 2.10.x if I remember because it was not py3 
>> compliant... I discover it hadly when my production app shown some strange 
>> behavior in some search field or autocomplete field where I was using it...
>>
>> I did't replace it with ujson which is really fast, but I would like to 
>> know what you propose instead of plain json from standard library?
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 3:59 PM, Niphlod > 
>> wrote:
>>
>>> I really don't know what you meant (ontopic or offtopic)
>>>
>>> On Wednesday, January 20, 2016 at 9:49:58 PM UTC+1, Richard wrote:

 again what, off topic, ever!!

 :)

 Richard

 On Wed, Jan 20, 2016 at 3:43 PM, Niphlod  wrote:

> ehm.. what again ?
>
> On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>>
>> Simone,
>>
>> Since simplejson have be exit, and standard lib json it reputed 
>> multifold time slower what are you suggesting as a remedy?
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:
>>
>>> from gluon.serializers import json
>>>
>>> def uh():
>>> return json(blablabla)
>>>
>>>
>>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott 
>>> wrote:

 I'm trying to use ajax calls to update the data for a chart 
 dynamically. I don't want to make the chart a component that 
 refreshes, I 
 just want to get the controller return value back to the javascript in 
 the 
 view, so that I can update the chart via javascript. But web2py's ajax 
 function seems to only (a) update a part of the page html, or (b) send 
 page 
 data to the controller for use in the back-end. There doesn't seem to 
 be 
 any way to get the controller's return value as a data object for the 
 javascript to use.

 I've tried just using jquery's get() method like this:

 $.get(my_controller_url, function(data){
 console.log('got ajax data', data);
 });

 But if the controller's return value is a tuple there seems to be 
 no data sent back, or at least I don't know how to access it from the 
 'data' variable in this example. If I make the controller a dictionary 
 I 
 get html back. But I don't want html. I just want the data.

 So how can I do this?

>>> -- 
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 -- 
>>> 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" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@go

[web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Ian W. Scott
Thanks. So to clarify, if I serialize the return value as json in the 
controller, then I can use it in javascript. It looks like I still have to 
parse the json on the javascript end (like $.parseJSON(mydata)) but it 
works like a charm.

Ian

On Wednesday, January 20, 2016 at 2:50:35 PM UTC-5, Niphlod wrote:
>
> from gluon.serializers import json
>
> def uh():
> return json(blablabla)
>
> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>
>> I'm trying to use ajax calls to update the data for a chart dynamically. 
>> I don't want to make the chart a component that refreshes, I just want to 
>> get the controller return value back to the javascript in the view, so that 
>> I can update the chart via javascript. But web2py's ajax function seems to 
>> only (a) update a part of the page html, or (b) send page data to the 
>> controller for use in the back-end. There doesn't seem to be any way to get 
>> the controller's return value as a data object for the javascript to use.
>>
>> I've tried just using jquery's get() method like this:
>>
>> $.get(my_controller_url, function(data){
>> console.log('got ajax data', data);
>> });
>>
>> But if the controller's return value is a tuple there seems to be no data 
>> sent back, or at least I don't know how to access it from the 'data' 
>> variable in this example. If I make the controller a dictionary I get html 
>> back. But I don't want html. I just want the data.
>>
>> So how can I do this?
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
https://groups.google.com/d/msg/web2py-developers/2U-4hnwjc60/9LvGVn_P2VYJ

You are right I am having it... I guess I shouldn't believe everything what
I read...

:)

Thanks to clarify that... I should check my code since the issue I was
having get solved by another concurrent change which may was the only thing
causing the issue... And that explain why I didn't have any import issue

Richard

On Wed, Jan 20, 2016 at 4:16 PM, Niphlod  wrote:

> I suggest a good pair of goggles .
> https://github.com/web2py/web2py/tree/R-2.13.4/gluon/contrib/simplejson
>
> On Wednesday, January 20, 2016 at 10:05:17 PM UTC+1, Richard wrote:
>>
>> To my knowlege simplejson contrib was there because of standard json lib
>> was too slow...
>>
>> Richard
>>
>> On Wed, Jan 20, 2016 at 4:04 PM, Richard Vézina 
>> wrote:
>>
>>> I mean, before in gluon/contrib there were simplejson, but I notice it
>>> had been removed in 2.10.x if I remember because it was not py3
>>> compliant... I discover it hadly when my production app shown some strange
>>> behavior in some search field or autocomplete field where I was using it...
>>>
>>> I did't replace it with ujson which is really fast, but I would like to
>>> know what you propose instead of plain json from standard library?
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 3:59 PM, Niphlod  wrote:
>>>
 I really don't know what you meant (ontopic or offtopic)

 On Wednesday, January 20, 2016 at 9:49:58 PM UTC+1, Richard wrote:
>
> again what, off topic, ever!!
>
> :)
>
> Richard
>
> On Wed, Jan 20, 2016 at 3:43 PM, Niphlod  wrote:
>
>> ehm.. what again ?
>>
>> On Wednesday, January 20, 2016 at 9:36:01 PM UTC+1, Richard wrote:
>>>
>>> Simone,
>>>
>>> Since simplejson have be exit, and standard lib json it reputed
>>> multifold time slower what are you suggesting as a remedy?
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 2:50 PM, Niphlod  wrote:
>>>
 from gluon.serializers import json

 def uh():
 return json(blablabla)


 On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott
 wrote:
>
> I'm trying to use ajax calls to update the data for a chart
> dynamically. I don't want to make the chart a component that 
> refreshes, I
> just want to get the controller return value back to the javascript 
> in the
> view, so that I can update the chart via javascript. But web2py's ajax
> function seems to only (a) update a part of the page html, or (b) 
> send page
> data to the controller for use in the back-end. There doesn't seem to 
> be
> any way to get the controller's return value as a data object for the
> javascript to use.
>
> I've tried just using jquery's get() method like this:
>
> $.get(my_controller_url, function(data){
> console.log('got ajax data', data);
> });
>
> But if the controller's return value is a tuple there seems to be
> no data sent back, or at least I don't know how to access it from the
> 'data' variable in this example. If I make the controller a 
> dictionary I
> get html back. But I don't want html. I just want the data.
>
> So how can I do this?
>
 --
 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" group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to web2py+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
 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" group.
 To unsubscribe from this group and stop receiving e

Re: [web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Richard Vézina
Yes always better to parse it...

On Wed, Jan 20, 2016 at 4:20 PM, Ian W. Scott  wrote:

> Thanks. So to clarify, if I serialize the return value as json in the
> controller, then I can use it in javascript. It looks like I still have to
> parse the json on the javascript end (like $.parseJSON(mydata)) but it
> works like a charm.
>
> Ian
>
>
> On Wednesday, January 20, 2016 at 2:50:35 PM UTC-5, Niphlod wrote:
>>
>> from gluon.serializers import json
>>
>> def uh():
>> return json(blablabla)
>>
>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>>
>>> I'm trying to use ajax calls to update the data for a chart dynamically.
>>> I don't want to make the chart a component that refreshes, I just want to
>>> get the controller return value back to the javascript in the view, so that
>>> I can update the chart via javascript. But web2py's ajax function seems to
>>> only (a) update a part of the page html, or (b) send page data to the
>>> controller for use in the back-end. There doesn't seem to be any way to get
>>> the controller's return value as a data object for the javascript to use.
>>>
>>> I've tried just using jquery's get() method like this:
>>>
>>> $.get(my_controller_url, function(data){
>>> console.log('got ajax data', data);
>>> });
>>>
>>> But if the controller's return value is a tuple there seems to be no
>>> data sent back, or at least I don't know how to access it from the 'data'
>>> variable in this example. If I make the controller a dictionary I get html
>>> back. But I don't want html. I just want the data.
>>>
>>> So how can I do this?
>>>
>> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Niphlod
the deal is basically that if you return a dict, web2py is compelled to 
pass it to the corresponding view, which in turns in most of cases returns 
html.
There's nothing wrong in returning a dict and then having a generic "json" 
view that serializes that dict, and as a matter of fact, generic.json does 
just that.
But if you return a string, you skip the "render the view" part.

On the parsing side: if you are looking for json, you should also return 
the correct content-type if you want libraries (e.g. jQuery) to parse for 
themselves. Either you force it with response.headers['Content-Type'] = 
'application/json' or - my personal preference - you just ask for 
/a/c/f.json instead of /a/c/f . the correct content type will be set by 
web2py.

On Wednesday, January 20, 2016 at 10:20:22 PM UTC+1, Ian W. Scott wrote:
>
> Thanks. So to clarify, if I serialize the return value as json in the 
> controller, then I can use it in javascript. It looks like I still have to 
> parse the json on the javascript end (like $.parseJSON(mydata)) but it 
> works like a charm.
>
> Ian
>
> On Wednesday, January 20, 2016 at 2:50:35 PM UTC-5, Niphlod wrote:
>>
>> from gluon.serializers import json
>>
>> def uh():
>> return json(blablabla)
>>
>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>>
>>> I'm trying to use ajax calls to update the data for a chart dynamically. 
>>> I don't want to make the chart a component that refreshes, I just want to 
>>> get the controller return value back to the javascript in the view, so that 
>>> I can update the chart via javascript. But web2py's ajax function seems to 
>>> only (a) update a part of the page html, or (b) send page data to the 
>>> controller for use in the back-end. There doesn't seem to be any way to get 
>>> the controller's return value as a data object for the javascript to use.
>>>
>>> I've tried just using jquery's get() method like this:
>>>
>>> $.get(my_controller_url, function(data){
>>> console.log('got ajax data', data);
>>> });
>>>
>>> But if the controller's return value is a tuple there seems to be no 
>>> data sent back, or at least I don't know how to access it from the 'data' 
>>> variable in this example. If I make the controller a dictionary I get html 
>>> back. But I don't want html. I just want the data.
>>>
>>> So how can I do this?
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Anthony
Additionally, if you still want to use the ajax() function, the third 
argument can be ":eval", in which case, you can return some Javascript code 
to be executed when the response is returned. Alternatively, the third 
argument can be an actual Javascript function, in which case, the returned 
value will be passed to that function.

Anthony

On Wednesday, January 20, 2016 at 4:20:22 PM UTC-5, Ian W. Scott wrote:
>
> Thanks. So to clarify, if I serialize the return value as json in the 
> controller, then I can use it in javascript. It looks like I still have to 
> parse the json on the javascript end (like $.parseJSON(mydata)) but it 
> works like a charm.
>
> Ian
>
> On Wednesday, January 20, 2016 at 2:50:35 PM UTC-5, Niphlod wrote:
>>
>> from gluon.serializers import json
>>
>> def uh():
>> return json(blablabla)
>>
>> On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote:
>>>
>>> I'm trying to use ajax calls to update the data for a chart dynamically. 
>>> I don't want to make the chart a component that refreshes, I just want to 
>>> get the controller return value back to the javascript in the view, so that 
>>> I can update the chart via javascript. But web2py's ajax function seems to 
>>> only (a) update a part of the page html, or (b) send page data to the 
>>> controller for use in the back-end. There doesn't seem to be any way to get 
>>> the controller's return value as a data object for the javascript to use.
>>>
>>> I've tried just using jquery's get() method like this:
>>>
>>> $.get(my_controller_url, function(data){
>>> console.log('got ajax data', data);
>>> });
>>>
>>> But if the controller's return value is a tuple there seems to be no 
>>> data sent back, or at least I don't know how to access it from the 'data' 
>>> variable in this example. If I make the controller a dictionary I get html 
>>> back. But I don't want html. I just want the data.
>>>
>>> So how can I do this?
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Dynamic Search

2016-01-20 Thread Anthony
What do you mean by "have the results to be a post"?

On Sunday, January 17, 2016 at 3:16:11 PM UTC-5, Anthony Smith wrote:
>
> Hi All,
>
> I am using the dynamic search (
> http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it 
> possible to have the results to be a post, if so do I go about it.
>
> cheers 
>
> Anthony
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] charts on web2py

2016-01-20 Thread Ron Chatterjee
I agree. Thank you!:-)


On Wednesday, January 20, 2016 at 3:31:49 PM UTC-5, Richard wrote:
>
> Not try but : http://www.web2pyslices.com/slice/show/1357/matplotlib-howto
>
> It's basically just a matter of streaming the content of a file generated 
> by you matplotlib python script, this is not a big deal...
>
> Richard
>
> On Wed, Jan 20, 2016 at 3:12 PM, Ron Chatterjee  > wrote:
>
>> Richard, any workable example that you know of matplotlib?
>>
>>
>> On Wednesday, January 20, 2016 at 2:14:10 PM UTC-5, Richard wrote:
>>>
>>> Also matplotlib, of course...
>>>
>>> Richard
>>>
>>> On Wed, Jan 20, 2016 at 2:02 PM, Javier Pepe  wrote:
>>>
 Hi

 For simple charts you can use google chart, exist plugin for integrate 
 this

 http://www.web2pyslices.com/slice/show/1721/google-charts-plugin



 On Wed, Jan 20, 2016 at 3:09 PM, Richard Vézina  
 wrote:

> Do you know that plotly was open sourced : https://plot.ly/
>
> I it one of your best choice if you want something dynamic... There is 
> D3.js, but I remember having read that most of it is included in the 
> plotly 
> stack...
>
> Richard
>
> On Wed, Jan 20, 2016 at 11:04 AM, Diego Tostes  
> wrote:
>
>> Hi,
>>
>> anyone can indicate a good solution to create charts using web2py?
>>
>> rgds
>>
>> diego
>>
>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to web2py+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> -- 
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 -- 
 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" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread José Eloy
Niphlod: You are right! IIS is now serving my web2py pages! Thanks!

A question: If I create a directory under wwwroot (let's say web2pyapps) 
and move my web2py app, I readed the manual and say this:

   - move the code to a subfolder named web2pyapps
   - create a routes.py file with routers = dict(BASE=dict(path_prefix = 
   "web2pyapps")) in it
   - inside the IIS Manager, locate the web2pyapps folder, right click on 
   it and select "Convert to Application"

But if I run my app I get error 500. Is maybe an error with the web.config 
file? I understand this file must is in the same folder that web2py.py

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Deploying in Windows server and SSL (no IIS)

2016-01-20 Thread José Eloy
Richard:

Could you show me how to generate my own Certificate Authority and my own 
certificate?

Regards

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: charts on web2py

2016-01-20 Thread Ariya Owam-aram
Try pygal.org very easy.

เมื่อ วันพุธที่ 20 มกราคม ค.ศ. 2016 23 นาฬิกา 04 นาที 43 วินาที UTC+7, 
Diego Tostes เขียนว่า:
>
> Hi,
>
> anyone can indicate a good solution to create charts using web2py?
>
> rgds
>
> diego
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: pygal and SQL.form

2016-01-20 Thread Ariya Owam-aram
Hi


Try separate function for form & chart and in the view/form.html you can 
use function {{ =LOAD('chart', ...) }}

or

You can embedded python chart code into form.html for example:
{{
   import pygal
   from pygal.style import DefaultStyle
   from pygal import Config
   config = Config()
   config.human_readable = True

   line_chart = pygal.Line(title = 'COMPANY',
x_labels = map(lambda d: d.strftime('%Y-%m-%d'), [each_day[0] for 
each_day in daily_sales_each_day]),
x_label_rotation = 20,
   dots_size = 5,
   title_font_size = 20,
   label_font_size = 10,
   legend_font_size = 10,
   value_font_size = 10,
   legend_at_bottom = True,
   tooltip_font_size = 14,
   value_formatter  = lambda ml: 
'{:,.2f}'.format(ml),
   style = DefaultStyle)

line_chart.add('Sales Order', [each_day[1][0][1] or 0 for each_day in 
daily_sales_each_day])
   =TAG(line_chart.render())
   }}

hope it help.
Ariya

เมื่อ วันพุธที่ 20 มกราคม ค.ศ. 2016 20 นาฬิกา 47 นาที 16 วินาที UTC+7, 
kecajk...@gmail.com เขียนว่า:
>
> Hi Guys, 
>
> I try to use pygal to draw some charts and it works fine. I used example 
> from:
>
>
> http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal
>
> However i don't know how to display SQL.form and pygal chart in one view.
>
> My code 
>
>
> def form_and_chart():
>  chart = plot_pygal()
>  form = SQLFORM.factory( Field('time') )
>  return dict(form=form),chart
>
>
> def plot_pygal():
>  response.headers['Content-Type']='image/svg+xml'
>  bar_chart = pygal.Bar(style=CleanStyle) # Then create a bar graph object
>  bar_chart.add('Fibonacci', [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) # Add 
> some values 
>  return bar_chart.render()
>
>
> view: form_and_chart.html
>
> {{extend 'layout.html'}}
> {{=form}}
> http://localhost/myapp/default/plot_pygal.svg"; type=
> "image/svg+xml" />
>
>
> When i do return(form=form), form is displayed correctly, when i do return 
> chart, chart is displayed correctly. How to combine those two to be 
> displayed on one page?
>
> Thanks!
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Virtual field in SQLFORM.grid

2016-01-20 Thread Marcello Parra
I could make it work.
Changed the virtual field from:
Field.Virtual('total', lambda row: row.trabalho.konsulta.count()),

To:
Field.Virtual('total', lambda row: db((db.konsulta.trabalho_id==
row.trabalho.id)).count())


Both fields work in the shell, but just the second works in the grid...

Can someone explain to me why ??





On Tue, Jan 19, 2016 at 3:09 PM, Marcello  wrote:

> Hello,
>
> I have a one to many configuration, using mysql database.
> I want to show a grid with the "one" table, and for each row, count the
> "many".
>
> For that I created a total virtual field.
> It works OK in the shel, for example
>
> But when I call the SQLFORM.grid I get an error
>
> Why do this happen ???
> Is there a way to get this ??
>
>
> Thanks
> Marcello
>
> db.define_table(
> 'trabalho',
> Field('descricao','string'),
> Field.Virtual('total', lambda row: row.trabalho.konsulta.count()),
> )
>
> db.define_table(
> 'konsulta',
> Field('trabalho_id', 'reference trabalho'),
> Field('name','string'),
> )
>
>
> I want to show a grid with:
> grid = SQLFORM.grid(db.trabalho, editable=True, create=False,
> deletable=False)
>
> When I call it, I get:
> 
>
>
>
> --
> 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" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Dynamic Search

2016-01-20 Thread Anthony Smith
Hi 

what I mean is to have results so they can be either emailed or printed? 

On Thursday, 21 January 2016 08:48:08 UTC+11, Anthony wrote:
>
> What do you mean by "have the results to be a post"?
>
> On Sunday, January 17, 2016 at 3:16:11 PM UTC-5, Anthony Smith wrote:
>>
>> Hi All,
>>
>> I am using the dynamic search (
>> http://www.web2pyslices.com/slice/show/1403/dynamic-search), is it 
>> possible to have the results to be a post, if so do I go about it.
>>
>> cheers 
>>
>> Anthony
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Why are the fields not hiding when using ajax for the forms? Look below.

2016-01-20 Thread aston . ribat
Anthony I can sense your presence. Please help me asap.

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Why are the fields not hiding when using ajax for the forms? Look below.

2016-01-20 Thread Anthony
Hard to say. Is there in fact a "user_id" field in the db.bottle table? If 
so, is it the auto-incrementing id field for the table? If not, then it 
shouldn't be appearing at all, as it is not in your "fields" list. Please 
show your table definition and make sure the code you are showing is the 
*exact* code that you actually have running.

Anthony

On Wednesday, January 20, 2016 at 8:36:19 AM UTC-5, aston.ri...@gmail.com 
wrote:
>
> this is what my controller reads:
> def index():
> return locals()
>
> def add_bottle():
> form=SQLFORM(db.bottle, 3 , deletable=True, fields = 
> ['request_expiryDate']).process()
> return locals()
>
>
> this is what my default/index.html reads:
>
> {{extend 'layout.html'}}
> {{=LOAD('default', 'add_bottle.load', ajax=True)}}
>
> this is what my default/add_bottle.load reads:
>
> 
> jQuery(document).ready(function(){
> jQuery('#bottle_user_id__row').hide();
> });
> 
> 
> {{=form}}
>
>
> what's wrong here as the user_id isn't hiding at all
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.