[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 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 ...

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 t

[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 : > Thank all for your replies... > PN i like you solution, I am going to try it and let you know if it > wo

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 : > 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 i

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 >: > >> I like the idea of tornado, I

[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: > > > Is this the supposed behavior or am I doing something wrong? > > The way I see it the output

[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 limitati

[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}} 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(

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 R

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 separa

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 : > 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,

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 >: > >> Well then I will have to watch it to the end i was a bit worried for not >> understanding the explanation

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

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" 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, ma

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" > escreveu: > >> I went through thev video... seems easy, unfortunately i cannot see the >> command for starti

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, 黄祥 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/web2p

[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) - https://code.google.com/p/web2py/i

[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 > appa

[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 mani

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 wrote: > Your desired behavior is that when a color is deleted it should be s

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

[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 s

[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 serve_co

[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 t

[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 alwa

[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 th

[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\web2py>python web2py.py Traceback (most recent call last): File "web2py.py", line 18, in 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 ('NoneType' object has no attribute 'myfile')

[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//bin/ > > run with: python /web2py.py -S paideia -M

[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 y

[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 /etc/nginx/site-

[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 crit

[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 = csv.reader(webpage

[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 Gro

[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 trivial

[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 trivial

[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 2014

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 : > I always have trouble upgrading from the Administrative Interface; it > always complains about permissions. This is under Linux. Is it because > web2py doesn't

[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 >> (asham

[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 > Pro

[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: 15

[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')) > > a

[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 (Documentatio

[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

[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

[web2py] Re: Voting system without users.

2014-03-21 Thread Encompass solutions
Thanks for the input. The site for viewing the grams are just webpages and votes are done from the web interface. I wasn't thinking correctly with how to store the items in the dictionary and I needed to add simple dictionary with the items they have voted for. So the problem is fixed. The ses

[web2py] Admin interface doesn't allow me to code very well from an android device.

2014-03-21 Thread Encompass solutions
When I try to view an admin page in my Android desktop it shows the mobile view. I have clicked the "Request desktop site." option and the admin interface is still returned in the mobile view. I don't like this view when I run in on my android desktop at III have a full hd screen. Addi

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

2014-03-21 Thread Simon Ashley
> > or if you're not restricted to Google Charts, output the data as json in a >> request from dc.js. If you're doing a bit of multidimensional analysis, it >> can be a nice solution. >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

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

2014-03-21 Thread weheh
Thanks PN and Dave. I neglected to mention that visiting a ticket just generates another ticket, so inspecting the error via the admin interface is a no go. I'll have to get at it some other way. I also neglected to mention that I had already performed the age-old ritual of deleting old sessi

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

2014-03-21 Thread weheh
+1 on PN's suggestion. That's how I do it. Works great. On Friday, March 21, 2014 5:25:47 AM UTC+8, 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