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

[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 = db((db.actividades_riesgos.actividade

[web2py] Re: problem with dal

2011-01-15 Thread luifran
Thank you, I've fixed it with: actividad_id=actividad[0].id riesgo_id=riesgo[0].id On 15 ene, 12:45, Massimo Di Pierro wrote: > perhaps > > (db.actividades_riesgos.riesgos==riesgo) > > should be > > (db.actividades_riesgos.riesgos==riesgo.first().id) > > On

[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] 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 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 form.accepts (request.var

[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] 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 wrote: > I can display single table in jqgrid, but, how I can display joined > tables  in jqgrid?

[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] 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 n

[web2py] Re: Restriction Fields

2011-03-28 Thread luifran
Thanks, I'll try that way On Mar 28, 8:59 am, Massimo Di Pierro 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 wrote: > > > > &

[web2py] Re: Restriction Fields

2011-03-29 Thread luifran
mar, 20:40, luifran wrote: > Thanks, I'll try that way > > On Mar 28, 8:59 am, Massimo Di Pierro > wrote: > > > > > > > > > db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!= > > %s'% repr

[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 wrote: > I suspect you will need to use "onvalidation" in your controller and then > query the db for both fields matching.

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

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

[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 wrote: > But I think Web2py's standard buttons work like this without needing that > extra code.

[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 wrote: > Possibly because you are binding to 'form'. You might want to make the bind > more specific like this: > > > > > >

[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 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
;FieldName', 'DateType')) db.define_table ('c', 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 wrote: > With forms created with html helpers works, but crud forms not

[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 wrote: > which browser? > > On Apr 13, 3:52 pm, luifran wrote: > > > > > > > > > I have observed that in simple crud forms it works the enter key, > > but crud forms with references to

[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 wrote: > work fine for me on ubuntu 10.10 with chrome and firefox. > > On Thu, Apr 14, 2011 at 2:42 PM, luifran wrote: > > My operating system is ubuntu 10.04 > > > On 13 a

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

2011-04-14 Thread luifran
ed by other tables. The truth is that I have no idea what happens. On Apr 14, 3:39 am, luifran wrote: > I will try to run on Windows XP and other browsers and I tell you. > > On 14 abr, 09:47, Stifan Kristi wrote: > > > > > > > > > work fine for me on ubuntu 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 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] 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 wrote: > is your focus is on the text area, check box or drop down list? > > best regards, > > steve van christie

[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] 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 n

[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' Ta

[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 `a

[web2py] Re: Backup Database

2011-05-03 Thread luifran
What mechanisms? On 2 mayo, 23:20, howesc 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 wrote: > What mechanisms? > > On 2 mayo, 23:20, howesc wrote: > > > > > > > > > i'm a little old-skool and just use thedatabase'sbackupmechanisms since

[web2py] Re: Webgrid options

2011-05-09 Thread luifran
I did, deleting 'add_links' to grid.enabled_rows On 29 abr, 11:11, luifran 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 b

[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] 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! =db.auth_user.id).select(db.auth_user.userna

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

[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 wrote: > Do you have those spaces in there? The cron line should be: > > 55 07 * * * root *default/limpiar_event

[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 2>&1 On 13 mayo, 15:02, pbreit wrote: > I doubt it's a Cherokee problem. Do you have a crontab set up on your > server? > > For example, this is what I have in my

[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, 黄祥 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 solutions? > thank you so much

[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] 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 wrote: > I apologize if this has already been answered somewhere. > > Are there any disadvantages to deploying using the default server that > comes with web2py?

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

[web2py] Re: tables in pdf

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

[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 rownum<11//row 1 to 10 after order On 9 jun, 09:52, pbreit wrote: > I have a query that includes both orderby and limitby. What seems to happen > is that the db

[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 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 rownum<11//row 1 to 10 after order > >