[web2py] sqlform.grid custom single row view

2013-11-28 Thread Gael Princivalle
Hi. I've saw here how is it possible to customize a single row view from a sqlform.grid: https://groups.google.com/forum/#!search/single$20datable$20record$20formatting/web2py/jZ1nkcIUcKc/EpvAuAL_VXYJ What I don't know is how calling single row data. For example you have this sqlform.grid in the

[web2py] Re: web2py 2.8.1 is OUT

2013-11-28 Thread Tim Richardson
I confirm this, albeit I get it via the scheduler: /accpac_web_orders/default/monitor_jobs/view/scheduler_run/586 Traceback (most recent call last): File "d:\web2py2x\gluon\scheduler.py", line 218, in executor _env = env(a=a, c=c, import_models=True) File "d:\web2py2x\gluon\shell.py", line 134,

[web2py] Re: Model and Controller with Web2Py, View with Excel ??

2013-11-28 Thread Ykä Marjanen
I don't think you can use a web based application without a server. However, the local server is already there without additional installation, so if you want an application that has a browser interface, then you don't need to do any extra. You can use the webpy current architecture directly an

[web2py] Re: Very intersting article about a radio station & web2py

2013-11-28 Thread Ruud Schroen
Great story! I really like the part where he explains the solution for fetching random records in a large database. On Thursday, November 28, 2013 1:56:51 AM UTC+1, Massimo Di Pierro wrote: > > > http://www.reddit.com/r/Python/comments/1rlcwl/scaling_stereodose_a_web2py_internet_radio_station/ >

[web2py] Re: disk cache problem

2013-11-28 Thread szimszon
In 2.8.1 I still have a problem. Now another one too: Ticket ID 192.168.7.29.2013-11-28.11-31-21.11f4e653-5c83-4b57-8615-c88eba04fffd __len__() should return >= 0 Version web2py(tm) Version 2.8.1-stable+timestamp.2013.11.27.13.52.50 Traceback Traceback (most recent call last): File "/home/gys

[web2py] FORM / SQLFORM spinner

2013-11-28 Thread Gael Princivalle
Hi. I would like to had a quantity field in a form, controlled by a spinner. With a standard HTML form I can use some Jquery spinners, but if I would like to generate the form with FORM or SQLFORM, is it possible to associate a spinner to this input field ? Thanks. -- Resources: - http://web2

