[web2py] Re: orderby first, then limitby

2011-06-09 Thread luifran
In sql, you can apply first order by and then limitby for example in Oracle: select * from (select * from table order by field) where rownum11//row 1 to 10 after order On 9 jun, 09:52, pbreit pbreitenb...@gmail.com wrote: I have a query that includes both orderby and limitby. What seems to

[web2py] Re: orderby first, then limitby

2011-06-09 Thread luifran
In DAL, I don´t know If this can be done. On 9 jun, 10:40, luifran lbernalhernan...@yahoo.es wrote: In sql, you can apply first order by and then limitby for example in Oracle: select * from (select * from table  order by field) where rownum11//row 1 to 10 after order On 9 jun, 09:52

[web2py] tables in pdf

2011-06-08 Thread luifran
Hi, I need build tables in pdf, but the length of content cell change and I need that autoresize this cell for the content fit to the cell. I tried pyfpdf with cell and appreport plugin but when the cell content is too long this content is out of the cell or the letter size is smaller. there is a

[web2py] Re: tables in pdf

2011-06-08 Thread luifran
How? can you explain to me? On 8 jun, 13:58, Ovidio Marinho ovidio...@gmail.com wrote: use css to render its tables or render tags html. Ovidio Marinho Falcao Neto              ovidio...@gmail.com                      88269088                    Paraiba-Brasil 2011/6/8 luifran

[web2py] Re: Deploying with default web2py server?

2011-05-30 Thread luifran
depends on the requirements of your system, but in principle the web2py development server is sufficient On 30 mayo, 21:58, ra3don ra3do...@gmail.com wrote: I apologize if this has already been answered somewhere. Are there any disadvantages to deploying using the default server that comes

[web2py] Visual Report Generator

2011-05-21 Thread luifran
I can use visual report generator with web2py? which?

[web2py] Re: class example on book

2011-05-21 Thread luifran
In the view must be for example {{=add}} On 21 mayo, 12:00, 黄祥 steve.van.chris...@gmail.com wrote: hi, is there any class example on book or appliances, so that i can learn from it? i've already tried the simple things what written on book, but got an error. do you have any hints or

[web2py] Re: class example on book

2011-05-21 Thread luifran
I put the following code and it works fine: === controller === class MyClass(object): z = 2 def __init__(self, a, b): self.x = a self.y = b def add(self): return self.x + self.y + self.z def index(): myinstance = MyClass(3, 4) add = myinstance.add()

[web2py] Crontab with WSGI

