Re: [web2py] Re:
I found the answer in the book , like is usual db.define_table('diagnostico', Field('name','string'),format='%(name)s' ) It shows the name in every place where i have the diagnostico.id. I got my app running. Thanks everybody! On Wed, Nov 17, 2010 at 9:24 AM, Napoleon Moreno wrote: > I am sorry for insist in this but it is driving me crazy. > > If i can not use a join in GAE. How can i show the name of 'diagnostico' > table in an webgrid base on 'diagnostico_referencia' table. I tried with > webgrid and crud and it always show me the id's of the > 'diagnostico_referencia' table. > > Any advice about it? > > > > On Wed, Nov 17, 2010 at 6:57 AM, Napoleon Moreno wrote: > >> Good day >> >> The webgrid is showing the fields of 'diagnostico_referencia' table. I >> need that it shows the name field of the 'Diagnostico' table. I can not find >> a way to do it. It suppose to be used in GAE. >> >> Any advice about it >> Thanks a lot for your help >> >> >> On Wed, Nov 17, 2010 at 6:52 AM, Napoleon Moreno wrote: >> >>> Hi Villas >>> >>> It is that i need. Apparently there is not a way to do it with a crud. I >>> could use a sqlform. >>> >>> Thanks! >>> >>> >>> On Mon, Nov 15, 2010 at 7:16 PM, villas wrote: >>> >>>> Hi, >>>> I'm not sure, but I think Napoleon wants to save the id key of the >>>> 'master table' into the master_id field of the 'detail' table. >>>> I'm not sure how it works with crud. I would suggest that you use >>>> SQLFORM and set the field after form.accepts. Take a look at this >>>> link: >>>> >>>> http://www.web2pyslices.com/main/slices/take_slice/102 >>>> >>>> This is a short-cut way of linking tables, but notice how the id is >>>> set. >>>> Hope this helps. >>>> -D >>>> >>>> On Nov 15, 11:49 pm, "mr.freeze" wrote: >>>> > Sorry, I don't fully understand. You can email your app (with any >>>> > personal data removed) and I will take a closer look. >>>> > >>>> > On Nov 15, 5:02 pm, Napoleon Moreno wrote: >>>> > >>>> > > I am doing that. but the crud form does not the key value from the >>>> master >>>> > > table. ( or master page ). The user has to input the referencia >>>> value in the >>>> > > crud page. >>>> > >>>> > > db.define_table('referencia', >>>> > > Field('fecha_remision',' >>>> > >>>> > > > datetime') >>>> > > > ) >>>> > >>>> > > > db.define_table('diagnostico_referencia', >>>> > > > Field('diagnostico',db.diagnostico), >>>> > > > Field('referencia',db.referencia) >>>> > > > ) >>>> > >>>> > > > in the controler >>>> > > > >>>> > >>>> > > > grid = webgrid.WebGrid(crud) >>>> > > > grid.enabled_rows = ['add_links'] >>>> > > > grid.action_links = ['delete'] >>>> > > > grid.action_headers = [] >>>> > > > grid.crud_function = 'diagnostico_referencia' >>>> > >>>> > > >crud.settings.controller = 'default' >>>> > > >grid.datasource = >>>> > > > db(db.diagnostico_referencia.referencia==referencia_id).select() >>>> > > > return dict(form=form, grid=grid(),referencia=referencia_id) >>>> > >>>> > > > def diagnostico_referencia(): >>>> > > > crud.settings[request.args(0)+'_next'] = >>>> URL(r=request,f='referencia') >>>> > > > return dict(form=crud()) >>>> > >>>> > > > Is it posible that the form in diagnostico_referencia get the >>>> > > > referencia.id value from the controler in the addition form? >>>> > >>>> > > On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno < >>>> napoleo...@gmail.com>wrote: >>>> > >>>> > > > Th
Re: [web2py] Re:
I am sorry for insist in this but it is driving me crazy. If i can not use a join in GAE. How can i show the name of 'diagnostico' table in an webgrid base on 'diagnostico_referencia' table. I tried with webgrid and crud and it always show me the id's of the 'diagnostico_referencia' table. Any advice about it? On Wed, Nov 17, 2010 at 6:57 AM, Napoleon Moreno wrote: > Good day > > The webgrid is showing the fields of 'diagnostico_referencia' table. I need > that it shows the name field of the 'Diagnostico' table. I can not find a > way to do it. It suppose to be used in GAE. > > Any advice about it > Thanks a lot for your help > > > On Wed, Nov 17, 2010 at 6:52 AM, Napoleon Moreno wrote: > >> Hi Villas >> >> It is that i need. Apparently there is not a way to do it with a crud. I >> could use a sqlform. >> >> Thanks! >> >> >> On Mon, Nov 15, 2010 at 7:16 PM, villas wrote: >> >>> Hi, >>> I'm not sure, but I think Napoleon wants to save the id key of the >>> 'master table' into the master_id field of the 'detail' table. >>> I'm not sure how it works with crud. I would suggest that you use >>> SQLFORM and set the field after form.accepts. Take a look at this >>> link: >>> >>> http://www.web2pyslices.com/main/slices/take_slice/102 >>> >>> This is a short-cut way of linking tables, but notice how the id is >>> set. >>> Hope this helps. >>> -D >>> >>> On Nov 15, 11:49 pm, "mr.freeze" wrote: >>> > Sorry, I don't fully understand. You can email your app (with any >>> > personal data removed) and I will take a closer look. >>> > >>> > On Nov 15, 5:02 pm, Napoleon Moreno wrote: >>> > >>> > > I am doing that. but the crud form does not the key value from the >>> master >>> > > table. ( or master page ). The user has to input the referencia value >>> in the >>> > > crud page. >>> > >>> > > db.define_table('referencia', >>> > > Field('fecha_remision',' >>> > >>> > > > datetime') >>> > > > ) >>> > >>> > > > db.define_table('diagnostico_referencia', >>> > > > Field('diagnostico',db.diagnostico), >>> > > > Field('referencia',db.referencia) >>> > > > ) >>> > >>> > > > in the controler >>> > > > >>> > >>> > > > grid = webgrid.WebGrid(crud) >>> > > > grid.enabled_rows = ['add_links'] >>> > > > grid.action_links = ['delete'] >>> > > > grid.action_headers = [] >>> > > > grid.crud_function = 'diagnostico_referencia' >>> > >>> > > >crud.settings.controller = 'default' >>> > > >grid.datasource = >>> > > > db(db.diagnostico_referencia.referencia==referencia_id).select() >>> > > > return dict(form=form, grid=grid(),referencia=referencia_id) >>> > >>> > > > def diagnostico_referencia(): >>> > > > crud.settings[request.args(0)+'_next'] = >>> URL(r=request,f='referencia') >>> > > > return dict(form=crud()) >>> > >>> > > > Is it posible that the form in diagnostico_referencia get the >>> > > > referencia.id value from the controler in the addition form? >>> > >>> > > On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno < >>> napoleo...@gmail.com>wrote: >>> > >>> > > > Thansk for your answer >>> > >>> > > > I am doing that. but the crud form does not the key value from the >>> master >>> > > > table. ( or master page ) >>> > >>> > > > This is my code >>> > >>> > > > db.define_table('referencia', >>> > > > Field('fecha_remision','datetime') >>> > > > ) >>> > >>> > > > db.define_table('diagnostico_referencia', >>> > > > Field('diagnostico',db.diagnostico), >>> > > > Field('referencia',db.referencia) >>>
Re: [web2py] Re:
Good day The webgrid is showing the fields of 'diagnostico_referencia' table. I need that it shows the name field of the 'Diagnostico' table. I can not find a way to do it. It suppose to be used in GAE. Any advice about it Thanks a lot for your help On Wed, Nov 17, 2010 at 6:52 AM, Napoleon Moreno wrote: > Hi Villas > > It is that i need. Apparently there is not a way to do it with a crud. I > could use a sqlform. > > Thanks! > > > On Mon, Nov 15, 2010 at 7:16 PM, villas wrote: > >> Hi, >> I'm not sure, but I think Napoleon wants to save the id key of the >> 'master table' into the master_id field of the 'detail' table. >> I'm not sure how it works with crud. I would suggest that you use >> SQLFORM and set the field after form.accepts. Take a look at this >> link: >> >> http://www.web2pyslices.com/main/slices/take_slice/102 >> >> This is a short-cut way of linking tables, but notice how the id is >> set. >> Hope this helps. >> -D >> >> On Nov 15, 11:49 pm, "mr.freeze" wrote: >> > Sorry, I don't fully understand. You can email your app (with any >> > personal data removed) and I will take a closer look. >> > >> > On Nov 15, 5:02 pm, Napoleon Moreno wrote: >> > >> > > I am doing that. but the crud form does not the key value from the >> master >> > > table. ( or master page ). The user has to input the referencia value >> in the >> > > crud page. >> > >> > > db.define_table('referencia', >> > > Field('fecha_remision',' >> > >> > > > datetime') >> > > > ) >> > >> > > > db.define_table('diagnostico_referencia', >> > > > Field('diagnostico',db.diagnostico), >> > > > Field('referencia',db.referencia) >> > > > ) >> > >> > > > in the controler >> > > > >> > >> > > > grid = webgrid.WebGrid(crud) >> > > > grid.enabled_rows = ['add_links'] >> > > > grid.action_links = ['delete'] >> > > > grid.action_headers = [] >> > > > grid.crud_function = 'diagnostico_referencia' >> > >> > > >crud.settings.controller = 'default' >> > > >grid.datasource = >> > > > db(db.diagnostico_referencia.referencia==referencia_id).select() >> > > > return dict(form=form, grid=grid(),referencia=referencia_id) >> > >> > > > def diagnostico_referencia(): >> > > > crud.settings[request.args(0)+'_next'] = >> URL(r=request,f='referencia') >> > > > return dict(form=crud()) >> > >> > > > Is it posible that the form in diagnostico_referencia get the >> > > > referencia.id value from the controler in the addition form? >> > >> > > On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno < >> napoleo...@gmail.com>wrote: >> > >> > > > Thansk for your answer >> > >> > > > I am doing that. but the crud form does not the key value from the >> master >> > > > table. ( or master page ) >> > >> > > > This is my code >> > >> > > > db.define_table('referencia', >> > > > Field('fecha_remision','datetime') >> > > > ) >> > >> > > > db.define_table('diagnostico_referencia', >> > > > Field('diagnostico',db.diagnostico), >> > > > Field('referencia',db.referencia) >> > > > ) >> > >> > > > in the controler >> > > > >> > >> > > > grid = webgrid.WebGrid(crud) >> > > > grid.enabled_rows = ['add_links'] >> > > > grid.action_links = ['delete'] >> > > > grid.action_headers = [] >> > > > grid.crud_function = 'diagnostico_referencia' >> > >> > > >crud.settings.controller = 'default' >> > > >grid.datasource = >> > > > db(db.diagnostico_referencia.referencia==referencia_id).select() >> > > > return dict(form=form, grid=grid(),referencia=referencia_id) >> > >> > > > def diagnostico_referencia(): >> > > > crud.settings[request.args(0)+'_next'] = >> URL(r=request,f='referencia') >> > > > return dict(form=crud()) >> > >> > > > Is it posible that the form in diagnostico_referencia the >> referencia.idvalue from the controler in the addition form? >> > >> > > > On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze >> wrote: >> > >> > > >> You need to expose crud through a controller. In default.py, put >> this: >> > >> > > >> def data(): >> > > >>return dict(form=crud()) >> > >> > > >> Then set the grid accordingly: >> > > >> grid.crud_function = 'data' >> > >> > > >> On Nov 15, 4:15 pm, Napoleon Moreno wrote: >> > > >> > Good afternoon >> > >> > > >> > I am trying to use webgrid in a master- detail form. >> > >> > > >> > But i can't find the way to link the crud with the master form. >> > >> > > >> > any body knows how to do it? >> > >> > > >> > Thansk >> > >> > >> > >
Re: [web2py] Re:
Hi Villas It is that i need. Apparently there is not a way to do it with a crud. I could use a sqlform. Thanks! On Mon, Nov 15, 2010 at 7:16 PM, villas wrote: > Hi, > I'm not sure, but I think Napoleon wants to save the id key of the > 'master table' into the master_id field of the 'detail' table. > I'm not sure how it works with crud. I would suggest that you use > SQLFORM and set the field after form.accepts. Take a look at this > link: > > http://www.web2pyslices.com/main/slices/take_slice/102 > > This is a short-cut way of linking tables, but notice how the id is > set. > Hope this helps. > -D > > On Nov 15, 11:49 pm, "mr.freeze" wrote: > > Sorry, I don't fully understand. You can email your app (with any > > personal data removed) and I will take a closer look. > > > > On Nov 15, 5:02 pm, Napoleon Moreno wrote: > > > > > I am doing that. but the crud form does not the key value from the > master > > > table. ( or master page ). The user has to input the referencia value > in the > > > crud page. > > > > > db.define_table('referencia', > > > Field('fecha_remision',' > > > > > > datetime') > > > > ) > > > > > > db.define_table('diagnostico_referencia', > > > > Field('diagnostico',db.diagnostico), > > > > Field('referencia',db.referencia) > > > > ) > > > > > > in the controler > > > > > > > > > > grid = webgrid.WebGrid(crud) > > > > grid.enabled_rows = ['add_links'] > > > > grid.action_links = ['delete'] > > > > grid.action_headers = [] > > > > grid.crud_function = 'diagnostico_referencia' > > > > > >crud.settings.controller = 'default' > > > >grid.datasource = > > > > db(db.diagnostico_referencia.referencia==referencia_id).select() > > > > return dict(form=form, grid=grid(),referencia=referencia_id) > > > > > > def diagnostico_referencia(): > > > > crud.settings[request.args(0)+'_next'] = > URL(r=request,f='referencia') > > > > return dict(form=crud()) > > > > > > Is it posible that the form in diagnostico_referencia get the > > > > referencia.id value from the controler in the addition form? > > > > > On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno >wrote: > > > > > > Thansk for your answer > > > > > > I am doing that. but the crud form does not the key value from the > master > > > > table. ( or master page ) > > > > > > This is my code > > > > > > db.define_table('referencia', > > > > Field('fecha_remision','datetime') > > > > ) > > > > > > db.define_table('diagnostico_referencia', > > > > Field('diagnostico',db.diagnostico), > > > > Field('referencia',db.referencia) > > > > ) > > > > > > in the controler > > > > > > > > > > grid = webgrid.WebGrid(crud) > > > > grid.enabled_rows = ['add_links'] > > > > grid.action_links = ['delete'] > > > > grid.action_headers = [] > > > > grid.crud_function = 'diagnostico_referencia' > > > > > >crud.settings.controller = 'default' > > > >grid.datasource = > > > > db(db.diagnostico_referencia.referencia==referencia_id).select() > > > > return dict(form=form, grid=grid(),referencia=referencia_id) > > > > > > def diagnostico_referencia(): > > > > crud.settings[request.args(0)+'_next'] = > URL(r=request,f='referencia') > > > > return dict(form=crud()) > > > > > > Is it posible that the form in diagnostico_referencia the > referencia.idvalue from the controler in the addition form? > > > > > > On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze > wrote: > > > > > >> You need to expose crud through a controller. In default.py, put > this: > > > > > >> def data(): > > > >>return dict(form=crud()) > > > > > >> Then set the grid accordingly: > > > >> grid.crud_function = 'data' > > > > > >> On Nov 15, 4:15 pm, Napoleon Moreno wrote: > > > >> > Good afternoon > > > > > >> > I am trying to use webgrid in a master- detail form. > > > > > >> > But i can't find the way to link the crud with the master form. > > > > > >> > any body knows how to do it? > > > > > >> > Thansk > > > > >
Re: [web2py] Re:
Good night 1) Another problem that i have is that the webgrid show me the id's of the diagnostico_referencia table. I need that it shows the name of the 'diagnostico' table. It could be done with a join, but it is intended to be deploy in GAE. I understand that GAE does not work with joins. 2) I am not sure if i am expressing well. I need that the crud page inheritance the foreing key from the master page. In order that the user has not to write the referencia.id value in the crud page Thansk for any advice. Napoleon db.define_table('diagnostico', Field('name','string') ) db.define_table('referencia', Field('fecha_remision',' datetime') . ) db.define_table('diagnostico_referencia', Field('diagnostico',db.diagnostico), Field('referencia',db.referencia) ) # The controler show the fields of 'referencia' . I use the referencia.id to filter to grid.datasource form = sqlform(db.referencia.id = = referencia_id).select() grid = webgrid.WebGrid(crud) grid.enabled_rows = ['add_links'] grid.action_links = ['delete'] grid.action_headers = [] grid.crud_function = 'diagnostico_referencia' crud.settings.controller = 'default' grid.datasource = db(db.diagnostico_referencia.referencia==referencia_id).select() return dict(form=form, grid=grid()) On Mon, Nov 15, 2010 at 6:15 PM, Napoleon Moreno wrote: > Good afternoon > > I am not sure if i am expressing well. I need that the crud page inheritance > the foreing key from the master page. In order that the user has not to > write the referencia.id value in the crud page > > Thanks > > > On Mon, Nov 15, 2010 at 6:02 PM, Napoleon Moreno wrote: > >> I am doing that. but the crud form does not the key value from the master >> table. ( or master page ). The user has to input the referencia value in the >> crud page. >> >> >> db.define_table('referencia', >> Field('fecha_remision',' >> >>> datetime') >>> ) >>> >>> db.define_table('diagnostico_referencia', >>> Field('diagnostico',db.diagnostico), >>> Field('referencia',db.referencia) >>> ) >>> >>> in the controler >>> >>> >>> grid = webgrid.WebGrid(crud) >>> grid.enabled_rows = ['add_links'] >>> grid.action_links = ['delete'] >>> grid.action_headers = [] >>> grid.crud_function = 'diagnostico_referencia' >>> >>>crud.settings.controller = 'default' >>> grid.datasource = >>> db(db.diagnostico_referencia.referencia==referencia_id).select() >>> return dict(form=form, grid=grid(),referencia=referencia_id) >>> >>> >>> def diagnostico_referencia(): >>> crud.settings[request.args(0)+'_next'] = >>> URL(r=request,f='referencia') >>> return dict(form=crud()) >>> >>> Is it posible that the form in diagnostico_referencia get the >>> referencia.id value from the controler in the addition form? >> >> >> >> On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno wrote: >> >>> Thansk for your answer >>> >>> I am doing that. but the crud form does not the key value from the >>> master table. ( or master page ) >>> >>> This is my code >>> >>> db.define_table('referencia', >>> Field('fecha_remision','datetime') >>> ) >>> >>> db.define_table('diagnostico_referencia', >>> Field('diagnostico',db.diagnostico), >>> Field('referencia',db.referencia) >>> ) >>> >>> in the controler >>> >>> >>> grid = webgrid.WebGrid(crud) >>> grid.enabled_rows = ['add_links'] >>> grid.action_links = ['delete'] >>> grid.action_headers = [] >>> grid.crud_function = 'diagnostico_referencia' >>> >>>crud.settings.controller = 'default' >>>grid.datasource = >>> db(db.diagnostico_referencia.referencia==referencia_id).select() >>> return dict(form=form, grid=grid(),referencia=referencia_id) >>> >>> >>> def diagnostico_referencia(): >>> crud.settings[request.args(0)+'_next'] = >>> URL(r=request,f='referencia') >>> return dict(form=crud()) >>> >>> Is it posible that the form in diagnostico_referencia the >>> referencia.id value from the controler in the addition form? >>> >>> >>> On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze wrote: >>> >>>> You need to expose crud through a controller. In default.py, put this: >>>> >>>> def data(): >>>>return dict(form=crud()) >>>> >>>> Then set the grid accordingly: >>>> grid.crud_function = 'data' >>>> >>>> On Nov 15, 4:15 pm, Napoleon Moreno wrote: >>>> > Good afternoon >>>> > >>>> > I am trying to use webgrid in a master- detail form. >>>> > >>>> > But i can't find the way to link the crud with the master form. >>>> > >>>> > any body knows how to do it? >>>> > >>>> > Thansk >>>> >>> >>> >> >
Re: [web2py] Re:
Good afternoon I am not sure if i am expressing well. I need that the crud page inheritance the foreing key from the master page. In order that the user has not to write the referencia.id value in the crud page Thanks On Mon, Nov 15, 2010 at 6:02 PM, Napoleon Moreno wrote: > I am doing that. but the crud form does not the key value from the master > table. ( or master page ). The user has to input the referencia value in the > crud page. > > > db.define_table('referencia', > Field('fecha_remision',' > >> datetime') >> ) >> >> db.define_table('diagnostico_referencia', >> Field('diagnostico',db.diagnostico), >> Field('referencia',db.referencia) >> ) >> >> in the controler >> >> >> grid = webgrid.WebGrid(crud) >> grid.enabled_rows = ['add_links'] >> grid.action_links = ['delete'] >> grid.action_headers = [] >> grid.crud_function = 'diagnostico_referencia' >> >>crud.settings.controller = 'default' >>grid.datasource = >> db(db.diagnostico_referencia.referencia==referencia_id).select() >> return dict(form=form, grid=grid(),referencia=referencia_id) >> >> >> def diagnostico_referencia(): >> crud.settings[request.args(0)+'_next'] = URL(r=request,f='referencia') >> return dict(form=crud()) >> >> Is it posible that the form in diagnostico_referencia get the >> referencia.id value from the controler in the addition form? > > > > On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno wrote: > >> Thansk for your answer >> >> I am doing that. but the crud form does not the key value from the master >> table. ( or master page ) >> >> This is my code >> >> db.define_table('referencia', >> Field('fecha_remision','datetime') >> ) >> >> db.define_table('diagnostico_referencia', >> Field('diagnostico',db.diagnostico), >> Field('referencia',db.referencia) >> ) >> >> in the controler >> >> >> grid = webgrid.WebGrid(crud) >> grid.enabled_rows = ['add_links'] >> grid.action_links = ['delete'] >> grid.action_headers = [] >> grid.crud_function = 'diagnostico_referencia' >> >>crud.settings.controller = 'default' >>grid.datasource = >> db(db.diagnostico_referencia.referencia==referencia_id).select() >> return dict(form=form, grid=grid(),referencia=referencia_id) >> >> >> def diagnostico_referencia(): >> crud.settings[request.args(0)+'_next'] = URL(r=request,f='referencia') >> return dict(form=crud()) >> >> Is it posible that the form in diagnostico_referencia the >> referencia.idvalue from the controler in the addition form? >> >> >> On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze wrote: >> >>> You need to expose crud through a controller. In default.py, put this: >>> >>> def data(): >>>return dict(form=crud()) >>> >>> Then set the grid accordingly: >>> grid.crud_function = 'data' >>> >>> On Nov 15, 4:15 pm, Napoleon Moreno wrote: >>> > Good afternoon >>> > >>> > I am trying to use webgrid in a master- detail form. >>> > >>> > But i can't find the way to link the crud with the master form. >>> > >>> > any body knows how to do it? >>> > >>> > Thansk >>> >> >> >
Re: [web2py] Re:
I am doing that. but the crud form does not the key value from the master table. ( or master page ). The user has to input the referencia value in the crud page. db.define_table('referencia', Field('fecha_remision',' > > datetime') > ) > > db.define_table('diagnostico_referencia', > Field('diagnostico',db.diagnostico), > Field('referencia',db.referencia) > ) > > in the controler > > > grid = webgrid.WebGrid(crud) > grid.enabled_rows = ['add_links'] > grid.action_links = ['delete'] > grid.action_headers = [] > grid.crud_function = 'diagnostico_referencia' > >crud.settings.controller = 'default' >grid.datasource = > db(db.diagnostico_referencia.referencia==referencia_id).select() > return dict(form=form, grid=grid(),referencia=referencia_id) > > > def diagnostico_referencia(): > crud.settings[request.args(0)+'_next'] = URL(r=request,f='referencia') > return dict(form=crud()) > > Is it posible that the form in diagnostico_referencia get the > referencia.id value from the controler in the addition form? On Mon, Nov 15, 2010 at 5:59 PM, Napoleon Moreno wrote: > Thansk for your answer > > I am doing that. but the crud form does not the key value from the master > table. ( or master page ) > > This is my code > > db.define_table('referencia', > Field('fecha_remision','datetime') > ) > > db.define_table('diagnostico_referencia', > Field('diagnostico',db.diagnostico), > Field('referencia',db.referencia) > ) > > in the controler > > > grid = webgrid.WebGrid(crud) > grid.enabled_rows = ['add_links'] > grid.action_links = ['delete'] > grid.action_headers = [] > grid.crud_function = 'diagnostico_referencia' > >crud.settings.controller = 'default' >grid.datasource = > db(db.diagnostico_referencia.referencia==referencia_id).select() > return dict(form=form, grid=grid(),referencia=referencia_id) > > > def diagnostico_referencia(): > crud.settings[request.args(0)+'_next'] = URL(r=request,f='referencia') > return dict(form=crud()) > > Is it posible that the form in diagnostico_referencia the > referencia.idvalue from the controler in the addition form? > > > On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze wrote: > >> You need to expose crud through a controller. In default.py, put this: >> >> def data(): >>return dict(form=crud()) >> >> Then set the grid accordingly: >> grid.crud_function = 'data' >> >> On Nov 15, 4:15 pm, Napoleon Moreno wrote: >> > Good afternoon >> > >> > I am trying to use webgrid in a master- detail form. >> > >> > But i can't find the way to link the crud with the master form. >> > >> > any body knows how to do it? >> > >> > Thansk >> > >
Re: [web2py] Re:
Thansk for your answer I am doing that. but the crud form does not the key value from the master table. ( or master page ) This is my code db.define_table('referencia', Field('fecha_remision','datetime') ) db.define_table('diagnostico_referencia', Field('diagnostico',db.diagnostico), Field('referencia',db.referencia) ) in the controler grid = webgrid.WebGrid(crud) grid.enabled_rows = ['add_links'] grid.action_links = ['delete'] grid.action_headers = [] grid.crud_function = 'diagnostico_referencia' crud.settings.controller = 'default' grid.datasource = db(db.diagnostico_referencia.referencia==referencia_id).select() return dict(form=form, grid=grid(),referencia=referencia_id) def diagnostico_referencia(): crud.settings[request.args(0)+'_next'] = URL(r=request,f='referencia') return dict(form=crud()) Is it posible that the form in diagnostico_referencia the referencia.idvalue from the controler in the addition form? On Mon, Nov 15, 2010 at 5:26 PM, mr.freeze wrote: > You need to expose crud through a controller. In default.py, put this: > > def data(): > return dict(form=crud()) > > Then set the grid accordingly: > grid.crud_function = 'data' > > On Nov 15, 4:15 pm, Napoleon Moreno wrote: > > Good afternoon > > > > I am trying to use webgrid in a master- detail form. > > > > But i can't find the way to link the crud with the master form. > > > > any body knows how to do it? > > > > Thansk >
[web2py] webgrid in a master -detail form
On Mon, Nov 15, 2010 at 5:15 PM, Napoleon Moreno wrote: > Good afternoon > > I am trying to use webgrid in a master- detail form. > > But i can't find the way to link the crud with the master form. > > any body knows how to do it? > > Thansk >
[web2py]
Good afternoon I am trying to use webgrid in a master- detail form. But i can't find the way to link the crud with the master form. any body knows how to do it? Thansk
[web2py] Re: jqgrid with drowdown list
Good night I currently could make a basic grid using the plugin_jqgrid or the plugin_editable_jqgrid. But i need include a drowndown list in a cell of the grid and the options to add or delete a line. Thanks for any advice. Napoleon On Sun, Nov 14, 2010 at 6:20 PM, Napoleon Moreno wrote: > Good night. > > I am starting with jqgrid and i need a litle grid with a drowndonw list, > and in line edit. Options to add a line and delele a line. It looks a bit > complicated to me, I wonder if someone has something to start to work on it > > Thanks >
[web2py] jqgrid with drowdown list
Good night. I am starting with jqgrid and i need a litle grid with a drowndonw list, and in line edit. Options to add a line and delele a line. It looks a bit complicated to me, I wonder if someone has something to start to work on it Thanks
Re: [web2py] Re: keeping the data inserted in the sql form after submit.
Easy! thanks a lot! On Sat, Nov 13, 2010 at 9:23 AM, villas wrote: > Hi Napoleon > > Yes, look up 'keepvalues' in this chapter of the book. > http://www.web2py.com/book/default/chapter/07 > > -D > > On Nov 13, 1:52 pm, Napoleon Moreno wrote: > > Good day. > > > > Is it posible keep the data in the form AFTER the submit. > > > > It is show me a new form. I need the inserted data continue in the form. > > > > Is it posible? > > > > Thanks >
[web2py] keeping the data inserted in the sql form after submit.
Good day. Is it posible keep the data in the form AFTER the submit. It is show me a new form. I need the inserted data continue in the form. Is it posible? Thanks
Re: [web2py] facebook apps
Thanks a lot for your help. It is working well now. I was working in ubuntu 10.4 lucid lynx. it comes with python2.6 by default! I wonder why i had not problems with it until now. best regard Napoleon On Mon, Oct 18, 2010 at 5:25 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > wrong url... > > correct one: > http://code.google.com/intl/it-IT/appengine/docs/python/overview.html > > 2010/10/18 Michele Comitini : > > > http://code.google.com/intl/it-IT//docs/python/gettingstarted/devenvironment.html > > > > you need python2.5 > > > > > > > > 2010/10/18 Napoleon Moreno : > >> I tried to install it > >> > >> It answers: > >> > >> "This extension should not be used with Python 2.6 or later (already > built > >> in), and has not been tested with Python 2.3.4 or earlier." > >> > >> It looks like it is currently installed > >> > >> In the console of python i could import ssl > >> > >> I am working with the release: "1.3.7" of GAE Sandbox. > >> > >> Any idea ? I really apreciate any help, I need to go to production as > soon > >> as posible. > >> > >> Thanks! > >> > >> > >> > >> On Mon, Oct 18, 2010 at 4:16 PM, Michele Comitini > >> wrote: > >>> > >>> The import was just to test if your application was able to import the > >>> "ssl" module. > >>> > >>> Since it does not work it is not installed, see here: > >>> > >>> http://pypi.python.org/pypi/ssl/1.15 > >>> > >>> install it in your python (the python you use for GAE) and try again! > >>> > >>> mic > >>> > >>> > >>> 2010/10/18 Napoleon Moreno : > >>> > Thanks for your answer. > >>> > > >>> > where should i import ssl? > >>> > > >>> > I am try in db.py and the facebook.py. it does not work. > >>> > > >>> > best regards > >>> > Napoleon > >>> > > >>> > On Mon, Oct 18, 2010 at 2:12 PM, Michele Comitini > >>> > wrote: > >>> >> > >>> >> That error is usually because you are using a python version that > does > >>> >> not find the ssl module. > >>> >> > >>> >> in your GAE env try the following: > >>> >> > >>> >> > >>> >> import ssl > >>> >> > >>> >> mic > >>> >> > >>> >> > >>> >> 2010/10/18 Napoleon Moreno : > >>> >> > Good day > >>> >> > > >>> >> > Thanks a lot for share this code. > >>> >> > > >>> >> > It works well in my local sqlite environment. > >>> >> > > >>> >> > I can't make it work in my local GAE. > >>> >> > > >>> >> > It looks like it makes the authentication in facebook , but when > it > >>> >> > returns > >>> >> > it raise the error in P.D > >>> >> > > >>> >> > Best regard > >>> >> > Napoleon > >>> >> > > >>> >> > Traceback (most recent call last): > >>> >> > File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line > >>> >> > 188, > >>> >> > in > >>> >> > restricted > >>> >> > exec ccode in environment > >>> >> > File > >>> >> > > >>> >> > > >>> >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > >>> >> > line 312, in > >>> >> > File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line > 96, > >>> >> > in > >>> >> > > >>> >> > self._caller = lambda f: f() > >>> >> > File > >>> >> > > >>> >> > > >>> >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > >>> >> > line 291, in user > >>> >> > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line >
Re: [web2py] facebook apps
I tried to install it It answers: "This extension should not be used with Python 2.6 or later (already built in), and has not been tested with Python 2.3.4 or earlier." It looks like it is currently installed In the console of python i could import ssl I am working with the release: "1.3.7" of GAE Sandbox. Any idea ? I really apreciate any help, I need to go to production as soon as posible. Thanks! On Mon, Oct 18, 2010 at 4:16 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > The import was just to test if your application was able to import the > "ssl" module. > > Since it does not work it is not installed, see here: > > http://pypi.python.org/pypi/ssl/1.15 > > install it in your python (the python you use for GAE) and try again! > > mic > > > 2010/10/18 Napoleon Moreno : > > Thanks for your answer. > > > > where should i import ssl? > > > > I am try in db.py and the facebook.py. it does not work. > > > > best regards > > Napoleon > > > > On Mon, Oct 18, 2010 at 2:12 PM, Michele Comitini > > wrote: > >> > >> That error is usually because you are using a python version that does > >> not find the ssl module. > >> > >> in your GAE env try the following: > >> > >> > >> import ssl > >> > >> mic > >> > >> > >> 2010/10/18 Napoleon Moreno : > >> > Good day > >> > > >> > Thanks a lot for share this code. > >> > > >> > It works well in my local sqlite environment. > >> > > >> > I can't make it work in my local GAE. > >> > > >> > It looks like it makes the authentication in facebook , but when it > >> > returns > >> > it raise the error in P.D > >> > > >> > Best regard > >> > Napoleon > >> > > >> > Traceback (most recent call last): > >> > File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line > 188, > >> > in > >> > restricted > >> > exec ccode in environment > >> > File > >> > > >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > >> > line 312, in > >> > File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in > >> > > >> > self._caller = lambda f: f() > >> > File > >> > > >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > >> > line 291, in user > >> > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1023, in > >> > __call__ > >> > return self.login() > >> > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1462, in > >> > login > >> > cas_user = cas.get_user() > >> > File > >> > "/home/napoleon/triviaapp/web2py/applications/welcome/models/db.py", > >> > line 119, in get_user > >> > user = self.graph.get_object("me") > >> > File > >> > > >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", > >> > line 96, in get_object > >> > return self.request(id, args) > >> > File > >> > > >> > > "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", > >> > line 180, in request > >> > urllib.urlencode(args), post_data) > >> > File "/usr/lib/python2.6/urllib.py", line 86, in urlopen > >> > return opener.open(url) > >> > File "/usr/lib/python2.6/urllib.py", line 202, in open > >> > return self.open_unknown(fullurl, data) > >> > File "/usr/lib/python2.6/urllib.py", line 214, in open_unknown > >> > raise IOError, ('url error', 'unknown url type', type) > >> > IOError: [Errno url error] unknown url type: 'https' > >> > > >> > > >> > On Mon, Sep 27, 2010 at 9:49 PM, bally boy > wrote: > >> >> > >> >> Looks real cool Mic.. thanks! > >> >> > >> >> On Tue, Sep 28, 2010 at 2:16 AM, Michele Comitini > >> >> wrote: > >> >>> > >> >>> Hi! > >> >>> > >> >>> You can start here: > >> >>> > >> >>> > >> >>> > >> >>> > http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloFacebook > >> >>> > >> >>> you can look and even copy! ;-) > >> >>> > >> >>> mic > >> >>> > >> >>> 2010/9/27 bally boy : > >> >>> > Hi has anyone here created any facebook apps using web2py.. would > >> >>> > love > >> >>> > to > >> >>> > have a look! > >> >>> > ( and well if anyone has ever documented anything.. that would be > a > >> >>> > treat!) > >> >>> > > >> >> > >> > > >> > > > > > >
Re: [web2py] facebook apps
Thanks for your answer. where should i import ssl? I am try in db.py and the facebook.py. it does not work. best regards Napoleon On Mon, Oct 18, 2010 at 2:12 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > That error is usually because you are using a python version that does > not find the ssl module. > > in your GAE env try the following: > > > import ssl > > mic > > > 2010/10/18 Napoleon Moreno : > > Good day > > > > Thanks a lot for share this code. > > > > It works well in my local sqlite environment. > > > > I can't make it work in my local GAE. > > > > It looks like it makes the authentication in facebook , but when it > returns > > it raise the error in P.D > > > > Best regard > > Napoleon > > > > Traceback (most recent call last): > > File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line 188, > in > > restricted > > exec ccode in environment > > File > > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > > line 312, in > > File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in > > > > self._caller = lambda f: f() > > File > > > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", > > line 291, in user > > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1023, in > > __call__ > > return self.login() > > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1462, in > login > > cas_user = cas.get_user() > > File > "/home/napoleon/triviaapp/web2py/applications/welcome/models/db.py", > > line 119, in get_user > > user = self.graph.get_object("me") > > File > > > "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", > > line 96, in get_object > > return self.request(id, args) > > File > > > "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", > > line 180, in request > > urllib.urlencode(args), post_data) > > File "/usr/lib/python2.6/urllib.py", line 86, in urlopen > > return opener.open(url) > > File "/usr/lib/python2.6/urllib.py", line 202, in open > > return self.open_unknown(fullurl, data) > > File "/usr/lib/python2.6/urllib.py", line 214, in open_unknown > > raise IOError, ('url error', 'unknown url type', type) > > IOError: [Errno url error] unknown url type: 'https' > > > > > > On Mon, Sep 27, 2010 at 9:49 PM, bally boy wrote: > >> > >> Looks real cool Mic.. thanks! > >> > >> On Tue, Sep 28, 2010 at 2:16 AM, Michele Comitini > >> wrote: > >>> > >>> Hi! > >>> > >>> You can start here: > >>> > >>> > >>> > http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloFacebook > >>> > >>> you can look and even copy! ;-) > >>> > >>> mic > >>> > >>> 2010/9/27 bally boy : > >>> > Hi has anyone here created any facebook apps using web2py.. would > love > >>> > to > >>> > have a look! > >>> > ( and well if anyone has ever documented anything.. that would be a > >>> > treat!) > >>> > > >> > > > > >
Re: [web2py] facebook apps
Good day Thanks a lot for share this code. It works well in my local sqlite environment. I can't make it work in my local GAE. It looks like it makes the authentication in facebook , but when it returns it raise the error in P.D Best regard Napoleon Traceback (most recent call last): File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", line 312, in File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in self._caller = lambda f: f() File "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:user", line 291, in user File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1023, in __call__ return self.login() File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 1462, in login cas_user = cas.get_user() File "/home/napoleon/triviaapp/web2py/applications/welcome/models/db.py", line 119, in get_user user = self.graph.get_object("me") File "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", line 96, in get_object return self.request(id, args) File "/home/napoleon/triviaapp/web2py/applications/welcome/modules/facebook.py", line 180, in request urllib.urlencode(args), post_data) File "/usr/lib/python2.6/urllib.py", line 86, in urlopen return opener.open(url) File "/usr/lib/python2.6/urllib.py", line 202, in open return self.open_unknown(fullurl, data) File "/usr/lib/python2.6/urllib.py", line 214, in open_unknown raise IOError, ('url error', 'unknown url type', type) IOError: [Errno url error] unknown url type: 'https' On Mon, Sep 27, 2010 at 9:49 PM, bally boy wrote: > Looks real cool Mic.. thanks! > > > On Tue, Sep 28, 2010 at 2:16 AM, Michele Comitini < > michele.comit...@gmail.com> wrote: > >> Hi! >> >> You can start here: >> >> >> http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloFacebook >> >> you can look and even copy! ;-) >> >> mic >> >> 2010/9/27 bally boy : >> > Hi has anyone here created any facebook apps using web2py.. would love >> to >> > have a look! >> > ( and well if anyone has ever documented anything.. that would be a >> treat!) >> > >> > >
Re: [web2py] Re: Searching and indexing a microsoft office documents
Good afternoon Thanks for your comments. It will work on a lamp server. The databae will be mysql. Is there some issue in this environment? On Wed, Sep 29, 2010 at 2:53 PM, slestak wrote: > Maybe look at the java Lucene libraries. I understand there are some > ports to other languages. The Mindtouch wiki I use indexes all the > documents that are attached to my wiki. Doc, xls, etc. > >
[web2py] Searching and indexing a microsoft office documents
Good day I will work in a system to save office documents. It is all ok about it with web2py. But i need a feature to searching in those documents. I believe that i need read de documents and keep some kind of index of them. maybe could you help me with a advice to start?.
Re: [web2py] Re: sql form data in hebrew
Good day sir It works for me if i change in web2py/gluon/contrib/gql.py L617 def __str__(self): return ' AND '.join([str(filter) for filter in self.filters]) for def __str__(self): return ' AND '.join([unicode(filter) for filter in self.filters]) Maybe that is not the right solution, but it could help to fix it On Sat, Sep 25, 2010 at 10:55 AM, Napoleon Moreno wrote: > I tried it > > It works well in sqllite > > In gae returns a ticket: > > Traceback (most recent call last): > File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line 188, in > restricted > exec ccode in environment > File > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", > line 266, in > File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in > > self._caller = lambda f: f() > File > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", > line 57, in category > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2837, in > create > deletable=False, > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2780, in > update > hideerror=self.settings.hideerror): > File "/home/napoleon/triviaapp/web2py/gluon/sqlhtml.py", line 952, in > accepts > hideerror=hideerror, > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1542, in > accepts > status = self._traverse(status,hideerror) > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 559, in > _traverse > newstatus = self._validate() > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1330, in > _validate > (value, errors) = validator(value) > File "/home/napoleon/triviaapp/web2py/gluon/validators.py", line 493, in > __call__ > rows = self.dbset(field == value).select(limitby=(0, 1)) > File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 737, in > select > self._db['_lastsql'] = 'SELECT WHERE %s' % self.where > File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 615, in > __str__ > > return ' AND '.join([str(filter) for filter in self.filters]) > UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-10: > ordinal not in range(128) > > > INFO 2010-09-25 15:47:49,038 gaehandler.py:65] Request: > 49.73ms/50.00ms (real time/cpu time) > INFO 2010-09-25 15:47:49,043 recording.py:327] Saved; key: > __appstats__:068900, part: 121 bytes, full: 15295 bytes, overhead: 0.001 + > 0.006; link: http://localhost:8080/stats/details?time=1285429668988 > INFO 2010-09-25 15:47:49,049 dev_appserver.py:3275] "POST > /welcome/default/category HTTP/1.1" 500 - > INFO 2010-09-25 15:47:49,097 gaehandler.py:65] Request: > 0.60ms/0.00ms (real time/cpu time) > INFO 2010-09-25 15:47:49,098 recording.py:327] Saved; key: > __appstats__:069000, part: 31 bytes, full: 1052 bytes, overhead: 0.000 + > 0.001; link: http://localhost:8080/stats/details?time=1285429669097 > INFO 2010-09-25 15:47:49,105 dev_appserver.py:3275] "GET /favicon.ico > HTTP/1.1" 400 - > > > > On Sat, Sep 25, 2010 at 10:16 AM, mdipierro wrote: > >> can you help us debug? Try >> >> >> db.category.name.requires = IS_NOT_IN_DB(db, 'category.name') >> >> On Sep 25, 8:37 am, Napoleon Moreno wrote: >> > Good day >> > >> > My dal was: >> > >> > db.define_table('category', >> > Field('name','string'), >> > format='%(name)s' >> > ) >> > >> > db.category.name.requires = IS_NOT_IN_DB(db, db.category.name) >> > >> > The error ocurrs in db.category.name.requires = IS_NOT_IN_DB(db, >> > db.category.name). >> > >> > I removed this for the moment. >> > >&
Re: [web2py] Re: sql form data in hebrew
I tried it It works well in sqllite In gae returns a ticket: Traceback (most recent call last): File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", line 266, in File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in self._caller = lambda f: f() File "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", line 57, in category File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2837, in create deletable=False, File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2780, in update hideerror=self.settings.hideerror): File "/home/napoleon/triviaapp/web2py/gluon/sqlhtml.py", line 952, in accepts hideerror=hideerror, File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1542, in accepts status = self._traverse(status,hideerror) File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in _traverse newstatus = c._traverse(status,hideerror) and newstatus File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in _traverse newstatus = c._traverse(status,hideerror) and newstatus File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in _traverse newstatus = c._traverse(status,hideerror) and newstatus File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in _traverse newstatus = c._traverse(status,hideerror) and newstatus File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 559, in _traverse newstatus = self._validate() File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1330, in _validate (value, errors) = validator(value) File "/home/napoleon/triviaapp/web2py/gluon/validators.py", line 493, in __call__ rows = self.dbset(field == value).select(limitby=(0, 1)) File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 737, in select self._db['_lastsql'] = 'SELECT WHERE %s' % self.where File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 615, in __str__ return ' AND '.join([str(filter) for filter in self.filters]) UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-10: ordinal not in range(128) INFO 2010-09-25 15:47:49,038 gaehandler.py:65] Request: 49.73ms/50.00ms (real time/cpu time) INFO 2010-09-25 15:47:49,043 recording.py:327] Saved; key: __appstats__:068900, part: 121 bytes, full: 15295 bytes, overhead: 0.001 + 0.006; link: http://localhost:8080/stats/details?time=1285429668988 INFO 2010-09-25 15:47:49,049 dev_appserver.py:3275] "POST /welcome/default/category HTTP/1.1" 500 - INFO 2010-09-25 15:47:49,097 gaehandler.py:65] Request: 0.60ms/0.00ms (real time/cpu time) INFO 2010-09-25 15:47:49,098 recording.py:327] Saved; key: __appstats__:069000, part: 31 bytes, full: 1052 bytes, overhead: 0.000 + 0.001; link: http://localhost:8080/stats/details?time=1285429669097 INFO 2010-09-25 15:47:49,105 dev_appserver.py:3275] "GET /favicon.ico HTTP/1.1" 400 - On Sat, Sep 25, 2010 at 10:16 AM, mdipierro wrote: > can you help us debug? Try > > > db.category.name.requires = IS_NOT_IN_DB(db, 'category.name') > > On Sep 25, 8:37 am, Napoleon Moreno wrote: > > Good day > > > > My dal was: > > > > db.define_table('category', > > Field('name','string'), > > format='%(name)s' > > ) > > > > db.category.name.requires = IS_NOT_IN_DB(db, db.category.name) > > > > The error ocurrs in db.category.name.requires = IS_NOT_IN_DB(db, > > db.category.name). > > > > I removed this for the moment. > > > > Thanks for any advice. > > > > On Thu, Sep 23, 2010 at 9:38 PM, Napoleon Moreno >wrote: > > > > > Good night > > > > > i have a simple form to input data in hebrew > > > > > I works ok in in sqlLite. > > > > > in GAE it returns: > > > > > return ' AND '.join([str(filter) for filter in self.filters]) > > > UnicodeEncodeError: 'ascii' codec can't encode characters in position > 7-11: > > > ordinal not in range(128) > > > > > db.define_table('category', > > > Field('name','string'), > > > format='%(name)s' > > > ) > > > > > this is the form: > > > > > form = crud.create(db.category, next=URL('category'), > > >message=T("record created")) > > > categories = crud.select(db.category, fields=['name'], > > >headers={'category.name': 'Name'}) > > > return dict(form=form, categories=categories) > > > > >
[web2py] Re: sql form data in hebrew
Good day My dal was: db.define_table('category', Field('name','string'), format='%(name)s' ) db.category.name.requires = IS_NOT_IN_DB(db, db.category.name) The error ocurrs in db.category.name.requires = IS_NOT_IN_DB(db, db.category.name). I removed this for the moment. Thanks for any advice. On Thu, Sep 23, 2010 at 9:38 PM, Napoleon Moreno wrote: > Good night > > i have a simple form to input data in hebrew > > I works ok in in sqlLite. > > in GAE it returns: > > return ' AND '.join([str(filter) for filter in self.filters]) > UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-11: > ordinal not in range(128) > > db.define_table('category', > Field('name','string'), > format='%(name)s' > ) > > this is the form: > > form = crud.create(db.category, next=URL('category'), >message=T("record created")) > categories = crud.select(db.category, fields=['name'], >headers={'category.name': 'Name'}) > return dict(form=form, categories=categories) >
[web2py] sql form data in hebrew
Good night i have a simple form to input data in hebrew I works ok in in sqlLite. in GAE it returns: return ' AND '.join([str(filter) for filter in self.filters]) UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-11: ordinal not in range(128) db.define_table('category', Field('name','string'), format='%(name)s' ) this is the form: form = crud.create(db.category, next=URL('category'), message=T("record created")) categories = crud.select(db.category, fields=['name'], headers={'category.name': 'Name'}) return dict(form=form, categories=categories)