[web2py] Adding a Javascript Library

2014-03-21 Thread Haad Khan
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

[web2py] Re: Error when Inserting a new user programmatically with web2py, v2.4.6, TypeError: character mapping

2014-03-21 Thread Igor Miranda
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 --

Re: [web2py] Re: test post

2014-03-21 Thread Frank
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

[web2py] Re: Grid 2 list boxes first list box to restrict values in second

2014-03-21 Thread Massimo Di Pierro
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

[web2py] Re: Adding a Javascript Library

2014-03-21 Thread Massimo Di Pierro
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

Re: [web2py] Free web2py hosting for a free software web2py application

2014-03-21 Thread Philip Kilner
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

[web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread António Ramos
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread António Ramos
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

[web2py] Re: form.custom.begin doesn't add the form _class and other attributes

2014-03-21 Thread Leonel Câmara
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

[web2py] Re: form.custom.begin doesn't add the form _class and other attributes

2014-03-21 Thread Leonel Câmara
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

[web2py] Re: Grid 2 list boxes first list box to restrict values in second

2014-03-21 Thread 黄祥
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();

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread António Ramos
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread António Ramos
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread António Ramos
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

Re: [web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-21 Thread martzi
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

Re: [web2py] Re: Web2py on Koding.com

2014-03-21 Thread wuelfhis asuaje
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) -

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-21 Thread weheh
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) -

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-21 Thread PN
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

[web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-21 Thread PN
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',

[web2py] Re: Can the DAL produce pivot table query (for use with Google Charts Plugin)?

2014-03-21 Thread PN
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

Re: [web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-21 Thread Kablu®
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

Re: [web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-21 Thread PN
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...

[web2py] Re: please help testing windows and mac binary

2014-03-21 Thread Dave S
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

[web2py] before_update callback and sheduler

2014-03-21 Thread Carlos Cesar Caballero Díaz
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

[web2py] Nginx + Web2py

2014-03-21 Thread Federico Ferraro
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

[web2py] Re: Free web2py hosting for a free software web2py application

2014-03-21 Thread Massimo Di Pierro
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

[web2py] Scheduler Task

2014-03-21 Thread Adriano Chambel
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

[web2py] Re: Free web2py hosting for a free software web2py application

2014-03-21 Thread Андрей Генералов
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

[web2py] Unable to start web2py: No module named 'globals'

2014-03-21 Thread Deepak Pawar
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

[web2py] Re: uploading a csv file and read it with python module pandas

2014-03-21 Thread Gaston
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'

[web2py] Re: importing modules to test file using pytest

2014-03-21 Thread Mandar Vaze
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

[web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-03-21 Thread Gary Climacosa
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

Re: [web2py] Unable to start web2py: No module named 'globals'

2014-03-21 Thread Kiran Subbaraman
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

[web2py] Re: Free web2py hosting for a free software web2py application

2014-03-21 Thread pang
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

[web2py] Re: web2py 2.9.5 is OUT

2014-03-21 Thread keiser1080
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

[web2py] Re: Free web2py hosting for a free software web2py application

2014-03-21 Thread pang
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

[web2py] Creating a background task script on models, db is not defined.

2014-03-21 Thread Avi A
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 =

[web2py] Nginx + Web2py

2014-03-21 Thread Anthony
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

[web2py] Re: form.custom.begin doesn't add the form _class and other attributes

2014-03-21 Thread Anthony
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

[web2py] Re: form.custom.begin doesn't add the form _class and other attributes

2014-03-21 Thread Anthony
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

[web2py] Re: web2py 2.9.5 is OUT

2014-03-21 Thread horridohobbyist
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

Re: [web2py] Re: web2py 2.9.5 is OUT

2014-03-21 Thread Icham Achtir
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

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-21 Thread Dave S
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

[web2py] Re: Can the DAL produce pivot table query (for use with Google Charts Plugin)?

2014-03-21 Thread Tim Richardson
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

[web2py] Re: Problem w/ cpdb.py script

2014-03-21 Thread Scott Hunter
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:

[web2py] Re: uploading a csv file and read it with python module pandas

2014-03-21 Thread Anthony
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

[web2py] Re: Login form adittional fields

2014-03-21 Thread Leonel Câmara
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

[web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-03-21 Thread Encompass solutions
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

[web2py] Re: Password feild type seems to save in plain text for me.

2014-03-21 Thread Encompass solutions
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