[web2py] Re: Compute return only the last result

2016-02-25 Thread Dave S
On Thursday, February 25, 2016 at 5:45:57 AM UTC-8, Gael Princivalle wrote: > > Hello all. > > I use this function for resizing images for full size and thumbnails: > > def SMARTHUMB(image, box, fit=True, name="thumb"): > #Downsample the image. > #@param img: Image - an Image-object >

[web2py] Re: WinINet and basic auth

2016-02-25 Thread Dave S
On Thursday, February 25, 2016 at 5:25:26 AM UTC-8, Niphlod wrote: > > oddly enough there's a "libcurl vs wininet" page on curl's site ... > > https://curl.haxx.se/libcurl/wininet.html > > Oddly enough, nothing there was particularly surprising. /dps > > > On Thursday, February 25, 2016 at

[web2py] Re: SQLFORM.factory upload field can't show link

2016-02-25 Thread killzane
This is the code in my controller form = SQLFORM.factory(Field('list_name', 'string', label='List Name'), db. project, table_name='project',upload=URL('download')) for t in db.project: query = (t.id == request.vars.id) __copydata(db(query).select(limitby=(0,1)).first(), form.vars,

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-25 Thread Rene Dohmen
Hi Massimo, you could remove me from the list: Formatics.nl I still notice a lot of doublures on the current list. Cheers, Rene -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Anthony
> Perhaps the question was ill posed, but not knowing the true role of wsgi > I don't know how I could have posted it differently. > I'd say if you don't really have an understanding of an issue, avoid definitive sensational headlines like "Preventing hackers from exploiting web2py with

Re: [web2py] Re: How to install web2py on CentOS 6.5 with Apache?

2016-02-25 Thread Fabiano Almeida
thanks Esau! 2016-02-24 19:48 GMT-03:00 Esau Hernandez Valles : > I prefer web2py nginx on Centos. I think this combination is better. > > check this link > http://mwiki.yyovkov.net/index.php/Install_Web2py_on_CentOS_6 > > On DigitalOcean there are a lot of tutorial.

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Anthony
> Perhaps the question was ill posed, but not knowing the true role of wsgi > I don't know how I could have posted it differently. Still, as I said, I > was recommended not to use wsgi and also not to use php. I was quite > surprised of being given such advice, but it was nonetheless what I

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Niphlod
np, sorry for any induced confusion. now that we established boundaries, and taking into account that actual people told you to avoid php in the same discussion, I think that those people should now elaborate what's the real anger against php and python, which, BTW, are the "language of

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Robin Manoli
Thanks for your elaborate reply Niphlod. Perhaps the question was ill posed, but not knowing the true role of wsgi I don't know how I could have posted it differently. Still, as I said, I was recommended not to use wsgi and also not to use php. I was quite surprised of being given such advice,

[web2py] Re: SQLFORM.factory upload field can't show link

2016-02-25 Thread Anthony
Can you show the code you are using to edit an existing record via SQLFORM.factory? On Thursday, February 25, 2016 at 10:50:12 AM UTC-5, killzane wrote: > > Yes, I mean when I want to edit an existing record, there are no link. > But I can find the file when use appadmin. > > Anthony於

Re: [web2py] conflict with JQuery using multiple upload

2016-02-25 Thread Ron Chatterjee
I am looking at the link you send me. How do I make it work with web2py? What's my model file and controller? On Wednesday, February 24, 2016 at 11:58:23 PM UTC-5, Ron Chatterjee wrote: > > On the high side, could have been worst. lol. Anyway, well. thanks Richard > for taking your time on

[web2py] Re: SQLFORM.factory upload field can't show link

2016-02-25 Thread killzane
Yes, I mean when I want to edit an existing record, there are no link. But I can find the file when use appadmin. Anthony於 2016年2月25日星期四 UTC+8下午10時41分32秒寫道: > > There should only be a file link if you are editing an existing record > (with an existing file). If you are displaying a "create"

[web2py] Re: SQLFORM.factory upload field can't show link

2016-02-25 Thread Anthony
There should only be a file link if you are editing an existing record (with an existing file). If you are displaying a "create" form, to what file would you expect such a link to point? Anthony On Thursday, February 25, 2016 at 4:19:10 AM UTC-5, killzane wrote: > > This is my code > form =

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Niphlod
didn't mean to startle anyone amusement is personal entertainment, meant as "if you want to try facing the hige problem by yourself and you are willing to read through tons of docs". that being said IMHO the question was/is ill posed. "wsgi" (no *U*wsgi, no *MOD_*wsgi) is just a spec.

[web2py] Compute return only the last result

2016-02-25 Thread Gael Princivalle
Hello all. I use this function for resizing images for full size and thumbnails: def SMARTHUMB(image, box, fit=True, name="thumb"): #Downsample the image. #@param img: Image - an Image-object #@param box: tuple(x, y) - the bounding box of the result image #@param fit: boolean -

[web2py] Re: WinINet and basic auth

2016-02-25 Thread Niphlod
oddly enough there's a "libcurl vs wininet" page on curl's site ... https://curl.haxx.se/libcurl/wininet.html On Thursday, February 25, 2016 at 10:19:41 AM UTC+1, Dave S wrote: > > On Thursday, February 25, 2016 at 12:12:28 AM UTC-8, Niphlod wrote: >> >> if wininet can't do basic auth, is it

[web2py] Re: For fastmail.com mail set up in web2py what should be mail.settings.server?

2016-02-25 Thread villas
Try this... ## configure email mail = auth.settings.mailer mail.settings.server = 'mail.messagingengine.com:587' mail.settings.sender = 'y...@emailaddress.com' mail.settings.login = 'youracco...@fastmail.fm:yourpassword' -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Reading view templates from database

2016-02-25 Thread R. Osinga
I already found my anser in the history of the forum On Thursday, February 25, 2016 at 12:05:56 PM UTC+1, R. Osinga wrote: > > Hi all, > > I like to offer end users a way to define their ow mail templates. > I tried using the standard templating mechanism for it, but it only > accepts files

Re: [web2py] Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Kiran Subbaraman
Robin, In support of the 'exploit' that you speak of - Is there any reported issue, or bug report, or code that you can provide a reference to? This would help understand if web2py is affected or not. I suggest you take a look at the CVE database, to see if there have been reported

[web2py] Reading view templates from database

2016-02-25 Thread R. Osinga
Hi all, I like to offer end users a way to define their ow mail templates. I tried using the standard templating mechanism for it, but it only accepts files from fixk. Is it possible for me to 'bend' this functionality into reading a templace (and its parent tamplates) from the database?

Re: [web2py] Re: Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Robin Manoli
Don't worry, I didn't disregard the information. The answer is not what I'm looking for however. Even if apache is amusingly complicated for Niphlod, the issue at hand has nothing to do with apache. The issue is to figure out how to find out how to prevent GET requests exploited through web2py.

[web2py] Re: WinINet and basic auth

2016-02-25 Thread Dave S
On Thursday, February 25, 2016 at 12:12:28 AM UTC-8, Niphlod wrote: > > if wininet can't do basic auth, is it web2py's fault ?!?!?! > curl is available also on windows :-P and it's pretty much the de-facto > reference. if it works with curl but not with wininet, it's wininet fault. > So it

[web2py] SQLFORM.factory upload field can't show link

2016-02-25 Thread killzane
This is my code form = SQLFORM.factory(Field('list_name', 'string', label='List Name'), db. project, table_name='project',upload=URL('download')) And here is my db.py about upload field Field('project_pdf', 'upload', label='Project PDF', comment='', uploadfolder ='app/uploads'), When I use

[web2py] Re: Multiple instances of same class

2016-02-25 Thread killzane
thanks, it works! Anthony於 2016年1月22日星期五 UTC+8上午7時02分36秒寫道: > > You have defined __name as a class attribute, so it belongs to the class, > not to individual instances of it. Instead, just use self.__name if you > want the name to be associated with a particular instance of the class. > >

Re: [web2py] Re: Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Marin Pranjić
Wow, some people are soo easily offended. I don't see a single rude word here, it's helpful and informative answer, and it should help you unmix things :) His answer could be the best thing you read today, so I hope you don't just discard it because it's not wrapped up with fake politeness.

[web2py] Re: Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Robin Manoli
They recommended not to use wsgi, and so far I've been using mod_wsgi. Sorry if I didn't know everything about wsgi. Thanks for the tips! Maybe I can amuse myself with some rude people on help forums too? You know Niphlod, this is not the first time you're answering to me in a rude way. Are

[web2py] Re: WinINet and basic auth

2016-02-25 Thread Niphlod
if wininet can't do basic auth, is it web2py's fault ?!?!?! curl is available also on windows :-P and it's pretty much the de-facto reference. if it works with curl but not with wininet, it's wininet fault. as for digest auth, no, web2py doesn't support it out of the box. On Thursday, February

[web2py] Re: Setting up the scheduler, and letting it run from a certain point of time

2016-02-25 Thread Niphlod
if anyone wants to familiarize with the scheduler, I always recommend https://github.com/niphlod/w2p_scheduler_tests -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

[web2py] Re: Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Niphlod
IMHO you're really confused. or got names wrong. or got things wrong. wsgi IS THE ONLY WAY to run python code for webservers. It's the only standardized spec to do so. Nooow, if you're instead talinkg about mod_wsgi on apache, it's another matter entirely. Securing apache needs to be done by