[web2py:37733] Re: bug in recent versions of web2py related to unicode encoding in mail()
Now every body can just do: mail.send(to=email=email, subject=contactForm.vars.subject, message=contactForm.vars.subject) AND unicode is handled by default -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37735] Re: LOAD function anybody?
repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37736] Re: LOAD function anybody?
added this below jQuery(':image',this).click(function() { jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); no very beautiful code but not it works On Dec 23, 12:59 pm, selecta gr...@delarue-berlin.de wrote: repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37737] 400 error
When I request a URL - host/myapp/non_existant_fct a 400 error is generated. routes_onerror sends it to my custom error page. How does my custom page find out the URL that generated the 400 error? Karl -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37739] How to locale web2py date calendar widget
While db.convenio.data_assinatura.requires = IS_DATE(format=T('%d-%m-%Y'),error_message=T('deve ser no formato DD-MM-!')) show me the date in correct locale, the calendar widget don't show the correct date. How to locale it or make it show the correct date? -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37740] Re: How to locale web2py date calendar widget
I think that the format is controlled in the web2py_ajax.html view. try {jQuery(input.date).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d')}}, showsTime:false }); }); } catch(e) {}; try { jQuery(input.datetime).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d %H:%M:%S')}}, showsTime: true,timeFormat: 24 }); }); } catch(e) {}; Since the format string seems to be in a T() I would guess that it's possible to change that using translations? ~Brian On Dec 23, 7:29 am, Alexandre Andrade alexandrema...@gmail.com wrote: While db.convenio.data_assinatura.requires = IS_DATE(format=T('%d-%m-%Y'),error_message=T('deve ser no formato DD-MM-!')) show me the date in correct locale, the calendar widget don't show the correct date. How to locale it or make it show the correct date? -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37741] Re: How to limit access to items in static?
When I say put the in uploads/ I do not mean you should upload the files. You should just copy them there preserving the subfolder structure. It will not break relative cross-references. When they are in uploads you modify the download action to block some files. On Dec 23, 12:55 am, Johann Spies johann.sp...@gmail.com wrote: 2009/12/22 mdipierro mdipie...@cs.depaul.edu: You can use routes but the rule is: - if it is public goes in static - if it requires access control goes in uploads Thanks for the replies. If you don't mind, I would like advice on the following situation: I need restricted access to parts of the data on my website. How would you handle for example html-documentation written using sphinx I want access to the documentation only available from a particular page in the wiki. If I upload the files web2py don't preserve their relations to each other neither present them as html-files in this. At the moment I have the whole bunch of interrelated html-files in a subdirectory in static. I have tried the following routes.py which does not work or makes no difference: routes_in = ( ('/init/static/proxydoc/index.html', '/init/default/')) routes_out= () I tried a more specific route rewrite but got so many errors that I gave up. I most probably don't understand how to use routes in this case. Please help me to think correctly regarding this problem. Regards Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37742] Re: request headers
they should in parsed in request.env.http_* and unparesed in request.wsgi.environ which os? which web2py? On Dec 23, 1:27 am, Thadeus Burgess thade...@thadeusb.com wrote: I am not seeing a place where you can read the request.headers, neither in the request.env or request.wsgi.environ -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37743] Re: bug in recent versions of web2py related to unicode encoding in mail()
I will release 1.74.4 later today. On Dec 23, 2:03 am, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: Now every body can just do: mail.send(to=email=email, subject=contactForm.vars.subject, message=contactForm.vars.subject) AND unicode is handled by default -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37744] Re: LOAD function anybody?
Can you try jQuery(':submit,:image',this).click(function() On Dec 23, 6:22 am, selecta gr...@delarue-berlin.de wrote: added this below jQuery(':image',this).click(function() { jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); no very beautiful code but not it works On Dec 23, 12:59 pm, selecta gr...@delarue-berlin.de wrote: repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37745] Re: 400 error
it should be in request.vars.requested_uri On Dec 23, 6:30 am, kbochert kboch...@copper.net wrote: When I request a URL - host/myapp/non_existant_fct a 400 error is generated. routes_onerror sends it to my custom error page. How does my custom page find out the URL that generated the 400 error? Karl -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37746] Re: Sitemap Plugin or Sitemap Generator
Friends, I implemented in the default controller a function called sitemap() that have all logic to generate the sitemap.xml file, but I don't know how to escape a string into a XML. My sitemap() function: def sitemap(): sitemap_xml = '' ''' Here the logic to generate the content ''' . . return dict(sitemap_xml=sitemap_xml) Then, I create a page in views/default/sitemap.html: {{extend 'site.html'}} {{=sitemap_xml}} Well, I need generate this page in XML format, how to do this ? I try to do this: www.mysite.com/init/default/sitemap.xml but this generate the tag 'document' and a tag to variable 'sitemap_xml' and this way isn't a valid sitemap.xml file. You can see in action: http://www.leandro.inf.br/init/default/sitemap.xml Any idea ? -- Leandro. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37748] Re: How to limit access to items in static?
Thanks! Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37749] Re: Postgresql-types limited by web2py :(
I am not sure I understand. You can use this Field('name','string',length=whateveryoulike) or if you have a legacy db you can use SQLCustomType in place of 'string'. On Dec 23, 9:36 am, Johann Spies johann.sp...@gmail.com wrote: The limited support for postgresql types has bitten me. I am busy working on a very important project and after a lot of failures to import a csv file into a table I discovered at least one of the problems was that web2py created the table with a type: 'character varying (512)' and some of the date was too long for the fields. I cannot predict the length of each field and don't want to make every field 'text'. Is there a way that I can convince web2py to change the behaviour in this respect e.g. creating a posgresql field with 'varchar' in stead of using the 512 limitation? Also, is there way to make use of the rich number of types available in postgresq e.g. something like 'inet' for ip-addresses? Regards Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37750] Re: Sitemap Plugin or Sitemap Generator
I need to see the actual code. On Dec 23, 9:02 am, Leandro - ProfessionalIT lsever...@gmail.com wrote: Friends, I implemented in the default controller a function called sitemap() that have all logic to generate the sitemap.xml file, but I don't know how to escape a string into a XML. My sitemap() function: def sitemap(): sitemap_xml = '' ''' Here the logic to generate the content ''' . . return dict(sitemap_xml=sitemap_xml) Then, I create a page in views/default/sitemap.html: {{extend 'site.html'}} {{=sitemap_xml}} Well, I need generate this page in XML format, how to do this ? I try to do this:www.mysite.com/init/default/sitemap.xmlbut this generate the tag 'document' and a tag to variable 'sitemap_xml' and this way isn't a valid sitemap.xml file. You can see in action:http://www.leandro.inf.br/init/default/sitemap.xml Any idea ? -- Leandro. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37751] a onclick=javascript: ... problem
In one of my views (http://127.0.0.1:8000/frame/default/index) I have the following link: a class=adiv href={{=URL(r=request,c='demo',f='index')}} h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- It renders the whole div as a link, and works. Since I would like the url to open in its own window I replaced the url with the following code. In the view: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- ... and in the _ajax.html file: function demo(url) { demowindow=window.open (url,'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=700'); if (window.focus) demowindow.focus(); return false; } When I click the div, a new window opens, however, the url reads like: http://127.0.0.1/frame/default/%s whereas, it should read like: http://127.0.0.1:8000/frame/demo/index Why doesn't this work? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37752] Re: a onclick=javascript: ... problem
I do not why but why not just a class=adiv href={{=URL(r=request,c='demo',f='index')}} target=demo On Dec 23, 9:52 am, annet annet.verm...@gmail.com wrote: In one of my views (http://127.0.0.1:8000/frame/default/index) I have the following link: a class=adiv href={{=URL(r=request,c='demo',f='index')}} h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- It renders the whole div as a link, and works. Since I would like the url to open in its own window I replaced the url with the following code. In the view: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- ... and in the _ajax.html file: function demo(url) { demowindow=window.open (url,'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=700'); if (window.focus) demowindow.focus(); return false; } When I click the div, a new window opens, however, the url reads like: http://127.0.0.1/frame/default/%s whereas, it should read like: http://127.0.0.1:8000/frame/demo/index Why doesn't this work? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37753] Re: Sitemap Plugin or Sitemap Generator
On Dec 23, 1:50 pm, mdipierro mdipie...@cs.depaul.edu wrote: I need to see the actual code. Master, follow my dummie code: def sitemap(): import os from gluon.myregex import regex_expose # Statics URLs ctldir = os.path.join(request.folder,controllers) ctls=os.listdir(ctldir) if 'appadmin.py' in ctls: ctls.remove('appadmin.py') if 'manage.py' in ctls: ctls.remove('manage.py') sitemap_xml = '?xml version=1.0 encoding=UTF-8?\n' sitemap_xml +='urlset xmlns=http://www.sitemaps.org/schemas/sitemap/ 0.9\n' for ctl in ctls: if ctl.endswith(.bak) == False: filename = os.path.join(ctldir,ctl) data = open(filename, 'r').read() functions = regex_expose.findall(data) ctl = ctl[:-3].replace(_, ) for f in functions: sitemap_xml += 'url\nloc' + 'http://www.leandro.inf.br/' + request.application + '/' + ctl + '/' + f.replace(_, ) + '/loc \n/url\n' # Dynamic URLs posts = db().select(db.posts.ALL, orderby=~db.posts.created) for item in posts: sitemap_xml += 'url\nloc' + 'http://www.leandro.inf.br/' + request.application + '/' + 'default/post' + '/' + item.slug + '/loc \n/url\n' sitemap_xml +='/urlset' return dict(sitemap_xml=sitemap_xml) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37754] Re: mercurial HELP!
%%40 did the trick! Thank you. On Dec 22, 8:58 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 22, 2009, at 5:58 PM, Brian M wrote: Hmm, just tried with a little google code project I've got and it worked fine. In my mercurial.ini file (same as .hgrc) I simply put: [auth] project.prefix = project.googlecode.com/hg project.username = myusername project.password = myprojectpassword project.schemes = https That was with my google account as my username. I didn't even have to bother with setting [paths] in my mercurial config. I suspect that using your university email as the username is causing your problem. Replacing the @ with %40 as suggested by Jonathan should have fixed it. Perhaps try %%40 as suggested inhttp://code.google.com/p/support/wiki/MercurialFAQ That's worth a try; the traceback mentioned that they wanted % to be followed by % or (. though that should only be necessary for Windows users and I'm pretty sure you use a Mac. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37755] Re: Sitemap Plugin or Sitemap Generator
your sitemap_xml is not a structure (list of dict, list of list, etc.) it is the actual xml as a string. You just replace the last line: return dict(sitemap_xml=sitemap_xml) with return sitemap_xml On Dec 23, 10:06 am, Leandro - ProfessionalIT lsever...@gmail.com wrote: On Dec 23, 1:50 pm, mdipierro mdipie...@cs.depaul.edu wrote: I need to see the actual code. Master, follow my dummie code: def sitemap(): import os from gluon.myregex import regex_expose # Statics URLs ctldir = os.path.join(request.folder,controllers) ctls=os.listdir(ctldir) if 'appadmin.py' in ctls: ctls.remove('appadmin.py') if 'manage.py' in ctls: ctls.remove('manage.py') sitemap_xml = '?xml version=1.0 encoding=UTF-8?\n' sitemap_xml +='urlset xmlns=http://www.sitemaps.org/schemas/sitemap/ 0.9\n' for ctl in ctls: if ctl.endswith(.bak) == False: filename = os.path.join(ctldir,ctl) data = open(filename, 'r').read() functions = regex_expose.findall(data) ctl = ctl[:-3].replace(_, ) for f in functions: sitemap_xml += 'url\nloc' + 'http://www.leandro.inf.br/'+ request.application + '/' + ctl + '/' + f.replace(_, ) + '/loc \n/url\n' # Dynamic URLs posts = db().select(db.posts.ALL, orderby=~db.posts.created) for item in posts: sitemap_xml += 'url\nloc' + 'http://www.leandro.inf.br/'+ request.application + '/' + 'default/post' + '/' + item.slug + '/loc \n/url\n' sitemap_xml +='/urlset' return dict(sitemap_xml=sitemap_xml) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37756] Re: Postgresql-types limited by web2py :(
OK. Apologies. I forgot I can specify the length. Do you have documentation on SQLCustomType somewhere. I did quick search in your book and could not find any reference to it. Regards. Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37757] Re: Postgresql-types limited by web2py :(
SQLCustomType is not documented because I am not promising backward compatibility for it in the new DAL (The functionality will be there but the API may change). Anyway here is a docstring example for a possible definition of type decimal (mind that web2py has a type decimal so you do not need customtype for this): decimal = SQLCustomType ( type ='double', # as web2py sees it native ='integer',# as db sees it encoder =(lambda x: int(float(x) * 100)), # as conversion is done decoder = (lambda x: Decimal(0.00) + Decimal(str(float (x)/100)) ) ) db.define_table ( 'example', Field('value', type=decimal) ) On Dec 23, 10:16 am, Johann Spies johann.sp...@gmail.com wrote: OK. Apologies. I forgot I can specify the length. Do you have documentation on SQLCustomType somewhere. I did quick search in your book and could not find any reference to it. Regards. Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37758] Re: Sitemap Plugin or Sitemap Generator
Perfect ! now I have a sitemap generated by the my Web2Py app. Thank's for all help. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37759] Re: Sitemap Plugin or Sitemap Generator
Mind that you have a possible XSS vulnerability here: for item in posts: sitemap_xml += 'url\nloc' + 'http:// www.leandro.inf.br/' + request.application + '/' + 'default/post' + '/' + item.slug + '/loc \n/url\n' I would suggest using helpers instead of concatenating string. It is safer.: def sitemap(): import os from gluon.myregex import regex_expose # Statics URLs ctldir = os.path.join(request.folder,controllers) ctls=os.listdir(ctldir) if 'appadmin.py' in ctls: ctls.remove('appadmin.py') if 'manage.py' in ctls: ctls.remove('manage.py') sitemap=TAG.urlset(_xmlns=http://www.sitemaps.org/schemas/ sitemap/0.9) for ctl in ctls: if ctl.endswith(.bak) == False: filename = os.path.join(ctldir,ctl) data = open(filename, 'r').read() functions = regex_expose.findall(data) ctl = ctl[:-3].replace(_, ) for f in functions: sitemap.append(TAG.url(TAG.loc('http:// www.leandro.inf.br/%s/%s/%s' % (request.application,ctl,f.replace (_, ))) # Dynamic URLs posts = db().select(db.posts.ALL, orderby=~db.posts.created) for item in posts: sitemap.append(TAG.url(TAG.loc('http:// www.leandro.inf.br/%s/default/post/%s' % (request.application,item.slug) return '?xml version=1.0 encoding=UTF-8?\n%s' % sitemap.xml() On Dec 23, 10:22 am, Leandro - ProfessionalIT lsever...@gmail.com wrote: Perfect ! now I have a sitemap generated by the my Web2Py app. Thank's for all help. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37760] web2py 1.74.4 is OUT
It fixes two major bugs: - a problem with downloading uploaded binary files in blobs on GAE (thanks v) - a problem with unicode in mutlipart emails. (thanks Mateusz) Please report any problem. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37761] a onclick=javascript: ... problem
On Dec 23, 2009, at 7:52 AM, annet wrote: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- ... and in the _ajax.html file: function demo(url) { demowindow=window.open (url,'name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=800,height=700'); if (window.focus) demowindow.focus(); return false; } When I click the div, a new window opens, however, the url reads like: http://127.0.0.1/frame/default/%s whereas, it should read like: http://127.0.0.1:8000/frame/demo/index Why doesn't this work? Maybe because you never escape your Python code? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37762] Re: Looking for simple Javascript JSON-RPC call to web2py server
I've reviewed my code while typing this reply and found that one of the libraries I've been trying to use does in fact allow me to connect (I wasn't using it correctly). I'll post the code for others to benefit. My controller (MyData.py) is as in the documentation: from gluon.tools import Service service = Service(globals()) def call(): return service() @service.jsonrpc def myfunction(a, b): return a + b Calling the following url without sending a json object (e.g. browser window) returns a web2py ValueError: No JSON object could be decoded error which I assume means that the controller is working correctly: http://127.0.0.1:8000/MyApp/MyData/call/jsonrpc/myfunction I've tried connecting from a client page using jQuery RPC: http://plugins.jquery.com/project/rpc I still can't get it to work. I'm successful using the json-xml-rpc lib: http://code.google.com/p/json-xml-rpc/ The following code works well. var service = new rpc.ServiceProxy(/MyApp/MyData/call/jsonrpc, { asynchronous: false, protocol: JSON-RPC, sanitize: false, methods: ['myfunction'] }); if(service.myfunction(4,5) == 9) alert(Success!); Thanks again! Mark On Dec 22, 12:28 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you show us an example of controller and how you call the JSON- RPC? Massimo On Dec 22, 9:12 am, MrGrieves markcarr...@gmail.com wrote: Hello, I'm just getting started with web2py. I'm very interested in the json- rpc functionality. The documentation seems clear for the web2py side of things (http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools.Servi..). I haven't however been able to successfully connect to a service from javascript. I'm looking for a simple example of connecting to web2py using json- rpc from clientjavascript. I'm hoping to find a js library that handles the protocol (as simple as it may be) but it's not a requirement. Thanks Mark -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37763] Re: Looking for simple Javascript JSON-RPC call to web2py server
Thank you. If you have time, would you post a web2pyslice about this? Massimo On Dec 23, 10:36 am, MrGrieves markcarr...@gmail.com wrote: I've reviewed my code while typing this reply and found that one of the libraries I've been trying to use does in fact allow me to connect (I wasn't using it correctly). I'll post the code for others to benefit. My controller (MyData.py) is as in the documentation: from gluon.tools import Service service = Service(globals()) def call(): return service() @service.jsonrpc def myfunction(a, b): return a + b Calling the following url without sending a json object (e.g. browser window) returns a web2py ValueError: No JSON object could be decoded error which I assume means that the controller is working correctly: http://127.0.0.1:8000/MyApp/MyData/call/jsonrpc/myfunction I've tried connecting from a client page using jQuery RPC: http://plugins.jquery.com/project/rpc I still can't get it to work. I'm successful using the json-xml-rpc lib: http://code.google.com/p/json-xml-rpc/ The following code works well. var service = new rpc.ServiceProxy(/MyApp/MyData/call/jsonrpc, { asynchronous: false, protocol: JSON-RPC, sanitize: false, methods: ['myfunction'] }); if(service.myfunction(4,5) == 9) alert(Success!); Thanks again! Mark On Dec 22, 12:28 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you show us an example of controller and how you call the JSON- RPC? Massimo On Dec 22, 9:12 am, MrGrieves markcarr...@gmail.com wrote: Hello, I'm just getting started with web2py. I'm very interested in the json- rpc functionality. The documentation seems clear for the web2py side of things (http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools.Servi..). I haven't however been able to successfully connect to a service from javascript. I'm looking for a simple example of connecting to web2py using json- rpc from clientjavascript. I'm hoping to find a js library that handles the protocol (as simple as it may be) but it's not a requirement. Thanks Mark -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37764] Re: Looking for simple Javascript JSON-RPC call to web2py server
Will do. Thanks for the quick replies. Mark On Dec 23, 10:12 am, mdipierro mdipie...@cs.depaul.edu wrote: Thank you. If you have time, would you post a web2pyslice about this? Massimo On Dec 23, 10:36 am, MrGrieves markcarr...@gmail.com wrote: I've reviewed my code while typing this reply and found that one of the libraries I've been trying to use does in fact allow me to connect (I wasn't using it correctly). I'll post the code for others to benefit. My controller (MyData.py) is as in the documentation: from gluon.tools import Service service = Service(globals()) def call(): return service() @service.jsonrpc def myfunction(a, b): return a + b Calling the following url without sending a json object (e.g. browser window) returns a web2py ValueError: No JSON object could be decoded error which I assume means that the controller is working correctly: http://127.0.0.1:8000/MyApp/MyData/call/jsonrpc/myfunction I've tried connecting from a client page using jQuery RPC: http://plugins.jquery.com/project/rpc I still can't get it to work. I'm successful using the json-xml-rpc lib: http://code.google.com/p/json-xml-rpc/ The following code works well. var service = new rpc.ServiceProxy(/MyApp/MyData/call/jsonrpc, { asynchronous: false, protocol: JSON-RPC, sanitize: false, methods: ['myfunction'] }); if(service.myfunction(4,5) == 9) alert(Success!); Thanks again! Mark On Dec 22, 12:28 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you show us an example of controller and how you call the JSON- RPC? Massimo On Dec 22, 9:12 am, MrGrieves markcarr...@gmail.com wrote: Hello, I'm just getting started with web2py. I'm very interested in the json- rpc functionality. The documentation seems clear for the web2py side of things (http://www.web2py.com/examples/static/epydoc/web2py.gluon.tools.Servi..). I haven't however been able to successfully connect to a service from javascript. I'm looking for a simple example of connecting to web2py using json- rpc from clientjavascript. I'm hoping to find a js library that handles the protocol (as simple as it may be) but it's not a requirement. Thanks Mark -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37765] Re: a onclick=javascript: ... problem
Massimo and Jonathan, I do not why but why not just a class=adiv href={{=URL(r=request,c='demo',f='index')}} target=demo Thanks, that solves my problem in this case, because I don't need to re-size the window. Maybe because you never escape your Python code? td {{=A (club.bedrijf.bedrijfsnaam,_onmouseover=this.style.cursor='pointer';, \ _onclick=javascript:clublocatordetails('%s')%URL (r=request,f='details',args=[club.bedrijf.id]))}} /td I based my code on the lines of code above. However, since I don't think I could replace: club.bedrijf.bedrijfsnaam with: h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p I gave this a try: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- By escaping my Python code you mean escaping this line: onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') ... how would I do that? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37766] Re: request headers
ubuntu linux 9.10 web2py hg tip. I am looking for is the X-Pingback header. I am using another instance of web2py to act as a client that places the X-Pingback header, and it uses urllib to communicate to my app. I have the app set up to log the headers in a file each time a request is made so that I can verify. It seems to see everything but not X-Pingback, I might be doing something wrong with my client app though. When I get home, I will send you a copy of the two apps to see if it can be reproduced. -Thadeus On Wed, Dec 23, 2009 at 8:59 AM, mdipierro mdipie...@cs.depaul.edu wrote: they should in parsed in request.env.http_* and unparesed in request.wsgi.environ which os? which web2py? On Dec 23, 1:27 am, Thadeus Burgess thade...@thadeusb.com wrote: I am not seeing a place where you can read the request.headers, neither in the request.env or request.wsgi.environ -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37767] Re: Postgresql-types limited by web2py :(
I am also curious about using the postgresql inet type. -Thadeus On Wed, Dec 23, 2009 at 10:21 AM, mdipierro mdipie...@cs.depaul.edu wrote: SQLCustomType is not documented because I am not promising backward compatibility for it in the new DAL (The functionality will be there but the API may change). Anyway here is a docstring example for a possible definition of type decimal (mind that web2py has a type decimal so you do not need customtype for this): decimal = SQLCustomType ( type ='double', # as web2py sees it native ='integer', # as db sees it encoder =(lambda x: int(float(x) * 100)), # as conversion is done decoder = (lambda x: Decimal(0.00) + Decimal(str(float (x)/100)) ) ) db.define_table ( 'example', Field('value', type=decimal) ) On Dec 23, 10:16 am, Johann Spies johann.sp...@gmail.com wrote: OK. Apologies. I forgot I can specify the length. Do you have documentation on SQLCustomType somewhere. I did quick search in your book and could not find any reference to it. Regards. Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37768] Re: a onclick=javascript: ... problem
a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') You need the template python brackets. a class=adiv onmouseover=this.style.cursor='pointer'; onclick={{=javascript:demo('%s')%URL(r=request,c='demo',f='index')}} -Thadeus On Wed, Dec 23, 2009 at 11:52 AM, annet annet.verm...@gmail.com wrote: Massimo and Jonathan, I do not why but why not just a class=adiv href={{=URL(r=request,c='demo',f='index')}} target=demo Thanks, that solves my problem in this case, because I don't need to re-size the window. Maybe because you never escape your Python code? td {{=A (club.bedrijf.bedrijfsnaam,_onmouseover=this.style.cursor='pointer';, \ _onclick=javascript:clublocatordetails('%s')%URL (r=request,f='details',args=[club.bedrijf.id]))}} /td I based my code on the lines of code above. However, since I don't think I could replace: club.bedrijf.bedrijfsnaam with: h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p I gave this a try: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- By escaping my Python code you mean escaping this line: onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') ... how would I do that? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37769] Re: a onclick=javascript: ... problem
On Dec 23, 2009, at 9:52 AM, annet wrote: By escaping my Python code you mean escaping this line: onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') ... how would I do that? I'm not quite sure of the syntax, but something more like this: onclick=javascript:demo({{='%s'%URL(r=request,c='demo',f='index')}}) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37770] Re: Sitemap Plugin or Sitemap Generator
Massimo, Ok, I will follow your suggestion. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37771] Re: a onclick=javascript: ... problem
On Dec 23, 2009, at 10:06 AM, Thadeus Burgess wrote: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') You need the template python brackets. a class=adiv onmouseover=this.style.cursor='pointer'; onclick={{=javascript:demo('%s')%URL(r=request,c='demo',f='index')}} This is a slightly tricky case because of the nested quotes. The solution above loses the double quotes around the onclick value. (There are multiple solutions, of course.) -Thadeus On Wed, Dec 23, 2009 at 11:52 AM, annet annet.verm...@gmail.com wrote: Massimo and Jonathan, I do not why but why not just a class=adiv href={{=URL(r=request,c='demo',f='index')}} target=demo Thanks, that solves my problem in this case, because I don't need to re-size the window. Maybe because you never escape your Python code? td {{=A (club.bedrijf.bedrijfsnaam,_onmouseover=this.style.cursor='pointer';, \ _onclick=javascript:clublocatordetails('%s')%URL (r=request,f='details',args=[club.bedrijf.id]))}} /td I based my code on the lines of code above. However, since I don't think I could replace: club.bedrijf.bedrijfsnaam with: h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p I gave this a try: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- By escaping my Python code you mean escaping this line: onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') ... how would I do that? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37772] Re: LOAD function anybody?
yeah this one works fine for image and submit buttons On Dec 23, 4:01 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you try jQuery(':submit,:image',this).click(function() On Dec 23, 6:22 am, selecta gr...@delarue-berlin.de wrote: added this below jQuery(':image',this).click(function() { jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); no very beautiful code but not it works On Dec 23, 12:59 pm, selecta gr...@delarue-berlin.de wrote: repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37773] Re: a onclick=javascript: ... problem
... well if thats too confusing then you can do the following and bypass the nested quotes all together. onclick=javascript:demo('{{=URL(r=request,c='demo',f='index')}}') -Thadeus On Wed, Dec 23, 2009 at 12:54 PM, Jonathan Lundell jlund...@pobox.com wrote: On Dec 23, 2009, at 10:06 AM, Thadeus Burgess wrote: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') You need the template python brackets. a class=adiv onmouseover=this.style.cursor='pointer'; onclick={{=javascript:demo('%s')%URL(r=request,c='demo',f='index')}} This is a slightly tricky case because of the nested quotes. The solution above loses the double quotes around the onclick value. (There are multiple solutions, of course.) -Thadeus On Wed, Dec 23, 2009 at 11:52 AM, annet annet.verm...@gmail.com wrote: Massimo and Jonathan, I do not why but why not just a class=adiv href={{=URL(r=request,c='demo',f='index')}} target=demo Thanks, that solves my problem in this case, because I don't need to re-size the window. Maybe because you never escape your Python code? td {{=A (club.bedrijf.bedrijfsnaam,_onmouseover=this.style.cursor='pointer';, \ _onclick=javascript:clublocatordetails('%s')%URL (r=request,f='details',args=[club.bedrijf.id]))}} /td I based my code on the lines of code above. However, since I don't think I could replace: club.bedrijf.bedrijfsnaam with: h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p I gave this a try: a class=adiv onmouseover=this.style.cursor='pointer'; onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') h2Fitwise Demo Applicatie/h2 pIn de Demo Applicatie .../p /a !-- adiv -- By escaping my Python code you mean escaping this line: onclick=javascript:demo('%s')%URL(r=request,c='demo',f='index') ... how would I do that? Kind regards, Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37774] Re: LOAD function anybody?
Good to know there is a simple fix. It is not obvious to me that all imput image are submit buttons. I am reluctant to make this the default. What do people think? Massimo On Dec 23, 1:12 pm, selecta gr...@delarue-berlin.de wrote: yeah this one works fine for image and submit buttons On Dec 23, 4:01 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you try jQuery(':submit,:image',this).click(function() On Dec 23, 6:22 am, selecta gr...@delarue-berlin.de wrote: added this below jQuery(':image',this).click(function() { jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); no very beautiful code but not it works On Dec 23, 12:59 pm, selecta gr...@delarue-berlin.de wrote: repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37775] Re: LOAD function anybody?
ok sorry but I just encountered another strange behavior, the submit button/image itself is always swallowed so i have to pass an extra hidden var {{=FORM(INPUT(_type='submit',_value='scrape people'),INPUT (_type='hidden', _name='scrapepeople',_value='1'))}} request.vars = Storage {'scrapepeople': '1'} it would be nicer to just do {{=FORM(INPUT(_type='submit',_value='scrape people',_name='scrapepeople'))}} but it returns request.vars = Storage {} I am really sorry that I do not suggest changes to the jscrip functions but I learned javascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my project further (a movie database) On Dec 23, 8:12 pm, selecta gr...@delarue-berlin.de wrote: yeah this one works fine for image and submit buttons On Dec 23, 4:01 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you try jQuery(':submit,:image',this).click(function() On Dec 23, 6:22 am, selecta gr...@delarue-berlin.de wrote: added this below jQuery(':image',this).click(function() { jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); no very beautiful code but not it works On Dec 23, 12:59 pm, selecta gr...@delarue-berlin.de wrote: repaced the line in web2py_trap_form but with an image as submit button it still reloads the whole page On Dec 23, 12:42 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you run a test for me? Edit web2py_ajax.html and replace this line: jQuery('input[type=submit]',this).click(function() with this line: jQuery(':submit',this).click(function() does it do what you ask? Massimo On Dec 22, 5:34 pm, selecta gr...@delarue-berlin.de wrote: when i use a submit button of type submit to submit the form the refresh works fine, but if i use a submit button of type image the whole page reloads, can u please change that behaviour, image buttons are just so much nicer On Dec 19, 4:19 am, mdipierro mdipie...@cs.depaul.edu wrote: http://www.web2py.com/AlterEgo/default/show/252 -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37776] Re: LOAD function anybody?
I would say assume anything of type submit and class submit are submit buttons. Personally I use a button element for my submit instead of input. -Thadeus On Wed, Dec 23, 2009 at 2:54 PM, selecta gr...@delarue-berlin.de wrote: ascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my proje -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37777] Re: LOAD function anybody?
jQuery(':submit,.submit')? On Dec 23, 2:32 pm, Thadeus Burgess thade...@thadeusb.com wrote: I would say assume anything of type submit and class submit are submit buttons. Personally I use a button element for my submit instead of input. -Thadeus On Wed, Dec 23, 2009 at 2:54 PM, selecta gr...@delarue-berlin.de wrote: ascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my proje -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37778] Re: LOAD function anybody?
Looks like that would work. -Thadeus On Wed, Dec 23, 2009 at 3:36 PM, mdipierro mdipie...@cs.depaul.edu wrote: jQuery(':submit,.submit')? On Dec 23, 2:32 pm, Thadeus Burgess thade...@thadeusb.com wrote: I would say assume anything of type submit and class submit are submit buttons. Personally I use a button element for my submit instead of input. -Thadeus On Wed, Dec 23, 2009 at 2:54 PM, selecta gr...@delarue-berlin.de wrote: ascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my proje -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37779] Re: LOAD function anybody?
Can't you just trap the submit event in web2py_trap_form instead of the button clicks? On Dec 23, 2:36 pm, mdipierro mdipie...@cs.depaul.edu wrote: jQuery(':submit,.submit')? On Dec 23, 2:32 pm, Thadeus Burgess thade...@thadeusb.com wrote: I would say assume anything of type submit and class submit are submit buttons. Personally I use a button element for my submit instead of input. -Thadeus On Wed, Dec 23, 2009 at 2:54 PM, selecta gr...@delarue-berlin.de wrote: ascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my proje -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37780] Re: LOAD function anybody?
in trunk. Please give it a try. On Dec 23, 2:44 pm, Thadeus Burgess thade...@thadeusb.com wrote: Looks like that would work. -Thadeus On Wed, Dec 23, 2009 at 3:36 PM, mdipierro mdipie...@cs.depaul.edu wrote: jQuery(':submit,.submit')? On Dec 23, 2:32 pm, Thadeus Burgess thade...@thadeusb.com wrote: I would say assume anything of type submit and class submit are submit buttons. Personally I use a button element for my submit instead of input. -Thadeus On Wed, Dec 23, 2009 at 2:54 PM, selecta gr...@delarue-berlin.de wrote: ascript and jquery just when I started with web2py ... like a month ago, so it would take me quite some time to get it right and I am desperately working in the few hours of these christmas days to push my proje -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37781] auth_membership accepts duplicates
When using Auth through appadmin, I expected that duplicated memberships would not be possible. I mean, an individual user should only be able to be a member of each group once, right? Perhaps that restriction should be enforced. - David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37782] Re: SQLite to Postgress
another thing to watch out for is reserved keywords in postgres, which has more restrictions than sqlite. Though apparently the new DAL will take care of this. On Dec 23, 8:07 am, Adolfo avizca...@gmail.com wrote: Hello I've been working with sqlite for develpment but now that i have finish with my app id like to use postgress. So i'd like to know if someone know a simple way of migrating the data in my Sqlite database to the one in Postgress. Thanks Adolfo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37783] web2py 1.74.4 is OUT
Hi Maximo, Did you update it on Mercurial too? I've executed hg update and I've got: 0 files updated, 0 files merged, 0 files removed, 0 files unresolved On Wed, Dec 23, 2009 at 1:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: It fixes two major bugs: - a problem with downloading uploaded binary files in blobs on GAE (thanks v) - a problem with unicode in mutlipart emails. (thanks Mateusz) Please report any problem. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37784] web2py 1.74.4 is OUT
Nevermind... I could fetch it... On Wed, Dec 23, 2009 at 9:19 PM, Tito Garrido titogarr...@gmail.com wrote: Hi Maximo, Did you update it on Mercurial too? I've executed hg update and I've got: 0 files updated, 0 files merged, 0 files removed, 0 files unresolved On Wed, Dec 23, 2009 at 1:33 PM, mdipierro mdipie...@cs.depaul.eduwrote: It fixes two major bugs: - a problem with downloading uploaded binary files in blobs on GAE (thanks v) - a problem with unicode in mutlipart emails. (thanks Mateusz) Please report any problem. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.comweb2py%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37785] Re: auth_membership accepts duplicates
You are right there is no check. Perhaps there should be one. Let me say anyway that the absence of this check does not result in security problems because has_membership only finds the first entry and del_membership deletes mutliple entries if found. Moreover it is easy to add the check as a validator. On Dec 23, 5:00 pm, villas villa...@gmail.com wrote: When using Auth through appadmin, I expected that duplicated memberships would not be possible. I mean, an individual user should only be able to be a member of each group once, right? Perhaps that restriction should be enforced. - David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37786] Re: How to locale web2py date calendar widget
And note that -mm-dd format is the way how mysql and sqlite keep dates. On Dec 23, 4:39 pm, Brian M bmere...@gmail.com wrote: I think that the format is controlled in the web2py_ajax.html view. try {jQuery(input.date).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d')}}, showsTime:false }); }); } catch(e) {}; try { jQuery(input.datetime).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d %H:%M:%S')}}, showsTime: true,timeFormat: 24 }); }); } catch(e) {}; Since the format string seems to be in a T() I would guess that it's possible to change that using translations? ~Brian On Dec 23, 7:29 am, Alexandre Andrade alexandrema...@gmail.com wrote: While db.convenio.data_assinatura.requires = IS_DATE(format=T('%d-%m-%Y'),error_message=T('deve ser no formato DD-MM-!')) show me the date in correct locale, the calendar widget don't show the correct date. How to locale it or make it show the correct date? -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37787] Re: auth_membership accepts duplicates
Yes, it does not cause a problem apart from unexpectedly storing redundant records. I was just mentioning it in case you thought it worthy of a fix. -D On Dec 24, 12:38 am, mdipierro mdipie...@cs.depaul.edu wrote: You are right there is no check. Perhaps there should be one. Let me say anyway that the absence of this check does not result in security problems because has_membership only finds the first entry and del_membership deletes mutliple entries if found. Moreover it is easy to add the check as a validator. On Dec 23, 5:00 pm, villas villa...@gmail.com wrote: When using Auth through appadmin, I expected that duplicated memberships would not be possible. I mean, an individual user should only be able to be a member of each group once, right? Perhaps that restriction should be enforced. - David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37788] Re: How to locale web2py date calendar widget
Mengu's right. While changing the format in web2py_ajax would make the chosen date display in the format you wanted, upon submission the form will be rejected because web2py wants only -mm-dd format. So if you go that route you'd have to do some form processing yourself to convert formats and probably not use SQLFORM. Perhaps you could add an extra field that would be updated every time the chosen date changed and have that field be in the correct format? I know that jQuery UI's datepicker has an altField option built-in, but I don't think the DynarchCalendar that web2py uses does. Maybe you could create a widget that would use the jQuery UI calendar instead? ~Brian On Dec 23, 6:54 pm, Mengu whalb...@gmail.com wrote: And note that -mm-dd format is the way how mysql and sqlite keep dates. On Dec 23, 4:39 pm, Brian M bmere...@gmail.com wrote: I think that the format is controlled in the web2py_ajax.html view. try {jQuery(input.date).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d')}}, showsTime:false }); }); } catch(e) {}; try { jQuery(input.datetime).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d %H:%M:%S')}}, showsTime: true,timeFormat: 24 }); }); } catch(e) {}; Since the format string seems to be in a T() I would guess that it's possible to change that using translations? ~Brian On Dec 23, 7:29 am, Alexandre Andrade alexandrema...@gmail.com wrote: While db.convenio.data_assinatura.requires = IS_DATE(format=T('%d-%m-%Y'),error_message=T('deve ser no formato DD-MM-!')) show me the date in correct locale, the calendar widget don't show the correct date. How to locale it or make it show the correct date? -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37789] IS_EXPR validator
Using SQLFORM I wish to make sure a date is = today. I tried using things like: Field('arrdate', 'date', requires=IS_EXPR('value = %s'% datetime.date.today().strftime('%Y-%m-%d')) ), Field('arrdate', 'date', requires=IS_EXPR('value %s'% datetime.date.today() ) ), Could anyone point me in the right direction? -David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37790] Error at startup of Web2Py
Hello, I am new to web2py. I downloaded the version 1.72.3. I have an error directly at startup. I do 'python web2py.py' to start the application server at the command line. I see this error page at http://127.0.0.1:8000/welcome/default/index: Internal error Ticket issued: welcome/127.0.0.1.2009-12-23.21-04-59.627a2785- d15a-4911-818f-8b738f9b3732. I have Python 2.6.4 running on OpenSuse 11.2 x86_64. Is it the correct way to start the server? Do I need to build something before? - Pierre -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37791] Re: How to locale web2py date calendar widget
the IS_DATE and IS_DATETIME accept a format argument. You should set it explicitly db.table.field.requires=IS_DATE(format=T('%Y-%M-%D')) then use the translation interface to translate both the string above and the calendar.js translation string. Massimo On Dec 23, 8:24 pm, Brian M bmere...@gmail.com wrote: Mengu's right. While changing the format in web2py_ajax would make the chosen date display in the format you wanted, upon submission the form will be rejected because web2py wants only -mm-dd format. So if you go that route you'd have to do some form processing yourself to convert formats and probably not use SQLFORM. Perhaps you could add an extra field that would be updated every time the chosen date changed and have that field be in the correct format? I know that jQuery UI's datepicker has an altField option built-in, but I don't think the DynarchCalendar that web2py uses does. Maybe you could create a widget that would use the jQuery UI calendar instead? ~Brian On Dec 23, 6:54 pm, Mengu whalb...@gmail.com wrote: And note that -mm-dd format is the way how mysql and sqlite keep dates. On Dec 23, 4:39 pm, Brian M bmere...@gmail.com wrote: I think that the format is controlled in the web2py_ajax.html view. try {jQuery(input.date).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d')}}, showsTime:false }); }); } catch(e) {}; try { jQuery(input.datetime).focus( function() {Calendar.setup({ inputField:this.id, ifFormat:{{=T('%Y-%m-%d %H:%M:%S')}}, showsTime: true,timeFormat: 24 }); }); } catch(e) {}; Since the format string seems to be in a T() I would guess that it's possible to change that using translations? ~Brian On Dec 23, 7:29 am, Alexandre Andrade alexandrema...@gmail.com wrote: While db.convenio.data_assinatura.requires = IS_DATE(format=T('%d-%m-%Y'),error_message=T('deve ser no formato DD-MM-!')) show me the date in correct locale, the calendar widget don't show the correct date. How to locale it or make it show the correct date? -- Atenciosamente -- = Alexandre Andrade Hipercenter.com -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37792] Re: IS_EXPR validator
Try this. requires=IS_EXPR('str(value) %s' % str(datetime.date.today())) On Dec 23, 8:26 pm, villas villa...@gmail.com wrote: Using SQLFORM I wish to make sure a date is = today. I tried using things like: Field('arrdate', 'date', requires=IS_EXPR('value = %s'% datetime.date.today().strftime('%Y-%m-%d')) ), Field('arrdate', 'date', requires=IS_EXPR('value %s'% datetime.date.today() ) ), Could anyone point me in the right direction? -David -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37793] Re: Error at startup of Web2Py
I suspect you are missing sqlite or you have an incomplete installtion. Anyway, please do the following: - download 1.74.4 since it contains many bug fixes - if you get a ticket again admin/xxx please check into web2py/ applications/admin/errors/xxx and post the content of that file. It should tell us what is wrong. Massimo On Dec 23, 8:12 pm, pierreth pierre.thibau...@gmail.com wrote: Hello, I am new to web2py. I downloaded the version 1.72.3. I have an error directly at startup. I do 'python web2py.py' to start the application server at the command line. I see this error page athttp://127.0.0.1:8000/welcome/default/index: Internal error Ticket issued: welcome/127.0.0.1.2009-12-23.21-04-59.627a2785- d15a-4911-818f-8b738f9b3732. I have Python 2.6.4 running on OpenSuse 11.2 x86_64. Is it the correct way to start the server? Do I need to build something before? - Pierre -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37794] Re: Postgresql-types limited by web2py :(
+1 For now in may project, tables with inet types is out of web2py table definition, and live with their own life. Maybe some kind plugin could make this feature works in main application? On 24 дек, 00:01, Thadeus Burgess thade...@thadeusb.com wrote: I am also curious about using the postgresql inet type. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37795] Tired of plugin_* naming schema :(
Massimo, I know with the current implementation of plugins the current spec calls for you to append plugin_ to all of the function names / database names that get called. Is there a better way of doing this? The reason I ask is that it leads to having long variable and function names... a simple query gets quite insane after a while... db(db.plugin_pingback_incoming.url == url)(db.plugin_pingback_incoming.blog_name == blog_name).select(orderby=~db.plugin_pingback_incoming.receive_date) Another annoying issue is the calling internal plugin functions, it gets just as crazy when you have to call plugin_pingback_send_pingback(decoder=plugin_pingback_pingback_decoder) Is it feasible that plug-ins could have their own namespace, this way I can call my function internally send_pingback and then in other parts of the application could access the public functions by plugin_pingback.send_pingback() ? If there is no other way... I will live... -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37796] Re: Postgresql-types limited by web2py :(
what is the inet type? On Dec 23, 9:34 pm, KMax mkostri...@gmail.com wrote: +1 For now in may project, tables with inet types is out of web2py table definition, and live with their own life. Maybe some kind plugin could make this feature works in main application? On 24 дек, 00:01, Thadeus Burgess thade...@thadeusb.com wrote: I am also curious about using the postgresql inet type. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37797] Re: Tired of plugin_* naming schema :(
The current mechanism is not optimal but as we discuss works without adding new structure. I am open to proposals. The way I deal with this is that in models I use the long name for the table db.plugin_tagging_tag but on top of the plugin controller I shorten it tag = db.plugin_tagging_tag Massimo On Dec 23, 10:02 pm, Thadeus Burgess thade...@thadeusb.com wrote: Massimo, I know with the current implementation of plugins the current spec calls for you to append plugin_ to all of the function names / database names that get called. Is there a better way of doing this? The reason I ask is that it leads to having long variable and function names... a simple query gets quite insane after a while... db(db.plugin_pingback_incoming.url == url)(db.plugin_pingback_incoming.blog_name == blog_name).select(orderby=~db.plugin_pingback_incoming.receive_date) Another annoying issue is the calling internal plugin functions, it gets just as crazy when you have to call plugin_pingback_send_pingback(decoder=plugin_pingback_pingback_decoder) Is it feasible that plug-ins could have their own namespace, this way I can call my function internally send_pingback and then in other parts of the application could access the public functions by plugin_pingback.send_pingback() ? If there is no other way... I will live... -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37798] How to load external data?
I am trying to create an application that lets a user associate the release version of an application with one or more labels from a source control system (Perforce in my case). So, the data looks something like: my_app 1.0.0 used labels: my_lib_7.2, your_lib_5.4.0, my_app_1.0.0 my_app 1.0.1 used labels: my_lib_7.2, your_lib_5.4.1, my_app_1.0.1 The idea is to make it easier to create source code difference reports for applications assembled from multiple in house components. The issue is that the label definitions live outside of web2py in Perforce's DB. Labels can be created, modified, or deleted without web2py knowing about it. I don't want to create Perforce triggers to update the Db, that would put my SCM at risk. So how should I handle this? I was thinking that when a user session is created that I query Perforce for the current set of labels and update the Db. New labels are just added, labels that have been deleted are marked somehow (a 'deleted' column?) and the various views flag deleted labels in red. Does this make sense? What's the correct place to load the data from my SCM, are there any examples where some similar external data is loaded? Thanks, C. Helck -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37799] Happy Holidays
I wish everybody Happy Holidays. I will probably be on the list as any other day. Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.