Re: [web2py] Re: Represent not working in details on Powertable

2011-01-27 Thread web2py noob
good job jclevy. i hope the fix for this could reach stable version soon. 2011/1/26 jclevy : > Bruno Rocha writes: > >> >> >> 2011/1/21 web2py noob >> >> >> >> bruno, what you say above is wrong. the workaround is: >> >> db.defi

Re: [web2py] Re: URL formation in CRUD

2011-01-27 Thread web2py noob
ref: http://web2py.com/book/default/chapter/07#CRUD crud.settings.controller = 'crm' 2011/1/27 Running Clam : > > If this isn't something anyone else has encountered, can anyone clue > me in as to how to start digging into this? > > I'm not sure whether to start with my own set-up (Windows, Vers

[web2py] Re: TypeError: is not JSON serializable

2011-01-26 Thread web2py noob
ping? On 26 ene, 13:05, web2py noob wrote: > I'm trying to list the db.table's content using > plugin_wiki.widget('jqgrid',table='table') but despite I put in > controller, view o in a wiki_page (with respective sintaxis for each) > I always get &qu

[web2py] TypeError: is not JSON serializable

2011-01-26 Thread web2py noob
I'm trying to list the db.table's content using plugin_wiki.widget('jqgrid',table='table') but despite I put in controller, view o in a wiki_page (with respective sintaxis for each) I always get "TypeError: is not JSON serializable". My db model was generated by the app_wizard. I have looked for

[web2py] Re: Represent not working in details on Powertable

2011-01-21 Thread web2py noob
bruno, as you say above is wrong. the workaround is: db.define_table('tablename', Field('fieldname',db.othertable, represent=lambda f: db.othertable[f].fieldname) ) best regards. On Jan 21, 2:15 pm, Bruno Rocha wrote: > It is a problem with SQLTABLE, detail tables is pure SQLTABLE, SOme peo

[web2py] Re: doesn't represents in a string format

2011-01-18 Thread web2py noob
I have to say that the represent=lambda x: db.stuff[x].name seems to works only for webgrid plugin, but not for jqgrid (plugin_wiki) nor SQLTABLE builtin function. it's this how is must be or is a bug?

[web2py] Re: doesn't represents in a string format

2011-01-18 Thread web2py noob
On 18 ene, 02:12, howesc wrote: > (...) Hi Howesc, If I understand well, as I put in the links, requires=[IS_NOT_EMPTY(),IS_IN_DB()] would not needed if I already defined the table as: db.define_table('table01', Field('name','string'), format='%(name)s' ) db.define_table('table02',

[web2py] Re: doesn't represents in a string format

2011-01-17 Thread web2py noob
On 17 ene, 16:19, web2py noob wrote: > can you help me with this, please? i can't find why > producto.subcategoria doesn't represents in a string format. > in jqgrid and sqltable shows the producto.subcategoria reference like > an integer and should be represented as %(no

[web2py] doesn't represents in a string format

2011-01-17 Thread web2py noob
can you help me with this, please? i can't find why producto.subcategoria doesn't represents in a string format. in jqgrid and sqltable shows the producto.subcategoria reference like an integer and should be represented as %(nombre)s, but it doesn't... am I forgeting something? my model: http://o

[web2py] Re: how to validate duplicity in a many to many table relationship?

2010-08-01 Thread web2py noob
.riesgo_id.requires=IS_IN_DB(db,'riesgo.id','% > (nobre)s', > > _and=IS_NOT_IN_DB(db(db.familia_riesgo.familia_id==request.vars.familia_id),'familia_riesgo.riesgo_id')) > > On Jul 29, 9:17 am, web2py noob wrote: > > > what can I do for that? &g

[web2py] Re: how to validate duplicity in a many to many table relationship?

2010-07-29 Thread web2py noob
what can I do for that? thanks in advance On 29 jul, 09:37, web2py noob wrote: > On 29 jul, 09:20, mdipierro wrote: > > > It depends on how you insert records in familia_risiego > > with crud.create(db.familia_riesgo) > > The models are like: > > db.defin

[web2py] Re: how to validate duplicity in a many to many table relationship?

2010-07-29 Thread web2py noob
On 29 jul, 09:20, mdipierro wrote: > It depends on how you insert records in familia_risiego > with crud.create(db.familia_riesgo) The models are like: db.define_table('familia',Field('ficha','string')) db.define_table('riesgo',Field('nombre','string')) db.define_table('familia_riesgo',

[web2py] how to validate duplicity in a many to many table relationship?

2010-07-29 Thread web2py noob
Hi, I have 3 tables: * db.familia * db.familia_riesgo * db.riesgo db.familia_riesgo has just familia.id and riesgo.id (the id of db.familia and db.riesgo). This is a many to many relationship between db.familia and db.riesgo tables. How can I validate that the same riesgo.id doesn't repeat f

[web2py] Re: ajax modal not working anymore with 1.81.5

2010-07-26 Thread web2py noob
hidden')) > > should have been > > DIV(LOAD(request.controller,request.function,args=request.args, >                      vars=dict(_ajax_add=field),ajax=True),_id='TB_%s' > % key,_class='hidden')) > > Please let me know if this fixes the problem. > &g

[web2py] ajax modal not working anymore with 1.81.5

2010-07-26 Thread web2py noob
Hi, I just tryied the same code with an old 1.80 web2py_src.zip I have and can affirm that the Ajax dropbox modal[1] for references doesn't work for me (and perhaps someone else) anymore with the last 1.81.5 update: Traceback (most recent call last): File "/home/dac/web2py/gluon/restricted.py",

[web2py] Re: request.post_vars

2010-07-22 Thread web2py noob
On 20 jul, 02:54, mdipierro wrote: > because the crud.create does accept inside therefore the form is > processed before you set form.vars.ficha. You can do insetad: > > controller1: > > form=crud.create(db.familia) > if form.accepts(request.vars,session): >     session.ficha=request.post_vars.fi

[web2py] request.post_vars

2010-07-19 Thread web2py noob
Hi! I'm trying to pass a variable between forms using just the post method but it still accepts the GET method. It's this possible? My code follows: controller1: form=crud.create(db.familia) if form.accepts(request.vars,session): redirect(URL(r=request,f='persona',vars=dict(ficha=request.