[web2py] SQLFORM.grid columnas a mostrar

2011-11-02 Thread mmartinez
Hello list. My question is this, I have a join in my query to the database, you need to show the columns belonging to tables and routes accountcode, here is my code: left = (db.accountcode.on(db.llamados.id_accountcode==db.accountcode.id),db.rutaproveedor.on(db.llamados.id_rutaproveedor==db.rutap

[web2py] data as showing left to join sqlform.grid

2011-10-14 Thread mmartinez
Hi list I need to do is display data in a sqlform.grid where I have a query to a db with a left join. This is the code a = db.llamados b = db.accountcode.with_alias ('b') db.clientes.with_alias c = ('c') db.rutas.with_alias r = ('r') db.rutaproveedor.with_alias rp = ('rp') form.accepts if (reques

[web2py] join with SQLFORM.grid

2011-10-12 Thread mmartinez
Hello list my doubt is how I can create a list SQLForm.grid from this consultation that I make to the database dt1=datetime.datetime(*time.strptime(request.vars.desde,'%Y-%m-%d %H: %M:%S')[0:6]) dt2=datetime.datetime(*time.strptime(request.vars.hasta, '%Y-%m-%d %H: %M:%S')[0:6]) query =(a.dialst

[web2py] Update application without deleting tables

2011-05-06 Thread mmartinez
The problem I have is when I update an application, when loading the application with the changes I have to remove the tables auth_event, auth_group, auth_membership, auth_permission. My question is I have to do to avoid having to delete these tables, I am working with postgresql.

[web2py] DataTables plugin ordination

2011-01-26 Thread mmartinez
My question is this, as I do to sort in descending first columnade because the plugin shows me the sorted column in ascending order

[web2py] problem with web2py and plugin_datatables

2010-12-03 Thread mmartinez
Good afternoon: I'm using the plugin_datatable and I have an error by doing the following: the controller left=db.clientes.on(db.accountcode.id_clientes==db.clientes.id) rws=db().select(db.accountcode.ani, db.clientes.rsocial, left=left, orderby=db.clientes.rsocial) table=SQLTABLE(rws,trun

[web2py] help with view of rows

2010-12-02 Thread mmartinez
Good afternoon, everyone. My query is: I query the database controllers/default.py, is specifically left=db.clientes.on(db.accountcode.id_clientes==db.clientes.id) rows=db().select(db.accountcode.ani, db.clientes.rsocial, left=left, orderby=db.clientes.rsocial) If I print rows the result i

[web2py] Renaming a column in the database web2py?

2010-11-11 Thread mmartinez
Good afternoon, everyone. Well I need to do is to rename the name of a column web2py the sql, sql language-I would do as follows when: select animals as "Annex" from WHERE accountcode accountcode.id_clientes = session.cliente_id; and web2py do so: rows = db (db.accountcode.id_clientes == session

[web2py] Re: how to make a sql query with os.system

2010-07-13 Thread mmartinez
web2py to do so import os command="psql -U marcelo -c select call_inicio,call_duracion,call_timedura,call_num_destino,call_dialstatus,call_valor,call_ip from llamadas_moviles WHERE call_fecha >= '2010-7-5' and call_fecha <= '2010-7-11' order by call_inicio" chips > /var/www/downloads/ 13072010.csv

[web2py] how to make a sql query with os.system

2010-07-13 Thread mmartinez
the console is: psql -U marcelo -c "select call_inicio, call_duracion, call_timedura, call_num_destino, call_dialstatus, call_valor, call_ip from llamadas_moviles WHERE call_fecha >= '2010-7-5' and call_fecha <= '2010-7-11' order by call_inicio" chips > /var/www/downloads/ 13072010.csv as serious

[web2py] I can not update

2010-06-03 Thread mmartinez
Good afternoon, my question is this, there is a postgres sql query that does not work, I am doing the query q is: for r in rws: try: db.ratecltes.insert(id_rutas=r.rutas.id, id_clte=r.clientes.id, rate=r.rutaproveedor.valor) except: #