[web2py] Re: JS: very small but very useful

2016-05-06 Thread eric cuver
you can give us the website link Le vendredi 6 mai 2016 17:26:43 UTC+2, Val K a écrit : > > Very small py-function that wraps any js-content in anonymous js-function > > def JS_fun(*args_lst): > def _inner(body): > return "(function(%s){ %s ;})" % (','.join(args_lst), body) > ret

[web2py] Re: Enabling Unicode characters in URL

2016-05-06 Thread Kenneth
Quick update By adding "args_match =r'([ㄱ-ㅣ가-힣\w@ -_=])" under BASE= dict(, I was able to read all unicode characters. Hope this Regex is safe to use. On Friday, May 6, 2016 at 3:15:38 AM UTC-4, Niphlod wrote: > > you need to think it through. > web2py's defaults to have /a/c/f with a being you

[web2py] Re: Enabling Unicode characters in URL

2016-05-06 Thread Kenneth
Thank you, Niphlod. I just had to spin my head for all day today and I figured that - I was using parameter-based routes and didn't know that I had to use pattern-based routes to use routes_in and routes_out. No-mixing two different routes. - I couldn't activate request.raw_args with my parame

[web2py] Re: How to update the stored original filename for upload field using smartgrid edit form?

2016-05-06 Thread rajjmatthur
Does this works? Filename still shows None. On Wednesday, June 4, 2014 at 6:59:05 AM UTC-4, Michael Beller wrote: > > I used compute fields and it now works fine. Unless I did something > wrong, the instructions in the book for storing the original filename only > work for the initial insert an

[web2py] How to integrate sendgrid or similar for 'password reset' mail

2016-05-06 Thread Jaime Sempere
Hi, I am using last web2py version but for any reason I am not able of sending email from GAE. I am just trying the forget password mail but after giving my email to the form, I am only redirected to login and I dont receive any mail I am using this settings: mail.settings.server = 'gae' ma

[web2py] DB2 truncate()

2016-05-06 Thread Auden RovelleQuartz
when i attempt to do a db.tablename.truncate() on a DB2 table, I get the following error: Ticket ID 127.0.0.1.2016-05-06.14-57-20.5ee10f85-fb6e-4bfe-8d16-db0b224313b9 ('42000', '[42000] [IBM][iSeries Access ODBC Driver][DB2 UDB]SQL0104 - Token TRUNCATE was not valid. Valid tokens: ( END GET S

[web2py] JS: very small but very useful

2016-05-06 Thread Val K
Very small py-function that wraps any js-content in anonymous js-function def JS_fun(*args_lst): def _inner(body): return "(function(%s){ %s ;})" % (','.join(args_lst), body) return _inner >>> JS_fun( 'a', 'b' )( 'console.log(a,b)' ) '(function(a,b){ console.log(a, b) ;})' >>>

[web2py] Re: problem display drop down list when self reference table

2016-05-06 Thread Vic Ding
Life saver! :) Use this code and it works like a charm. requires=IS_EMPTY_OR(IS_IN_DB(db, 'category.id','%(name)s')) On Friday, May 6, 2016 at 4:32:24 PM UTC+2, Anthony wrote: > > Please read the documentation: > http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-val

[web2py] Re: problem display drop down list when self reference table

2016-05-06 Thread Anthony
Please read the documentation: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators The third argument lets you specify how you want the items represented via Python string formatting (or alternatively using a function). Anthony On Friday, May 6, 2016 at 10:14

[web2py] problem display drop down list when self reference table

2016-05-06 Thread Vic Ding
Dear all, I have the following table definition; db.define_table('category', auth.signature, Field('name','string'), Field('parent', 'reference category', requires=IS_EMPTY_OR(IS_IN_DB(db, 'category.id'))), format='%(name)s' ) In

[web2py] Re: Enabling Unicode characters in URL

2016-05-06 Thread Niphlod
you need to think it through. web2py's defaults to have /a/c/f with a being your app, c the name of a controller file and f a valid python function identifier. if you want to support /whatever you NEED to use routes.py a simple routes_in = ( ('/welcome/static/$anything', '/welcome/static/$any

[web2py] Re: matplotlib passing parameters from the view

2016-05-06 Thread Niphlod
if your generated url is /a/c/f/*graf_comp_gior*?var1=a&var2=b I assure you that those will be passed. as for the graphing library, I highly suggest to switch to a javascript based solution rather than a python one for any web site. On Friday, May 6, 2016 at 8:50:21 AM UTC+2, Paolo Amboni wrote: