[web2py] Adding a Javascript Library
I am new to web2py and I was wondering how to add a javascript library. Do we add it to view. And how to import it into html. Using the same code script src= and what do we even place src=. I wanted to basically visualize a graph and was planning to use Arbor.js. Also if you know of some better javascript plotting library do mention it. 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: Error when Inserting a new user programmatically with web2py, v2.4.6, TypeError: character mapping
This is correct? from gluon.validators import CRYPT password = CRYPT()(str(self.db.auth_user.password.validate(password)[0]))[0] Em terça-feira, 7 de maio de 2013 17h31min58s UTC-3, Dirk escreveu: json.loads() returns a unicode string which *db.auth_user.password.validate() doesn't like -- try converting your password variable to a string first as follows:* *password = str(db.auth_user.password.validate(str(password))[0])Don't forget to str() the result of the db.auth_user.password.validate()[0] too since it returns an instance of gluon.validators.LazyCrypt and keep the passwords 4+ in length.HTH, D* On Tuesday, May 7, 2013 12:42:58 PM UTC-4, Stan Lexow wrote: *Inserting a new user programmatically with web2py, v2.4.6I apologize for the re post. I have read many threads on this subject, including several from Massimo, but I am still having trouble inserting a new user record.I just upgraded web2py to 2.4.6 from version 2012/3/4 1.99.7. The insert was working before the upgrade.When I execute the following code I receive the traceback belowcode fragment:...password = json.loads(request.vars.password).decode('unicode-escape')password = str(db.auth_user.password.validate(password)[0])...db.auth_user.insert(first_name=first_name, last_name=last_name, email=email, password=password)...The above code was tried with and without * *.decode('unicode-escape') Error: Traceback (most recent call last):File /Users/foo/Desktop/dev/web2py/applications/init/controllers/default.py, line 599, in manageUsers password=str(db.auth_user.password.validate(password)[0]).decode('unicode-escape'))File /Users/foo/Desktop/dev/web2py/gluon/validators.py, line 2760, in str hashed = simple_hash(self.password, key, salt, digest_alg)File /Users/foo/Desktop/dev/web2py/gluon/utils.py, line 87, in simple_hash int(keylen), get_digest(alg))File /Users/foo/Desktop/dev/web2py/gluon/contrib/pbkdf2.py, line 55, in pbkdf2_hex return pbkdf2_bin(data, salt, iterations, keylen, hashfunc).encode('hex')File /Users/foo/Desktop/dev/web2py/gluon/contrib/pbkdf2.py, line 65, in pbkdf2_bin mac = hmac.new(data, None, hashfunc)File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hmac.py, line 133, in new return HMAC(key, msg, digestmod)File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hmac.py, line 72, in init self.outer.update(key.translate(trans_5C))TypeError: character mapping must return integer, None or unicodeImportant: When I execute the following code from the web2py shell using “ python web2py.py -S init -M “, I do not get an error and the insert works as expected.email = 'first...@email.com'first_name='first'last_name=’last'password='flast123' # web2py database portion...db.auth_user.insert(first_name=first_name, last_name=last_name, email=email, password=str(db.auth_user.password.validate(‘mySecretPassword')[0]))Any insight is greatly appreciated!!Thanks in advance,Stan* -- 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: test post
On 20 Mar 2014 at 22:30:30, Massimo Di Pierro (massimo.dipie...@gmail.com) wrote: Lots of users have been having this problem recently. I do not know what to say. Must be a Google bug. we do not delete post unless requested by the author. +1, mine too On Thursday, 20 March 2014 04:21:38 UTC-5, Daniel McBrearty wrote: excuse me - my last post seems to have disappeared into the sub-ether waveband ... -- 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: Grid 2 list boxes first list box to restrict values in second
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=show_if#Conditional-fields On Thursday, 20 March 2014 17:26:57 UTC-5, Dan Kozlowski wrote: Is there any way within a grid with 2 list boxes that the selected value in the first list box can sub select the the second the values in the listbox ? A example would be selecting a state and only selecting cities in that state. Example : State : IL Cites : Chicago Calumet City Lansing Then if you select State : IN Cities : Schererville St. John Ceder Lake -- 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: Adding a Javascript Library
You simply place the file under the application/yourapp/static/js/ folder and you import it from the html. You can import in the layout.html with script src={{=URL('static','js/myfile.js')}}/script or you can import it from the python code (model or controller) with response.files.append(URL('static','js/myfile.js')) This will generate the script.../script for you. On Friday, 21 March 2014 01:01:14 UTC-5, Haad Khan wrote: I am new to web2py and I was wondering how to add a javascript library. Do we add it to view. And how to import it into html. Using the same code script src= and what do we even place src=. I wanted to basically visualize a graph and was planning to use Arbor.js. Also if you know of some better javascript plotting library do mention it. 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] Free web2py hosting for a free software web2py application
Hi, I have spare capacity on a 4Gb London-based Ubuntu 12.04 Linode. The hosting management is via Virtualmin, so there are facilities for email etc. etc. As long as the server load is not going to be insane, I'd be happy to host free of charge - drop me a note off-list if you'd like to pursue that. -- Regards, PhilK 'a bell is a cup...until it is struck' -- 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: Pulling data every 30s for a ticker with web2py
Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.og...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+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: Pulling data every 30s for a ticker with web2py
I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com javascript:: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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 javascript:. 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: Pulling data every 30s for a ticker with web2py
see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.og...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+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: Pulling data every 30s for a ticker with web2py
Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com javascript:: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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 javascript:. 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: form.custom.begin doesn't add the form _class and other attributes
Quinta-feira, 20 de Março de 2014 16:14:17 UTC, Leonel Câmara escreveu: {{form['_class'] = 'service-form'}} {{form['_role'] = 'form''}} {{=form.custom.begin}} The generated html was: form action=# enctype=multipart/form-data method=post Is this the supposed behavior or am I doing something wrong? The way I see it the output should be: form action=# enctype=multipart/form-data method=post class=service-form role=form Any tips? -- 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: form.custom.begin doesn't add the form _class and other attributes
it's just about as easy to manually write the HTML in place of form.custom.begin. Why have form.custom.begin then? I thought the point was to abstract away whatever SQLFORM needs in the form declaration. So either form.custom.begin (and end) should be removed or this is a bug/serious limitation. If the DIV helper didn't let you add a class attribute would you call it a bug or a limitation? -- 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: Grid 2 list boxes first list box to restrict values in second
you guys are amazing, made a long code into simplest and shortest one e.g. *# 1* {{=form}} script jQuery(document).ready(function(){ if(jQuery('#check_in_is_booking').prop('checked')){ jQuery('#check_in_booking_no__row').show(); jQuery('#check_in_court__row').hide(); jQuery('#check_in_customer__row').hide(); jQuery('#check_in_is_booking').change(function(){ if(jQuery('#check_in_is_booking').prop('checked')){ jQuery('#check_in_booking_no__row').show(); jQuery('#check_in_court__row').hide(); jQuery('#check_in_customer__row').hide();} else { jQuery('#check_in_booking_no__row').hide(); jQuery('#check_in_court__row').show(); jQuery('#check_in_customer__row').show();}});} else { jQuery('#check_in_booking_no__row').hide(); jQuery('#check_in_court__row').show(); jQuery('#check_in_customer__row').show(); jQuery('#check_in_is_booking').change(function(){ if(jQuery('#check_in_is_booking').prop('checked')){ jQuery('#check_in_booking_no__row').show(); jQuery('#check_in_court__row').hide(); jQuery('#check_in_customer__row').hide();} else { jQuery('#check_in_booking_no__row').hide(); jQuery('#check_in_court__row').show(); jQuery('#check_in_customer__row').show();}});} }); /script *into* table.booking_no.show_if = (table.is_booking == True) table.court.show_if = (table.is_booking == False) table.customer.show_if = (table.is_booking == False) *# 2* {{=form}} script jQuery(document).ready(function(){ if(jQuery('#check_out_is_discount').prop('checked')){ jQuery('#check_out_discount__row').show(); jQuery('#check_out_discount_reason__row').show(); jQuery('#check_out_is_discount').change(function(){ if(jQuery('#check_out_is_discount').prop('checked')){ jQuery('#check_out_discount__row').show(); jQuery('#check_out_discount_reason__row').show();} else { jQuery('#check_out_discount__row').hide(); jQuery('#check_out_discount_reason__row').hide();}});} else { jQuery('#check_out_discount__row').hide(); jQuery('#check_out_discount_reason__row').hide(); jQuery('#check_out_is_discount').change(function(){ if(jQuery('#check_out_is_discount').prop('checked')){ jQuery('#check_out_discount__row').show(); jQuery('#check_out_discount_reason__row').show();} else { jQuery('#check_out_discount__row').hide(); jQuery('#check_out_discount_reason__row').hide();}});} }); /script *into* table.discount.show_if = (table.is_discount == True) table.discount_reason.show_if = (table.is_discount == True) *# 3* {{=form}} script jQuery(function() { jQuery('#trade_in_header_buyer__row').hide(); jQuery('#trade_in_header_seller__row').hide(); }); function updateOption() { jQuery('#trade_in_header_buyer__row').toggle(this.value == '{{='Buyer'}}'); jQuery('#trade_in_header_seller__row').toggle(this.value == '{{='Seller'}}'); } jQuery(document).ready(function() { jQuery(#trade_in_header_transaction_with).each(updateOption); jQuery(#trade_in_header_transaction_with).change(updateOption); }); /script *into* table.buyer.show_if = (table.transaction_with == 'Buyer') table.seller.show_if = (table.transaction_with == 'Seller') thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (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: Pulling data every 30s for a ticker with web2py
Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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.
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.og...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ti cker How do I do this with Web2py + JavaScript ? I am new to web2py. 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.
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com javascript:: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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 javascript:. 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: Pulling data every 30s for a ticker with web2py
in the end you will understand the idea. Be patient... 2014-03-21 12:20 GMT+00:00 martzi mp.og...@gmail.com: Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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. -- 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: Pulling data every 30s for a ticker with web2py
OK thanks for the advice :) On Friday, March 21, 2014 2:27:21 PM UTC+2, Ramos wrote: in the end you will understand the idea. Be patient... 2014-03-21 12:20 GMT+00:00 martzi mp.o...@gmail.com javascript:: Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+un...@googlegroups.com javascript:. 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
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
I went through thev video... seems easy, unfortunately i cannot see the command for starting tornado... poor video quality ! On Friday, March 21, 2014 2:33:32 PM UTC+2, martzi wrote: OK thanks for the advice :) On Friday, March 21, 2014 2:27:21 PM UTC+2, Ramos wrote: in the end you will understand the idea. Be patient... 2014-03-21 12:20 GMT+00:00 martzi mp.o...@gmail.com: Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+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
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
Inside web2py/gluon/contrib do Python websocket_messaging.py -k mykey -p Em 21/03/2014 14:27, martzi mp.og...@gmail.com escreveu: I went through thev video... seems easy, unfortunately i cannot see the command for starting tornado... poor video quality ! On Friday, March 21, 2014 2:33:32 PM UTC+2, martzi wrote: OK thanks for the advice :) On Friday, March 21, 2014 2:27:21 PM UTC+2, Ramos wrote: in the end you will understand the idea. Be patient... 2014-03-21 12:20 GMT+00:00 martzi mp.o...@gmail.com: Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+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) -
Re: [web2py] Re: Pulling data every 30s for a ticker with web2py
Ok thanks!!! On Friday, March 21, 2014 4:59:08 PM UTC+2, Ramos wrote: Inside web2py/gluon/contrib do Python websocket_messaging.py -k mykey -p Em 21/03/2014 14:27, martzi mp.o...@gmail.com javascript: escreveu: I went through thev video... seems easy, unfortunately i cannot see the command for starting tornado... poor video quality ! On Friday, March 21, 2014 2:33:32 PM UTC+2, martzi wrote: OK thanks for the advice :) On Friday, March 21, 2014 2:27:21 PM UTC+2, Ramos wrote: in the end you will understand the idea. Be patient... 2014-03-21 12:20 GMT+00:00 martzi mp.o...@gmail.com: Well then I will have to watch it to the end i was a bit worried for not understanding the explanations. Thanks again! On Friday, March 21, 2014 2:11:35 PM UTC+2, Ramos wrote: I guess not, the video alone is very self explanatory. You have to install tornado then start tornado as a separate process inside web2py\gluon\contrib then, in your webpage add a websocket connection and a callback to process the incomming data from server. You can see this very clearly in the video 2014-03-21 11:32 GMT+00:00 martzi mp.o...@gmail.com: Ramos, is there an English version of the videos ? I don't understand Portuguese ... On Friday, March 21, 2014 12:56:14 PM UTC+2, martzi wrote: Thanks a lot i am going though and will let you know! On Friday, March 21, 2014 12:47:18 PM UTC+2, Ramos wrote: see this video from Bruno Rocha https://www.youtube.com/watch?v=MUWy-NSrvNQ Saved my life once... 2014-03-21 10:35 GMT+00:00 martzi mp.o...@gmail.com: I like the idea of tornado, I have seen some cool site running tornado... but I don't really know where and how to start with it. i am on webfactory. Any idea on how to get it done ? Thank you! On Friday, March 21, 2014 12:15:35 PM UTC+2, Ramos wrote: Another stupid solution use websockets (tornado) and this way you can publish data every 30 s to the webpage from the server to the client connectect. 2014-03-21 10:08 GMT+00:00 martzi mp.o...@gmail.com: Thank all for your replies... PN i like you solution, I am going to try it and let you know if it worked... Thanks to all for yo help! On Thursday, March 20, 2014 11:25:47 PM UTC+2, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and specify the 'timeout' parameter of the component so that it reloads every 30 seconds. You will not have to do any of the ajax/js yourself this way. On Sunday, March 16, 2014 1:48:11 PM UTC-4, Martin wrote: Hi all, Please could anyone help me out, I need to pull some data from some API (ex: https//xxx/aaa/ etc.) every 30s and then display the result in a ticker How do I do this with Web2py + JavaScript ? I am new to web2py. 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com -
Re: [web2py] Re: Web2py on Koding.com
Oh no i wish i could ! On Thu, Mar 20, 2014 at 10:59 AM, 黄祥 steve.van.chris...@gmail.com wrote: had you by any chance made the admin app worked in koding.com with apache installed? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (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/KibW5SWue0E/unsubscribe. To unsubscribe from this group and all its topics, 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: 2.9.5-stable Version throws ticket when /admin accessed - dead in water
Does anyone think that this problem could be a result of installing the python multiprocessing module ... the back-port to python 2.5.X? -- 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: 2.9.5-stable Version throws ticket when /admin accessed - dead in water
Any luck? Posting the details of the ticket error output will help debug the problem. On Friday, March 21, 2014 12:06:11 AM UTC-4, weheh wrote: Gaah! I just restored the older version of web2py from which I upgraded (ashamed to say it's 2.3.2) and now I'm getting the same error. So apparently, something got corrupted along the way. Note to self: don't attempt upgrades just before a major release. -- 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: list reference with ondelete=set null breaking when delete parent
Your desired behavior is that when a color is deleted it should be set to null in tshirts, so you need to put the ondelete attribute in the color field in the color table instead of on the colors field in the tshirt table. db.define_table('color', Field('color', 'string', ondelete=SET NULL)) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color')) On Thursday, March 20, 2014 2:15:56 PM UTC-4, André Kablu wrote: I have 2 tables, using sqlite: db.define_table('color', Field('color', 'string')) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color', ondelete=SET NULL)) When I delete a color, all tshirts that have this color will break with the error message: using a recursive select but encountered a broken reference So the delete() is not putting NULL on the reference... This is a bug right? Not the correct behavior... I was using list:reference b/c it seems much easier than building 3 tables... but now I am not sure if it is good to be used once it is not automatic... -- 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: Can the DAL produce pivot table query (for use with Google Charts Plugin)?
I don't think the DAL provides that by default. You have the option of writing your own pivot function (it's not very complicated, that's the way I went) or you can use a library like pandas if your production server lets you install numpy/scipy/pandas. Pandas will give you a lot more data manipulation functionality but it involves learning yet another tool. On Monday, March 17, 2014 2:48:21 PM UTC-4, Michael Beller wrote: I'm trying to create a query that produces a pivot table. I have a Project and Project Status table. Each Project has a Status reference field to a Project Status and a Manager reference field to an Auth User. db.define_table('t_project_status', Field('f_name', requires=IS_NOT_EMPTY(), label=T('Name')), auth.signature) db.define_table('t_project', Field('f_name', requires=IS_NOT_EMPTY(), label=T('Name')), Field('f_description', 'text', readable=False, label=T('Description')), Field('f_manager', 'reference auth_user', label=T('Manager')), Field('f_status', 'reference t_project_status', label=T('Status')), auth.signature) I would like a table that produces a row for every Manager and a column for every Status (which I can then display as a Bar Chart using Google Charts). This query comes close to at least producing a normalized list, i.e., one row for each combination of Manager/Status in the Project table (but not an entry for a Status that doesn't exist for a particular Manager, I can't figure out how to add a 2nd constraint to the 'left' clause): joinquery = ((db.t_project.f_status == db.t_project_status.id) (db.t_project.f_manager == db.auth_user.id)) data = db(joinquery).select( db.auth_user.last_name, db.t_project.f_status, db.t_project_status.f_name, db.t_project_status.id.count(), groupby=(db.auth_user.id|db.t_project_status.id), orderby=(db.auth_user.last_name|db.t_project_status.id), left=db.auth_user.on(db.t_project.f_manager == db.auth_user.id), ) I've started to look at itertools.groupby but was trying to find a DAL solution to create the pivot table. I'm then using this code to create a table for Google Charts using the Google Charts Plugin but will need to modify once I get the pivot table working: datalist = [] datalist.append(['Manager','Status','Count']) for row in data: datalist.append([row.auth_user.last_name or 'None', row.t_project.f_status or 'None', int(row[db.t_project_status.id.count()])]) -- 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: list reference with ondelete=set null breaking when delete parent
I think you are mistaken... ondelete is for use with upload and reference fields... http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Fri, Mar 21, 2014 at 1:54 PM, PN pal...@fielddiagnostics.com wrote: Your desired behavior is that when a color is deleted it should be set to null in tshirts, so you need to put the ondelete attribute in the color field in the color table instead of on the colors field in the tshirt table. db.define_table('color', Field('color', 'string', ondelete=SET NULL)) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color')) On Thursday, March 20, 2014 2:15:56 PM UTC-4, André Kablu wrote: I have 2 tables, using sqlite: db.define_table('color', Field('color', 'string')) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color', ondelete=SET NULL)) When I delete a color, all tshirts that have this color will break with the error message: using a recursive select but encountered a broken reference So the delete() is not putting NULL on the reference... This is a bug right? Not the correct behavior... I was using list:reference b/c it seems much easier than building 3 tables... but now I am not sure if it is good to be used once it is not automatic... -- 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/TycU_Q-ywYI/unsubscribe. To unsubscribe from this group and all its topics, 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: list reference with ondelete=set null breaking when delete parent
You're right, the update is defined on the field like you have. I have used 'NO ACTION' on a reference field with no issues. However never tried it 'SET NULL' on a List:reference. I spoke too soon. On Friday, March 21, 2014 1:21:34 PM UTC-4, André Kablu wrote: I think you are mistaken... ondelete is for use with upload and reference fields... http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Fri, Mar 21, 2014 at 1:54 PM, PN pal...@fielddiagnostics.comjavascript: wrote: Your desired behavior is that when a color is deleted it should be set to null in tshirts, so you need to put the ondelete attribute in the color field in the color table instead of on the colors field in the tshirt table. db.define_table('color', Field('color', 'string', ondelete=SET NULL)) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color')) On Thursday, March 20, 2014 2:15:56 PM UTC-4, André Kablu wrote: I have 2 tables, using sqlite: db.define_table('color', Field('color', 'string')) db.define_table('tshirt', Field('name', 'string'), Field('colors', 'list:reference color', ondelete=SET NULL)) When I delete a color, all tshirts that have this color will break with the error message: using a recursive select but encountered a broken reference So the delete() is not putting NULL on the reference... This is a bug right? Not the correct behavior... I was using list:reference b/c it seems much easier than building 3 tables... but now I am not sure if it is good to be used once it is not automatic... -- 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/TycU_Q-ywYI/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com javascript:. 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: please help testing windows and mac binary
On Thursday, March 20, 2014 6:39:00 PM UTC-7, Dave S wrote: On Thursday, March 20, 2014 4:10:35 PM UTC-7, Massimo Di Pierro wrote: Please try again these builds: http://web2py.com/examples/static/nightly/web2py_win.zip http://web2py.com/examples/static/nightly/web2py_osx.zip The Windows version launches with a double-click and I get the welcome app in my browser. Cliocking on the Administration button takes me to a password prompt, and then the admin app. W8.1 in a VMPlayer instance Also runs fine on my lap top, a W7 flavor ... perhaps the same as stifan tried, although I forgot to check the flavor menu. I created a new toy app by pressing the button. Tickets behave properly =8-O /dps -- 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] before_update callback and sheduler
I have a _before_update callback, and it works when I update a record from appadmin, but when I update from scheduler don't run my callback function, it is a sheduler problem or I am missing something?. I'm using code from Massimo's haystack plugin. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/ -- 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 + Web2py
Hi, had a web2py application running with apache2 and everything worked correctly ... At migrate to nginx application works, but when I enter the admin gives me the following error: 'Traceback (most recent call last):\n File /home/www-data/web2py/gluon/main.py, line 573, in wsgibase\n serve_controller(request, response, session)\n File /home/www-data/web2py/gluon/main.py, line 228, in serve_controller\n run_models_in(environment)\n File /home/www-data/web2py/gluon/compileapp.py, line 533, in run_models_in\n code = read_pyc(model)\n File /home/www-data/web2py/gluon/compileapp.py, line 446, in read_pyc\n raise SystemError(\'compiled code is incompatible\')\nSystemError: compiled code is incompatible\n' p159 Thanks .. -- Federico Ferraro Usuario Linux : 482533. -- -- 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: Free web2py hosting for a free software web2py application
interesting project. :-) On Thursday, 20 March 2014 18:04:28 UTC-5, pa...@cancamusa.net wrote: Hello, I write most of the code for *karakolas, a free software web2py application for managing grupos de consumo*. These are asociations of people that join their shopping baskets so that they can order their food directly from the local farmers, taking into account ecological, social and other criteria. karakolas can import spreadsheets in almost arbitrary formats, using a non-turing-complete mini-python language. It allows bulk processing of records à la google docs, less fancy but safer. It allows for coordination of the different groups without compromising their independence. It allows for some (yet limited) communication between different installs of karakolas. It has a few more fancy features, but the truth is if you ask the users of karakolas this is not what they praise, they like it because it gets the job done, and because we listen to their needs and adapt karakolas to their workflow. You can read more about karakolas in these links: http://karakolas.org/ (in spanish) https://savannah.nongnu.org/projects/karakolas/ (short description in english) http://hg.savannah.gnu.org/hgweb/karakolas/file/ (browse source code) However, karakolas' users grow slowly; it's hard to install and most people would like to test it quickly. So *I'd like to provide an example site*. I do have one, but it's a personal server with limited resources and lots of software installed. It's easy to load the cpu telling karakolas to do some bulk processing, so I'd rather have the public example site on a separate server. As karakolas is free software, *I wonder if it's possible to get some free hosting*. Do you know of anyone willing to sponsor this software? Thanks for reading -- 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] Scheduler Task
Good morning, everyone. There how to perform the tasks exactly the same time? Happens to have the time elapsed between the beginning and end, then the Last Run Time will always be incremented with the datetime end of script execution, soon started the first running 6:00:00, the next will always be later. Eg: Start Time: 25-10-2013 06:00:00 Last Run Time: 19-03-2014 06:03:50 Period: 86400 Next Run Time: 20-03-2014 06:03:50 -- 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: Free web2py hosting for a free software web2py application
GAE? пятница, 21 марта 2014 г., 5:04:28 UTC+6 пользователь pa...@cancamusa.net написал: Hello, I write most of the code for *karakolas, a free software web2py application for managing grupos de consumo*. These are asociations of people that join their shopping baskets so that they can order their food directly from the local farmers, taking into account ecological, social and other criteria. karakolas can import spreadsheets in almost arbitrary formats, using a non-turing-complete mini-python language. It allows bulk processing of records à la google docs, less fancy but safer. It allows for coordination of the different groups without compromising their independence. It allows for some (yet limited) communication between different installs of karakolas. It has a few more fancy features, but the truth is if you ask the users of karakolas this is not what they praise, they like it because it gets the job done, and because we listen to their needs and adapt karakolas to their workflow. You can read more about karakolas in these links: http://karakolas.org/ (in spanish) https://savannah.nongnu.org/projects/karakolas/ (short description in english) http://hg.savannah.gnu.org/hgweb/karakolas/file/ (browse source code) However, karakolas' users grow slowly; it's hard to install and most people would like to test it quickly. So *I'd like to provide an example site*. I do have one, but it's a personal server with limited resources and lots of software installed. It's easy to load the cpu telling karakolas to do some bulk processing, so I'd rather have the public example site on a separate server. As karakolas is free software, *I wonder if it's possible to get some free hosting*. Do you know of anyone willing to sponsor this software? Thanks for reading -- 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] Unable to start web2py: No module named 'globals'
I downloaded web2py sources from the web2py site, and tried running it as mentioned: E:\Workspace\web2py_src\web2pypython web2py.py Traceback (most recent call last): File web2py.py, line 18, in module import gluon.widget File E:\Workspace\web2py_src\web2py\gluon\__init__.py, line 15, in module from globals import current ImportError: No module named 'globals' I have added E:\Workspace\web2py_src\web2py to my PATH. And using python 3.3.5 E:\Workspace\web2py_src\web2pypython Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. Can someone please guide? What is getting wrong here? Also, my python installation is not showing me correct values: e.g. print sys.path File stdin, line 1 print sys.path ^ SyntaxError: invalid syntax Appreciate any help on 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: uploading a csv file and read it with python module pandas
Thanks Anthony. Then, in db.py db.define_table('mytable',Field('myfile','upload')) and in default.py def stat(): record=db.mytable(id) data = pd.read_csv(db.mytable.myfile.retrieve(record.myfile)[1] But I got the following error message type 'exceptions.AttributeError'('NoneType' object has no attribute 'myfile') Sorry for my poor understanding of how the database works. Could you direct me to a manual or tutorial for beginners so I can learn these issues. Thanks On Thursday, March 20, 2014 2:35:50 PM UTC+1, Anthony wrote: Something like: record = db.mytable(id) data = pd.read_csv(db.mytable.myfile.retrieve(record.myfile)[1]) Anthony On Wednesday, March 19, 2014 9:50:15 AM UTC-4, Gaston wrote: I am statistician and new in web2py. I tried to build an application that allows users to: - upload a csv file in the database (my file) - and click a link where some automated analyses have been attached using the python module pandas with (import pandas as pd) In the db.py, I have db.define_table('mytable',Field('myfile','upload')) In the default.py I have the below lines def stat(): data=pd.read.csv('myfile') I received the following error: type 'exceptions.AttributeError'('module' object has no attribute 'read') Great if someone could help. Thanks. Gaston -- 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: importing modules to test file using pytest
All, On Monday, December 17, 2012 10:11:13 PM UTC+5:30, Ian W. Scott wrote: After a bit of hacking I put together a working test runner for pytest. Here it is: Run this app's tests via py.test place this file in applications/appname/bin/ run with: python your web2py dir/web2py.py -S paideia -M -R applications/appname/bin/runtest.py import os import sys import pytest def run_pytest(w2p_dir, test_dir, app_name): if os.name == 'nt': errlist = (WindowsError,ValueError,SystemExit) else: errlist = (OSError,ValueError,SystemExit) try: test_dir = os.path.join(w2p_dir, 'applications', app_name,test_dir ) if test_dir not in sys.path: sys.path.append(test_dir) # to support imports from current folder in the testfiles # modules are applications/[app_name]/modules modules_path = os.path.join('applications', app_name, 'modules') if modules_path not in sys.path: sys.path.append(modules_path) # to support imports from modules folder if 'site-packages' not in sys.path: sys.path.append('site-packages')# support imports from web2py/site-packages pytest.main([test_dir]) # run pytest programmatically except Exception, e: print type(e), e if __name__=='__main__': run_pytest(your web2py directory, your test folder, your appname ) I realized that global db is available until we call pytest.main() As soon as we are inside pytest.main() - global db object is lost. Is there a way to preserve the globals() ? pytest.main() is a just a function call - so ideally globals() should remain intact. Any idea how to ensure that globals like db, Auth are preserved and passed to the py.test runtime ? (to prevent NameError: global name 'db' is not defined Thanks, -Mandar -- 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: Problems with the server stalling out. Setting up debuging.
Hi any did anyone have a chance to fixed this issue? On Monday, February 3, 2014 2:14:21 AM UTC+8, Encompass solutions wrote: It seems that I have an issue I can't resolve. Every once in a while at seemingly the worst and most random times, the service will stall out. It simply doesn't respond to anything. Going into the computer and running htop shows that the computer is doing nothing. I am not running the server with a compiled version of my code. I am running: 2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Apache/2.2.22 (Ubuntu), Python 2.7.3) The application does only basic uploading and loading of a single item. Here is an example of the webplayer: melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101 I can run F5 reloads on the site for 15 minutes straight, not have anyone access the system then then try to load something, be it the admin interface or the page I show you here and it site for a very long time. The time it is unresponsive seems random, but that's because I haven't discovered how to replicate the problem. If I restart apache and try, it seems to work every time. This issue is very annoying and I seem to hit this kind of thing in many of the sites I am making and working on. We really need to figure out what is going on. I am running ubuntu 12.04 and set up the server using the scripts found in web2py for postgres and so forth. I am using postgres and the issue happens in both sqlite and postgres database setups. I can't seem to replicate the issue when running locally with rocket rather than apache. The amazon server is a Medium instance. I thought maybe it was because of the microinstance issues, but I seem to be wrong? Any ideas into this? Our app goes live next week and I really hope to resolve this issue. The server is currently stalling out and has actually stopped mid page. I have the htop running on the server on the right. Last, is how do you think I could setup the server to better see what is going on and solve the issue. It's really annoying knowing how simple my service is, but seeing how very slow or inresponsive the site is. BR, Jason Brower -- 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] Unable to start web2py: No module named 'globals'
Web2py supports Python version 2.7, not 3.x http://web2py.com/init/default/what Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 21-03-2014 4:29 PM, Deepak Pawar wrote: I downloaded web2py sources from the web2py site, and tried running it as mentioned: E:\Workspace\web2py_src\web2pypython web2py.py Traceback (most recent call last): File web2py.py, line 18, in module import gluon.widget File E:\Workspace\web2py_src\web2py\gluon\__init__.py, line 15, in module from globals import current ImportError: No module named 'globals' I have added E:\Workspace\web2py_src\web2py to my PATH. And using python 3.3.5 E:\Workspace\web2py_src\web2pypython Python 3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 10:37:12) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. Can someone please guide? What is getting wrong here? Also, my python installation is not showing me correct values: e.g. print sys.path File stdin, line 1 print sys.path ^ SyntaxError: invalid syntax Appreciate any help on 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 mailto: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: Free web2py hosting for a free software web2py application
I forgot to say something important: karakolas depend on latex and numpy, althought that one could be made optional. I don't know where to look for a list of available software, but I guess there's no latex. I'm researching pythonanywhere and koding.com, that 黄祥 suggested. Thanks everyone for your comments El viernes, 21 de marzo de 2014 18:14:49 UTC+1, Андрей Генералов escribió: GAE? пятница, 21 марта 2014 г., 5:04:28 UTC+6 пользователь pa...@cancamusa.netнаписал: Hello, I write most of the code for *karakolas, a free software web2py application for managing grupos de consumo*. These are asociations of people that join their shopping baskets so that they can order their food directly from the local farmers, taking into account ecological, social and other criteria. karakolas can import spreadsheets in almost arbitrary formats, using a non-turing-complete mini-python language. It allows bulk processing of records à la google docs, less fancy but safer. It allows for coordination of the different groups without compromising their independence. It allows for some (yet limited) communication between different installs of karakolas. It has a few more fancy features, but the truth is if you ask the users of karakolas this is not what they praise, they like it because it gets the job done, and because we listen to their needs and adapt karakolas to their workflow. You can read more about karakolas in these links: http://karakolas.org/ (in spanish) https://savannah.nongnu.org/projects/karakolas/ (short description in english) http://hg.savannah.gnu.org/hgweb/karakolas/file/ (browse source code) However, karakolas' users grow slowly; it's hard to install and most people would like to test it quickly. So *I'd like to provide an example site*. I do have one, but it's a personal server with limited resources and lots of software installed. It's easy to load the cpu telling karakolas to do some bulk processing, so I'd rather have the public example site on a separate server. As karakolas is free software, *I wonder if it's possible to get some free hosting*. Do you know of anyone willing to sponsor this software? Thanks for reading -- 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 2.9.5 is OUT
hi, i try to migrate from 2.8.2 but don't work. I do alwase the same process to upgrade. wget http://web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip cd web2py cp ../2.8.2/web2py/route.py edit web2py/route.py #change the prefix cp /etc/nginx/site-enable/web2py.2.8.2 /etc/nginx/site-enable/web2py.2.9.5 edit /etc/nginx/site-enable/web2py.2.9.5 cp /etc/uwsgi/web2py.2.8.2 /etc/uwsgi/web2py.2.9.5 edit /etc/uwsgi/web2py.2.9.5restart nginx restart uwsgi-emperor after that -- 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: Free web2py hosting for a free software web2py application
El viernes, 21 de marzo de 2014 19:44:41 UTC+1, Massimo Di Pierro escribió: interesting project. :-) It has a lot of to do with the first paragraph of the web2py book (many groups still use google docs): I believe that the ability to easily build high quality web applications is of critical importance for the growth of a free and open society. This prevents the biggest players from monopolizing the flow of information. -- 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] Creating a background task script on models, db is not defined.
Hi, I'm trying to create a background job/function. I'm locating the file on the models directory, as I read on the book. When I try to run the script manually, I get an error saying that db is not defined. This is part of the code where I get the error: .. .. catalog = csv.reader(webpage) for row in catalog: item = db(db.t_items.unfi_product_== row[5]).select().first() if row 0 and not item: .. 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] Nginx + Web2py
Did you try re-recompiling the app? -- 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: form.custom.begin doesn't add the form _class and other attributes
If you couldn't add a class to a div, it would only be a bug if the class was defined to allow classes to be added. Otherwise, it's a limitation. form.custom.begin is still useful even though it isn't easily manipulated, so I don't think it should be removed. And there are at least a few trivially easy alternatives, so I also don't think it is a serious limitation (it would be more serious in the case of DIV). Anyway, feel free to submit a pull request if this functionality is important to 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: form.custom.begin doesn't add the form _class and other attributes
If you couldn't add a class to a div, it would only be a bug if the class was defined to allow classes to be added. Otherwise, it's a limitation. form.custom.begin is still useful even though it isn't easily manipulated, so I don't think it should be removed. And there are at least a few trivially easy alternatives, so I also don't think it is a serious limitation (it would be more serious in the case of DIV). Anyway, feel free to submit a pull request if this functionality is important to 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py 2.9.5 is OUT
I always have trouble upgrading from the Administrative Interface; it always complains about permissions. This is under Linux. Is it because web2py doesn't have sudo permission? Anyway, what's the safest way to manually install over my existing installation? Thanks. On Saturday, 15 March 2014 22:42:14 UTC-4, Massimo Di Pierro wrote: Contains major bug fixes. Thanks niphlod, Tim, all the other who have contributed. Massimo -- 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 2.9.5 is OUT
it's working again. The probleme was on the routing file. a conflict with my old route.py 2014-03-21 22:24 GMT+01:00 horridohobbyist horrido.hobb...@gmail.com: I always have trouble upgrading from the Administrative Interface; it always complains about permissions. This is under Linux. Is it because web2py doesn't have sudo permission? Anyway, what's the safest way to manually install over my existing installation? Thanks. On Saturday, 15 March 2014 22:42:14 UTC-4, Massimo Di Pierro wrote: Contains major bug fixes. Thanks niphlod, Tim, all the other who have contributed. Massimo -- 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/fDZO1J11wdI/unsubscribe. To unsubscribe from this group and all its topics, 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: 2.9.5-stable Version throws ticket when /admin accessed - dead in water
On Friday, March 21, 2014 9:49:28 AM UTC-7, PN wrote: Any luck? Posting the details of the ticket error output will help debug the problem. On Friday, March 21, 2014 12:06:11 AM UTC-4, weheh wrote: Gaah! I just restored the older version of web2py from which I upgraded (ashamed to say it's 2.3.2) and now I'm getting the same error. So apparently, something got corrupted along the way. Note to self: don't attempt upgrades just before a major release. There were changes that happened after 2.5.x which affected the admin app because the format (structure) of some things had changed. In one step, the ticket format changed and admin would have trouble trying to open old tickets. Clearing out the tickets helped with that. More recently, with 2.8.x, the session storage was changed, and accessing old sessions broke things. Clearing out the sessions helped with that. One needs to keep an eye on the release announcements to build up a checklist ;-) /dps -- 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: Can the DAL produce pivot table query (for use with Google Charts Plugin)?
What database server are you using? Some have SQL extensions which do cross tabs and cubes, which would mean writing the SQL and doing executesql. On Tuesday, 18 March 2014 05:48:21 UTC+11, Michael Beller wrote: I'm trying to create a query that produces a pivot table. I have a Project and Project Status table. Each Project has a Status reference field to a Project Status and a Manager reference field to an Auth User. db.define_table('t_project_status', Field('f_name', requires=IS_NOT_EMPTY(), label=T('Name')), auth.signature) db.define_table('t_project', Field('f_name', requires=IS_NOT_EMPTY(), label=T('Name')), Field('f_description', 'text', readable=False, label=T('Description')), Field('f_manager', 'reference auth_user', label=T('Manager')), Field('f_status', 'reference t_project_status', label=T('Status')), auth.signature) I would like a table that produces a row for every Manager and a column for every Status (which I can then display as a Bar Chart using Google Charts). This query comes close to at least producing a normalized list, i.e., one row for each combination of Manager/Status in the Project table (but not an entry for a Status that doesn't exist for a particular Manager, I can't figure out how to add a 2nd constraint to the 'left' clause): joinquery = ((db.t_project.f_status == db.t_project_status.id) (db.t_project.f_manager == db.auth_user.id)) data = db(joinquery).select( db.auth_user.last_name, db.t_project.f_status, db.t_project_status.f_name, db.t_project_status.id.count(), groupby=(db.auth_user.id|db.t_project_status.id), orderby=(db.auth_user.last_name|db.t_project_status.id), left=db.auth_user.on(db.t_project.f_manager == db.auth_user.id), ) I've started to look at itertools.groupby but was trying to find a DAL solution to create the pivot table. I'm then using this code to create a table for Google Charts using the Google Charts Plugin but will need to modify once I get the pivot table working: datalist = [] datalist.append(['Manager','Status','Count']) for row in data: datalist.append([row.auth_user.last_name or 'None', row.t_project.f_status or 'None', int(row[db.t_project_status.id.count()])]) -- 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: Problem w/ cpdb.py script
I modified the script to compute a safe order (so no table is created before any that it references), although it looks like the original order is fine. But when it tries to define the first table (auth_cas, which has no references), I get: (1005, Can't create table xxx.auth_cas' (errno: 150)) On Monday, December 23, 2013 12:51:21 PM UTC-5, Alan Etkin wrote: Note that, when I tried to use the script to copy to a MySQL DB on pythonanywhere, I got a 150 error, that it couldn't create an auth table, and this may be related to foreign keys as well. Note that there is another issue about cpdb (actually about the DAL class constructor and the table creation order), check that this not the same. https://code.google.com/p/web2py/issues/detail?id=1799start=100 Some backends allow to disable constraint checks (i.e. postgresql), maybe you can try issuing a command to disable them with executesql before the inserts (editing the script) -- 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: uploading a csv file and read it with python module pandas
That wasn't complete code. You'll have to define id somewhere, and it should be the record ID of a record in the db.mytable table. Anthony On Friday, March 21, 2014 3:52:18 AM UTC-4, Gaston wrote: Thanks Anthony. Then, in db.py db.define_table('mytable',Field('myfile','upload')) and in default.py def stat(): record=db.mytable(id) data = pd.read_csv(db.mytable.myfile.retrieve(record.myfile)[1] But I got the following error message type 'exceptions.AttributeError'('NoneType' object has no attribute 'myfile') Sorry for my poor understanding of how the database works. Could you direct me to a manual or tutorial for beginners so I can learn these issues. Thanks On Thursday, March 20, 2014 2:35:50 PM UTC+1, Anthony wrote: Something like: record = db.mytable(id) data = pd.read_csv(db.mytable.myfile.retrieve(record.myfile)[1]) Anthony On Wednesday, March 19, 2014 9:50:15 AM UTC-4, Gaston wrote: I am statistician and new in web2py. I tried to build an application that allows users to: - upload a csv file in the database (my file) - and click a link where some automated analyses have been attached using the python module pandas with (import pandas as pd) In the db.py, I have db.define_table('mytable',Field('myfile','upload')) In the default.py I have the below lines def stat(): data=pd.read.csv('myfile') I received the following error: type 'exceptions.AttributeError'('module' object has no attribute 'read') Great if someone could help. Thanks. Gaston -- 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: Login form adittional fields
I don't get it why do you need 3 fields? Anyway you could just add the field to your custom form. Then instead of using auth.login(), get the user for the id/email/whatever you're using and then login with login_bare. -- 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: Problems with the server stalling out. Setting up debuging.
The issue was fixed. Sorry for not seeing the follow up. I switched to NGIX and everything works perfectly. Haven't seen this issue since. BR, Jason Brower On Sunday, February 2, 2014 8:14:21 PM UTC+2, Encompass solutions wrote: It seems that I have an issue I can't resolve. Every once in a while at seemingly the worst and most random times, the service will stall out. It simply doesn't respond to anything. Going into the computer and running htop shows that the computer is doing nothing. I am not running the server with a compiled version of my code. I am running: 2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Apache/2.2.22 (Ubuntu), Python 2.7.3) The application does only basic uploading and loading of a single item. Here is an example of the webplayer: melodigram.com/melodigram/default/gram/b662a1da-8c2b-11e3-b0dc-1231390a0101 I can run F5 reloads on the site for 15 minutes straight, not have anyone access the system then then try to load something, be it the admin interface or the page I show you here and it site for a very long time. The time it is unresponsive seems random, but that's because I haven't discovered how to replicate the problem. If I restart apache and try, it seems to work every time. This issue is very annoying and I seem to hit this kind of thing in many of the sites I am making and working on. We really need to figure out what is going on. I am running ubuntu 12.04 and set up the server using the scripts found in web2py for postgres and so forth. I am using postgres and the issue happens in both sqlite and postgres database setups. I can't seem to replicate the issue when running locally with rocket rather than apache. The amazon server is a Medium instance. I thought maybe it was because of the microinstance issues, but I seem to be wrong? Any ideas into this? Our app goes live next week and I really hope to resolve this issue. The server is currently stalling out and has actually stopped mid page. I have the htop running on the server on the right. Last, is how do you think I could setup the server to better see what is going on and solve the issue. It's really annoying knowing how simple my service is, but seeing how very slow or inresponsive the site is. BR, Jason Brower -- 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: Password feild type seems to save in plain text for me.
I was using the admin pages to add the value to the database. Interesting to ssee that SQLFORM was not used in the admin panel. BR, Jason On Tuesday, March 18, 2014 7:04:54 PM UTC+2, Encompass solutions wrote: I am trying to create a model with an encrypted key so it's harder for someone to maliciously screw over my customers. I have the following snippet. Field('public_gram', 'boolean', default=False), Field('tag_name', 'list:string'), Field('deletion_key', 'password') ) You can see there the deletion_key is a feild type password which I understand is hashed out so you can't get the original code. However, when I try to print it I get this... test CRYPT()(gram_details.deletion_key) (gluon.validators.LazyCrypt object at 0x7f56b8305c10, None) CRYPT()(gram_details.deletion_key) == gram_details.deletion_key False Where test is print gram_details.deletion_key If this is the case then my password is not very cryptic. Am I doing something wrong? BR, Jason Brower -- 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.