Re: [web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Javier Pepe
You can add cron job which sleep * * * * * sleep 0;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py * * * * * sleep 10;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py * * * * * sleep 20;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py *

[web2py] web2py 2.8.1 -> What would db().select().as_tree()? Has example?

2013-11-28 Thread Meir
Hello! Someone could inform the purpose and use of the db()select()as_tree()? -- 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 b

[web2py] Re: web2py 2.8.1 -> What would db().select().as_tree()? Has example?

2013-11-28 Thread LightDot
This was announced in this thread: https://groups.google.com/d/msg/web2py/bsGZ4lp-gz4/4olaBq6t7qQJ Regards On Thursday, November 28, 2013 12:26:28 PM UTC+1, Meir wrote: > > Hello! > > Someone could inform the purpose and use of the db()select()as_tree()? > -- Resources: - http://web2py.com - h

[web2py] Re: web2py 2.8.1 is OUT

2013-11-28 Thread Tim Richardson
It's due to the commit for issue 1760, according to my bisect. I'll update that issue. On Thursday, November 28, 2013 7:28:53 PM UTC+11, Tim Richardson wrote: > > I confirm error reported by Martin above: I get it via the scheduler: > > /accpac_web_orders/default/monitor_jobs/view/scheduler_run/

[web2py] Re: Form self-submit broken after redirection

2013-11-28 Thread Anthony
Can you attach a minimal app that reproduces the problem? -- 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 subscr

[web2py] Re: Model and Controller with Web2Py, View with Excel ??

2013-11-28 Thread Tim Richardson
Excel macros can retrieve data from websites, although built-in support is primitive (HTML or XML). So you'd use web2py as a webservice basically (as documented in the book). This is the quickest and dirtiest way, I think. Stackoverflow has example of fetching json via VBA. Then your spreadshe

[web2py] Re: sqlform.grid custom single row view

2013-11-28 Thread Massimo Di Pierro
{{if grid.view_form:}} # So here is my single row view # How can I call fields ? Like this: grid.view_form.record.code grid.view_form.record.description grid.view_form.record.brand grid.view_form.record.pdf_path {{else:}} {{=grid}} {{p

Re: [web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Massimo Di Pierro
Please use the scheduler, not cron. Cron must die. On Thursday, 28 November 2013 05:22:28 UTC-6, Javier Pepe wrote: > > You can add cron job which sleep > > * * * * * sleep > 0;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py > * * * * * sleep > 10;/usr/local/apps/web2py/

[web2py] Re: sqlform.grid custom single row view

2013-11-28 Thread Gael Princivalle
Thanks a lot Massimo, web2py for president. Ciao. Il giorno giovedì 28 novembre 2013 14:31:56 UTC+1, Massimo Di Pierro ha scritto: > > {{if grid.view_form:}} # So here is my single row view > # How can I call fields ? Like this: > grid.view_form.record.code > grid.

[web2py] Re: FORM / SQLFORM spinner

2013-11-28 Thread Ruud Schroen
You can still use SQLFORM, but have standard html inputs. Example: {{=form.custom.begin}} ..enter your html input here with attribute: *name**="NAME OF YOUR FIELD"* {{=form.custom.end}} You can find more info about custom forms here

[web2py] web2py 2.8.2 is OUT

2013-11-28 Thread Massimo Di Pierro
It is the same as 2.8.1 but fixes the two bugs which had been reported yesterday. Happy Thanksgiving. 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

Re: [web2py] web2py 2.8.2 is OUT

2013-11-28 Thread Martin Weissenboeck
Thanks, Massimo! My problem has gone, 2.8.2 works. 2013/11/28 Massimo Di Pierro > It is the same as 2.8.1 but fixes the two bugs which had been reported > yesterday. > > Happy Thanksgiving. > > Massimo > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http

[web2py] Add version number to include javascript files

2013-11-28 Thread Eric
Hi, This nice one-liner is adding a version number to css and js paths: response.static_version = true When including files like this: {{ response.files.append(URL('static','css/normalize.css')) }} With the compression option to true all the files in the sample above will be combined, sam

Re: [web2py] Re: FORM / SQLFORM spinner

2013-11-28 Thread Richard Vézina
Spin.js works well : http://fgnass.github.io/spin.js/ On Thu, Nov 28, 2013 at 9:02 AM, Ruud Schroen wrote: > You can still use SQLFORM, but have standard html inputs. > > Example: > > {{=form.custom.begin}} > > ..enter your html input here with attribute: *name**="NAME OF YOUR FIELD"* > > {{=f

[web2py] Re: FDB (firebird) adapter can't store blobs greater than 64k

2013-11-28 Thread Raul Monares
I think the solution is to use streamed blobs (from FDB documentation): # Insertion:cur.execute("insert into blob_test values (?)", (StringIO('abcdef'),)) # Retrieval using the "file-like" methods of BlobReader: cur.execute("select a from blob_test")cur.set_stream_blob('A') # Note the capital

[web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Leonel Câmara
Is the time critical? Do you have control/can program the server in the microcontroller? It seems to me as this should be reversed. Instead of you polling the microcontroller, the microcontroller should be sending you new data, either when it receives it or in batches. Terça-feira, 26 de Novem

Re: [web2py] Re: FORM / SQLFORM spinner

2013-11-28 Thread Niphlod
I think spinners that gael is referring to are not the ones generated by spin.js. I think he means "number spinners"... @gael: code your own widget, it's very easy to do so On Thursday, November 28, 2013 4:46:43 PM UTC+1, Richard wrote: > > Spin.js works well : > > http://fgnass.github.io/spin.

[web2py] Re: Add version number to include javascript files

2013-11-28 Thread Niphlod
nope, there isn't . a PR has been raised for this but has been turned down (for good reason) If you need static versioning for files not included in response.files use URL('static', '_1.2.3/js/example.js') BTW, let other tools compress and optimize your big chunk of javascript -- Resource

Re: [web2py] Re: Add version number to include javascript files

2013-11-28 Thread Eric Christiaanse
Okay, that's clear reaction and tip, tnx! I was thinking about the proposed solution, but many times I've found that Web2Py had build in solutions for my 'problems'. That's my I asked :) 2013/11/28 Niphlod > nope, there isn't . a PR has been raised for this but has been turned down > (for good

[web2py] Can't migate an App to a new WS2k8R2 box

2013-11-28 Thread Dick Schrauwen
I'm trying to migrate a web2py application to a new box. Source: WS2k8 http://gutsup.com = http://95.211.128.165/openbrief web2py: _w2p_246 using MySQL5.5 Target: WS2k8 R2 http://37.48.64.183 => welcome http://37.48.64.183/openbrief => crash _web2py281 mySQL 5.6 What did i do? I tr

Re: [web2py] Re: FORM / SQLFORM spinner

2013-11-28 Thread Gael Princivalle
Yes you're right Niphlod, I've made a number touch-spin modifying this number spinner: http://www.jqueryscript.net/form/Input-Number-Spinner-with-jQuery-Bootstrap-Spinner.html Thanks everybody with the Ruud answer I'm ok, works fine. Il giorno giovedì 28 novembre 2013 18:09:34 UTC+1, Niphlod ha

[web2py] request.user_agent().is_mobile

2013-11-28 Thread mr.freeze
Did request.user_agent() change from a Storage object to dict? request.user_agent().is_mobile is throwing errors for me on the latest bits (2.8.2): AttributeError: 'dict' object has no attribute 'is_mobile'. Happy Thanksgiving! -- Resources: - http://web2py.com - http://web2py.com/book (Docume

[web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread szimszon
I had that with 2.7.x too. I changed all my app to user_agent()['is_mobile'] :-o 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a következőt írta: > > Did request.user_agent() change from a Storage object to dict? > request.user_agent().is_mobile is throwing errors for me on

[web2py] Re: web2py 2.8.1 is OUT

2013-11-28 Thread Tim Richardson
To remove existing sessions try cleaning the application via the admin application. -- 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 mes

[web2py] Globals.py Bad Request

2013-11-28 Thread Leonardo Pires Felix
Sorry for my english. Hi there, i've this simple sqlform.grid: @auth.requires_membership("secretaria") def turmas(): campos = [db.alunos.id,db.alunos.nome,db.alunos.nome_responsavel,db. alunos.serie_turma] form = SQLFORM.grid(db.alunos,fields=campos,deletable=False,orderby= "alunos.nome")

Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread Massimiliano
Have you tried to delete sessions? On Thu, Nov 28, 2013 at 9:32 PM, szimszon wrote: > I had that with 2.7.x too. I changed all my app to > user_agent()['is_mobile'] :-o > > 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a > következőt írta: > >> Did request.user_agent() chang

Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread mr.freeze
Yes, same error unfortunately and request.user_agent() still returns a dict. I could swear it used to return a Storage object. On Thursday, November 28, 2013 3:26:10 PM UTC-6, Massimiliano wrote: > > Have you tried to delete sessions? > > > On Thu, Nov 28, 2013 at 9:32 PM, szimszon > > wrote: >

[web2py] Re: Model and Controller with Web2Py, View with Excel ??

2013-11-28 Thread Andrew Buchan
Hi, do you mean using the DAL without running a web server? If so, look at this http://www.web2py.com/AlterEgo/default/show/215 I reckon you could use that in combination with pyxll. If you're looking for another way, you *may* be able to use ExcelDNA ( https://exceldna.codeplex.com/) and create

Re: [web2py] Re: request.user_agent().is_mobile

2013-11-28 Thread Tim Richardson
To fix this, you need to clear sessions. The easiest way to do this is via the admin app. Find the application causing problems, and from the menu of actions per application, choose "Clean" This will fix the problem. On Friday, 29 November 2013 08:52:29 UTC+11, mr.freeze wrote: > > Yes, same e

[web2py] Re: web2py 2.8.1 is OUT

2013-11-28 Thread Massimo Di Pierro
It is fixed in 2.8.2 On Thursday, 28 November 2013 05:46:14 UTC-6, Tim Richardson wrote: > > It's due to the commit for issue 1760, according to my bisect. > I'll update that issue. > > > > On Thursday, November 28, 2013 7:28:53 PM UTC+11, Tim Richardson wrote: >> >> I confirm error reported by M

[web2py] Re: Globals.py Bad Request

2013-11-28 Thread Massimo Di Pierro
I think your action is missing a return value: @auth.requires_membership("secretaria") def turmas(): campos = [db.alunos.id,db.alunos.nome,db.alunos.nome_responsavel,db. alunos.serie_turma] form = SQLFORM.grid(db.alunos,fields=campos,deletable=False,orderby= "alunos.nome") return dict(

[web2py] Re: Creating a navigation bar

2013-11-28 Thread Massimo Di Pierro
You appear to be calling the action with .xml but the data returned by the action is not serializable in xml. On Thursday, 28 November 2013 17:19:24 UTC-6, isi_jca wrote: > > Hi!!! > > I visited of the following link: > > > http://my.safaribooksonline.com/book/programming/python/9781849515467/b