2011-05-13 Thread luifran
I tried the following with the test server and it works In crontab: 55 07 * * * root * default / limpiar_eventos In the default controller def limpiar_eventos (): totalFilas = db (db.auth_event.id 0). count () totalFilas if 30: for row in db (db.auth_event.id 0). select (limitby

[web2py] Re: Crontab with WSGI

2011-05-13 Thread luifran
http://127.0.0.1:8000/myapp/default/limpiar_eventos work fine in cherokee web server, and crontab work fine in web2py´s server but not in cherokee web server. On 13 mayo, 10:08, pbreit pbreitenb...@gmail.com wrote: Do you have those spaces in there? The cron line should be: 55 07 * * * root

[web2py] Re: Crontab with WSGI

2011-05-13 Thread luifran
No , only in web2py, not in cherokee. Where I write this code? 0-59/1 * * * * cd /var/web2py python web2py.py -C -D 1 /dev/null 21 On 13 mayo, 15:02, pbreit pbreitenb...@gmail.com wrote: I doubt it's a Cherokee problem. Do you have a crontab set up on your server? For example, this is what

[web2py] query

2011-05-10 Thread luifran
I have the following query: usuarios_in=db(db.auth_membership.user_id==db.auth_user.id).select(db.auth_user.username) #This show users in membership I have show users out of membership with the following query: usuarios_out=db(db.auth_membership.user_id!

[web2py] Re: Webgrid options

2011-05-09 Thread luifran
I did, deleting 'add_links' to grid.enabled_rows On 29 abr, 11:11, luifran lbernalhernan...@yahoo.es wrote: I'm usingWebGrid, but sometimes I just want to use it to show records, not to edit, delete,view,add ... With this line: grid.action_links = [ ],I remove edit, delete, and view

[web2py] Problem with Select OPtion

2011-05-09 Thread luifran
This work fine: def combo(): usuarios=db(db.auth_user.registration_key=='pending').select() form = (SELECT([OPTION(usuarios[0].username, _value=usuarios[0].id) for texto in usuarios],_name='combo')) return dict(form=form) This not work fine, does not appear the form: def combo():

[web2py] Re: Backup Database

2011-05-03 Thread luifran
What mechanisms? On 2 mayo, 23:20, howesc how...@umich.edu wrote: i'm a little old-skool and just use the database's backup mechanisms since they are slightly different from db to db, but in general faster to run than CSV dump and import. cfh

[web2py] Re: Backup Database

2011-05-03 Thread luifran
If I use import_from_csv_file and this fail, rollback is automatic? On 3 mayo, 14:59, luifran lbernalhernan...@yahoo.es wrote: What mechanisms? On 2 mayo, 23:20, howesc how...@umich.edu wrote: i'm a little old-skool and just use thedatabase'sbackupmechanisms since they are slightly

[web2py] Backup Database

2011-05-02 Thread luifran
How I can make backups of my database to restore in the future? I tried it with db.export_to_csv_file and db.import_from_csv_file, but does not work because as you read and introducing bellonging ignores the id fields and enter according to the sequence, then the relationships I have and that are

[web2py] Re: Backup Database

2011-05-02 Thread luifran
The problem is this, I have for example the following tables and records: db.define_table ('a ', Field ('name', 'string')) db.define_table ('b', Field ('name', 'string '), Field ('a ', db.a)) Table record's a: id- 1, name- 'name1' no id- 2 because such has been removed. id- 3, name- 'name3' Table

[web2py] Re: Backup Database

2011-05-02 Thread luifran
Is true, I have a other problem, I have a sqlite file.csv, and I want to import this file to mysql database and appears the following error: Cannot add or update a child row: a foreign key constraint fails (`sinrisk`.`auth_event`, CONSTRAINT `auth_event_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES

[web2py] Webgrid options

2011-04-29 Thread luifran
I'm using WebGrid, but sometimes I just want to use it to show records, not to edit, delete,view,add ... With this line: grid.action_links = [ ],I remove edit, delete, and view but not add records. Can I remove the option to add records?

[web2py] Re: submit forms to press the enter key

2011-04-15 Thread luifran
yes, my crud form has only two drop down list. On 15 abr, 00:29, Stifan Kristi steve.van.chris...@gmail.com wrote: is your focus is on the text area, check box or drop down list? best regards, steve van christie

[web2py] Re: submit forms to press the enter key

2011-04-14 Thread luifran
I will try to run on Windows XP and other browsers and I tell you. On 14 abr, 09:47, Stifan Kristi steve.van.chris...@gmail.com wrote: work fine for me on ubuntu 10.10 with chrome and firefox. On Thu, Apr 14, 2011 at 2:42 PM, luifran lbernalhernan...@yahoo.es wrote: My operating system

[web2py] Re: submit forms to press the enter key

2011-04-14 Thread luifran
by other tables. The truth is that I have no idea what happens. On Apr 14, 3:39 am, luifran lbernalhernan...@yahoo.es wrote: I will try to run on Windows XP and other browsers and I tell you. On 14 abr, 09:47, Stifan Kristi steve.van.chris...@gmail.com wrote: work fine for me on ubuntu 10.10

[web2py] Re: submit forms to press the enter key

2011-04-14 Thread luifran
I have not seen the behavior work on other web sites On Apr 14, 11:42 am, pbreit pbreitenb...@gmail.com wrote: Oh, yeah, if there is a drop-down, then I think the focus on it takes precedence. I'm not sure if there's a work-around. Have you seen the behavior work on other web sites?

[web2py] submit forms to press the enter key

2011-04-13 Thread luifran
How could submit the forms by pressing the enter key?

[web2py] Re: submit forms to press the enter key

2011-04-13 Thread luifran
With forms created with html helpers works, but crud forms not works, when you press the enter key nothing happens. On Apr 13, 12:25 pm, pbreit pbreitenb...@gmail.com wrote: The regular Web2py forms should already work like that. Are they not for you? What happens when you press 'enter'?

[web2py] Re: submit forms to press the enter key

2011-04-13 Thread luifran
', Field ('a ', db.a), Field ('b ', db.b)) crud.create (db.c) / / In this form the enter key does not work On 13 abr, 22:25, luifran lbernalhernan...@yahoo.es wrote: With forms created with html helpers works, but crud forms not works, when you press the enter key nothing happens. On Apr 13, 12:25

[web2py] Re: submit forms to press the enter key

2011-04-13 Thread luifran
My default browser is Firefox 4 On 13 abr, 23:05, Massimo Di Pierro massimo.dipie...@gmail.com wrote: which browser? On Apr 13, 3:52 pm, luifran lbernalhernan...@yahoo.es wrote: I have observed that in simple crud forms it works the enter key, but crud forms with references to other

[web2py] Re: Problem with JQuery Function

2011-04-11 Thread luifran
I want it to affect all the forms, I use crud forms, how I can put a id for the crud forms? On 11 abr, 00:38, pbreit pbreitenb...@gmail.com wrote: Possibly because you are binding to 'form'. You might want to make the bind more specific like this: form id=myform action=/home input name=a

[web2py] Re: Problem with JQuery Function

2011-04-10 Thread luifran
I was wrong to copy the code, is this: $ (function () { $ (form). bind (keypress, function (event) { if (event.keyCode == 13) { $ ('form'). submit () } }); }); But the problem is not there. On 10 abr, 03:05, pbreit

[web2py] Re: Problem with JQuery Function

2011-04-10 Thread luifran
I also work for me, but I stop working flash messages, calendars, tooltips, etc. I want to run everything. On 10 abr, 19:15, pbreit pbreitenb...@gmail.com wrote: But I think Web2py's standard buttons work like this without needing that extra code.

[web2py] Problem with JQuery Function

2011-04-09 Thread luifran
I entered in web2py_ajax.html the following code to submit the form by pressing the Enter key: $ (function () { $ (form). bind (keypress, function (event) { if (event.keyCode == 13) { $ ('form'). submit () } }); The

[web2py] Re: Restriction Fields

2011-03-30 Thread luifran
Thanks you, but I don´t know how to apply this to my model, is there any example? On 30 mar, 13:12, Anthony abasta...@gmail.com wrote: On Tuesday, March 29, 2011 1:33:40 PM UTC-4, luifran wrote: as I can do that? to insert into the table I use crud.create You can specify an onvalidation

[web2py] Re: Restriction Fields

2011-03-29 Thread luifran
, luifran lbernalhernan...@yahoo.es wrote: Thanks, I'll try that way On Mar 28, 8:59 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!= %s'% repr(request.vars.a))) On Mar 28, 10:37 am, luifran lbernalhernan

[web2py] Re: Restriction Fields

2011-03-29 Thread luifran
as I can do that? to insert into the table I use crud.create On Mar 29, 10:21 am, pbreit pbreitenb...@gmail.com wrote: I suspect you will need to use onvalidation in your controller and then query the db for both fields matching.

[web2py] Restriction Fields

2011-03-28 Thread luifran
I have the following table, for example: db.define_table ('t', Field ('a '), Field ('b')) I want to impose the following restriction, to avoid insertion of duplicate records not allow insertion of a pair of identical values (a y b)​​. How I can do this?, I know how to restrict a single field, but

[web2py] Re: Restriction Fields

2011-03-28 Thread luifran
Thanks, I'll try that way On Mar 28, 8:59 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!= %s'% repr(request.vars.a))) On Mar 28, 10:37 am, luifran lbernalhernan...@yahoo.es wrote: I have the following

[web2py] save file

2011-02-21 Thread luifran
I used the following code to open a O.S window, to open a file, form = FORM (INPUT (_type = 'file', _name = 'data'), INPUT (_type = 'submit')), but now I want the same to save a file, how I can do?

[web2py] show tables joined in jqgrid

2011-01-31 Thread luifran
I can display single table in jqgrid, but, how I can display joined tables in jqgrid?

[web2py] Re: show tables joined in jqgrid

2011-01-31 Thread luifran
I talk about the plugin jqgrid On 31 ene, 12:12, luifran lbernalhernan...@yahoo.es wrote: I can display single table in jqgrid, but, how I can display joined tables  in jqgrid?

[web2py] Modify calendar.js

2011-01-27 Thread luifran
I would like to change the calendar.js date format, I want the format d / m / y instead ofy / m / d ¿It´s possible?

[web2py] Value of the form field

2011-01-19 Thread luifran
When I extract the value of a form field, if I've written for example take helmet, I get the value of field `take_helmet, why? The code is as follows: form = FORM ('name risk', INPUT (_name = 'name1', required = [IS_NOT_EMPTY (), IS_UPPER ()]), 'preventive

[web2py] Re: Value of the form field

2011-01-19 Thread luifran
Thanks, I fixed it with the next code: redirect(URL('modificar_obra',vars=dict(a=form.vars.nombre))) On 19 ene, 11:19, Kenneth Lundström kenneth.t.lundst...@gmail.com wrote: If you look at form.vars.name1 before passing them via redirect you ll see that no replacing has been done, try with if

[web2py] Value of the form field

2011-01-18 Thread luifran
When I write two separate words in a form field, and extract the value of this field, every space appears the symbol '_', it causes me not match the field's value with the value of the database. How I can fix this? Thanks.

[web2py] problem with dal

2011-01-15 Thread luifran
db.define_table('actividades_riesgos',Field('actividades',db.actividades),Field('riesgos',db.riesgos)) actividad=db(db.actividades.nombre==request.args(0)).select(db.actividades. id) riesgo=db(db.riesgos.nombre==request.args(1)).select(db.riesgos.id) record =

[web2py] Re: problem with dal

2011-01-15 Thread luifran
, luifran lbernalhernan...@yahoo.es wrote: db.define_table('actividades_riesgos',Field('actividades',db.actividades),F ield('riesgos',db.riesgos)) actividad=db(db.actividades.nombre==request.args(0)).select(db.actividades. id) riesgo=db(db.riesgos.nombre==request.args(1)).select

[web2py] run web2py application in cheyenne web server

2010-08-11 Thread luifran
Is it possible to run a web2py application in Cheyenne web server?