[web2py:22538] Re: executesql is safe?

2009-05-24 Thread mdipierro
But I have some questions: 1.- Is more safe to use  executesql? It is less safe because you must validate values yourself to avoid SQL- injection vulnerabilities. 2.- Advantage and disadvantage of executesql? No advantage if you have the option not to use it. If you need to build a query

[web2py:22539] Re: Non-relational databases

2009-05-24 Thread Yarko Tymciurak
Note that testing of appengengine specific development can / should be able to go on local machines; I haven't tried it, but I will remind of the announcement in http://googleappengine.blogspot.com/2009/05/web2py-support-new-datastore-backend.html of the datastore backend - claiming to be more

[web2py:22541] progress bar with javascript

2009-05-24 Thread Alexey Nezhdanov
And here is another thing with the same javascript app. While uploading a file it checks for the upload status. It would be more proper, of course, just to ask browser, how much has been sent already, but I do not know if javascript is allowed to do that. So it asks web2py. And though web2py

[web2py:22540] shouldn't tickets return HTTP(500)?

2009-05-24 Thread Alexey Nezhdanov
Here is my problem. There is a javascript app that does asyncronous file upload. It works nice with web2py when I test it on localhost, but when I deliberately tried it over a slow link, I got this: Traceback (most recent call last): File /home/snake/python/horst/web2py/gluon/main.py, line

[web2py:22543] running epydoc

2009-05-24 Thread HansD
Hi, just installed epydoc (on windows) and tried running it on web2py. I'm encountering the following, but cannot make sense of it: UNEXPECTED ERROR: 'str' object has no attribute '_identifiers' --~--~-~--~~~---~--~~ You received this message because you are

[web2py:22545] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread Francois (Jersey)
Floats can not be used, as float may give a different result from decimal, and this is not acceptable for financial applications: An explanation of the difference can be found at http://docs.python.org/library/decimal.html --~--~-~--~~~---~--~~ You received this

[web2py:22546] Service-provider and Oauth

2009-05-24 Thread notabene
Hi web2py-folks! I am missing 3 legged auth of user, through consumer, to service provider? Web2py has most of the basic elements for building a service-provider application. E.g. REST, json, xml. xml-rpc etc. As I see it - the only (?) missing element is Auth (/Oauth). In a

[web2py:22547] Re: jPolite solved (almost) all our problems

2009-05-24 Thread murray3
Static RSS Module just Loading is there a fix for this? chrism On May 21, 5:51 pm, murray3 ch...@murraypost.net wrote: just some feedback, I work of a netbook with win xp and Iexplorer 6.0.2 installed (although i always use firefox by default!). In IExplorer the tabs tend to disappear and you

[web2py:22548] Check to delete

2009-05-24 Thread annet
In my application I got custom create/retrieve and update/delete functions in which I call the default web2py functions: e.g. crud.create() In one of my update functions the user should be able to delete the record. This: form=crud.update(db.adres,request.args[0],next=(URL

[web2py:22550] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread mdipierro
You win. This is a good point. I will add Decimal support. On May 24, 5:05 am, Francois (Jersey) francois.ches...@googlemail.com wrote: I thought that Python, since version 2.4 could deal with decimal. Please have a look at the linkhttp://docs.python.org/library/decimal.html Am I missing

[web2py:22551] Re: Service-provider and Oauth

2009-05-24 Thread mdipierro
we have CAS but we do need to improve it or add something better On May 24, 5:14 am, notabene niels...@gmail.com wrote: Hi web2py-folks! I am missing 3 legged auth of user, through consumer, to service provider? Web2py has most of the basic elements for building a service-provider

[web2py:22554] Re: auth redirection problem

2009-05-24 Thread annet . vermeer
Horst, As far as I know Web2py doesn't know auth.settings.logout_next() After logout and failed requires_login web2py goes to auth.settings.login_url() I changed this default behaviour by calling logout in a custom logout function: def logout(): auth.logout(next=URL(r=request,

[web2py:22555] Re: progress bar with javascript

2009-05-24 Thread mdipierro
I do not know. I fyou have any idea, let us know. On May 24, 2:23 am, Alexey Nezhdanov snak...@gmail.com wrote: And here is another thing with the same javascript app. While uploading a file it checks for the upload status. It would be more proper, of course, just to ask browser, how much has

[web2py:22556] Re: shouldn't tickets return HTTP(500)?

2009-05-24 Thread mdipierro
This was discussed tome time ago. In principle you are correct but if tickets are not 200 OK IE does not display them. Massimo On May 24, 2:17 am, Alexey Nezhdanov snak...@gmail.com wrote: Here is my problem. There is a javascript app that does asyncronous file upload. It works nice with

[web2py:22557] Re: executesql is safe?

2009-05-24 Thread mdipierro
yes. basically db.tablename is the same as db['tablename'] and db.tablename.fieldname is the same as db['tablename']['fieldname'] and db.tablename['fieldname'] On May 24, 9:09 am, carlo syseng...@gmail.com wrote: I would add that in appadmin.py there are several examples for using DAL when

[web2py:22558] Re: auth redirection problem

2009-05-24 Thread mdipierro
I guess we need to add a logout_text. ;-) If somebody sends me a patch this gets done sooner. Massimo On May 24, 9:25 am, annet.verm...@gmail.com wrote: Horst, As far as I know Web2py doesn't know auth.settings.logout_next() After logout and failed requires_login web2py goes to

[web2py:22559] Re: Check to delete

2009-05-24 Thread mdipierro
I will add a settings for this too On May 24, 7:44 am, annet annet.verm...@gmail.com wrote: In my application I got custom create/retrieve and update/delete functions in which I call the default web2py functions: e.g. crud.create() In one of my update functions the user should be able to

[web2py:22560] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread mdipierro
Can you help me on this by providing an example of decimal statement in create table for each of the supported databases? Massimo On May 24, 5:07 am, Francois (Jersey) francois.ches...@googlemail.com wrote: Floats can not be used, as float may give a different result from decimal, and this is

[web2py:22561] Re: Check to delete

2009-05-24 Thread annet . vermeer
Massimo, Thanks. Could you give an estimate of when this setting will be added? Kind regards, Annet --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email

[web2py:22562] Re: shouldn't tickets return HTTP(500)?

2009-05-24 Thread Alexey Nezhdanov
В сообщении от Sunday 24 May 2009 18:42:27 mdipierro написал(а): This was discussed tome time ago. In principle you are correct but if tickets are not 200 OK IE does not display them. Oh. Isn't IE just doesn't display non-200 pages that are smaller than some specific size? Anyways, I have IE

[web2py:22564] Re: Check to delete

2009-05-24 Thread mdipierro
On a second look, it is there already: auth.settings.update_deletable=False On May 24, 9:54 am, annet.verm...@gmail.com wrote: Massimo, Thanks. Could you give an estimate of when this setting will be added? Kind regards, Annet --~--~-~--~~~---~--~~ You

[web2py:22566] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread dlypka
I wish it were so easy to deal with Microsoft... On May 24, 10:50 am, mdipierro mdipie...@cs.depaul.edu wrote: Can you help me on this by providing an example of decimal statement in create table for each of the supported databases? Massimo On May 24, 5:07 am, Francois (Jersey)

[web2py:22568] Re: Check to delete

2009-05-24 Thread annet . vermeer
Massimo, Thanks. To change the default behaviour of a single function I used: form=crud.update(db.bedrijf,auth.user.bedrijf,next=(URL (r=request,f='update_company')),deletable=False) Annet. --~--~-~--~~~---~--~~ You received this message because you are

[web2py:22569] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread Yarko Tymciurak
from curiousity, I just read thru the lib docs, and the module source (./Lib/decimal.py)... It seems like mapping the various DB's rules (for example, see the allowed conversions chart from T-SQL here: http://msdn.microsoft.com/en-us/library/ms187928.aspx) ... and then running the doctests that

[web2py:22570] Another Browser...

2009-05-24 Thread Yarko Tymciurak
I ... needed a break from my computer so I (?!) tried to build / test / debug something that isn't python, that I haven't worked on for a break (ha!) Chrome is open source, and version 3 is in a reasonably functional state for Linux (I am using it at this moment), as well as for Mac, If you too

[web2py:22571] Spatial???

2009-05-24 Thread haftish21
I'm commencing my MSc thesis work entitled Customization of Spatial Database Consistency on Web Frameworks: the case of web2py. I picked web2py cos I saw many interesting features in it while I was trying to scan all python-programmed web frameworks out there. I can say that I'm just very new to

[web2py:22572] Why?

2009-05-24 Thread Pynthon Pynthon
Hello I'm getting confused. Can someon explain this code? redirect(URL(r = request, f = first)) I know it says redirect to a function. But why the URL and why the r = request. I can't find anything in the book about it. Thanks, Pynthon --~--~-~--~~~---~--~~

[web2py:22573] Re: Why?

2009-05-24 Thread weheh
redirect is meant to send the web page to a URL address. I haven't tried it myself, but I assume you could say redirect(http://www.google.com;) URL(r=request,f='first') will generate a url that will direct you to your application's function named 'first'. The URL function does the heavy

[web2py:22574] Re: Why?

2009-05-24 Thread Omar Munk
Thanks, and indeed. I also want to know what r = request is for. 2009/5/24 weheh richard_gor...@verizon.net redirect is meant to send the web page to a URL address. I haven't tried it myself, but I assume you could say redirect(http://www.google.com;) URL(r=request,f='first') will

[web2py:22575] Re: simplejson and date/datetime help

2009-05-24 Thread weheh
Massimo, are you saying that simplejson now supports datetime? If yes, hallelujah! It's been a real pain converting all my datetimes in my calendar program to strings, so this would simplify my code considerably. On May 23, 1:57 am, mdipierro mdipie...@cs.depaul.edu wrote: forget it. I did it.

[web2py:22576] Re: Why?

2009-05-24 Thread Yarko Tymciurak
See section 4.10 in the book, URL - pp. 102-103 should tell you what you want to know. Additionally, if you look at the table on p.97, at the end of section 4.6, Request --- you will see that the request holds everything that URL needs - you modify what you want, and so get relative action from

[web2py:22577] Re: jPolite solved (almost) all our problems

2009-05-24 Thread murray3
https://www.web2py.com/jpolite/default/main#t7 shows static rss as loading. I presume this is using the latest code, or is there an update somewhere else? I'm still playing with google maps, just realised you have to define things in jquery.myext.js maybe gmap has to be defined here? otherwise

[web2py:22578] Re: Why?

2009-05-24 Thread Yarko Tymciurak
On Sun, May 24, 2009 at 3:16 PM, Pynthon Pynthon forumx...@gmail.comwrote: Hello I'm getting confused. Can someon explain this code? redirect(URL(r = request, f = first)) I know it says redirect to a function. But why the URL and why the r = request. I can't find anything in the book

[web2py:22581] Re: Another Browser...

2009-05-24 Thread mdipierro
Yes this would be nice. Please teach us how to... On May 24, 2:05 pm, Yarko Tymciurak yark...@gmail.com wrote: I ... needed a break from my computer so I (?!) tried to build / test / debug something that isn't python, that I haven't worked on for a break  (ha!) Chrome is open source, and

[web2py:22582] Re: simplejson and date/datetime help

2009-05-24 Thread mdipierro
yes it does in the sense that you can serialize date, datetime and time objects using web2py's simplejson but they are serialized into isostrings, not javascript date objects. Should they be serialized into javascript Date objects? pros? Cons? Massimo On May 24, 3:28 pm, weheh

[web2py:22583] Re: Why?

2009-05-24 Thread mdipierro
normally you would call the URL function this way: URL('application','controller','function',args=[], vars={}) as a shortcut URL can figure the application, the controller and the function from the current request URL(r=request) is the url currently requested and you can override for example

[web2py:22584] Re: jPolite solved (almost) all our problems

2009-05-24 Thread mdipierro
That's the latest one. If you could explain better which problems you are having with it, I will try fix them. This is very much under development. On May 24, 5:33 pm, murray3 ch...@murraypost.net wrote: https://www.web2py.com/jpolite/default/main#t7 shows static rss as loading. I presume

[web2py:22585] Re: progress bar with javascript

2009-05-24 Thread Richard
I think you will need to use AJAX to periodically query the server to determine how much is uploaded. On May 24, 5:23 pm, Alexey Nezhdanov snak...@gmail.com wrote: And here is another thing with the same javascript app. While uploading a file it checks for the upload status. It would be more

[web2py:22587] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread Yarko Tymciurak
On Sun, May 24, 2009 at 7:24 PM, Yarko Tymciurak yark...@gmail.com wrote: . The warning then would be that if you declare DECIMAL in DAL, it is Python-Decimal, and backend storage is determined by DAL. IF you need stored procedure calculations on your backend, that is (by definition)

[web2py:22589] Re: DECIMAL or NUMERIC type for database fields

2009-05-24 Thread mdipierro
For those db that support decimal, decimal is stored as a string but treated as double for comparison and expressions. If the db does not support decimal we have to make a choice: store as string or store as double. If we choose to store it as a strings results involving comparisons and

[web2py:22591] Re: progress bar with javascript

2009-05-24 Thread mdipierro
I do not think this is a good idea but the server may now know. The data may be uploaded to ram (or temporary buffer) allocated by a thread and another request may not have access yo (or be able to idetify which) thread. I thin it is the client that needs to keep track and there are jquery

[web2py:22594] Re: Hosting

2009-05-24 Thread Yannick
Hello Pynthon have you tried this hosting company ? http://www.star-nix.com/hosting/ Good luck, Yannick P. On May 23, 3:38 pm, Pynthon Pynthon forumx...@gmail.com wrote: Hello Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need to install W2P. Thanks, Pynthon

[web2py:22596] Version reports a 1.62.3 (2009-05-19 23:25:03) as newest version

2009-05-24 Thread mikech
But the windows version installs as (2009-05-19 23:24:39). I've downloaded the newest zip from the site and deleted the root directory. The version still shows as needing an update, how do I fix this? Mike --~--~-~--~~~---~--~~ You received this message because

[web2py:22597] Multiple Form Best Practise

2009-05-24 Thread Yannick
Hello Mate, I have a page called index.html with several form inside... here is a sample of my code: ## #Controller: ## @auth.requires_login() def pwdSetting(): return dict(chg_pwd = auth.change_password()) @auth.requires_login() def profileSetting(): # Some

[web2py:22599] Re: Multiple Form Best Practise

2009-05-24 Thread mdipierro
I believe the problem is that profileSet.latest is created bu SQLFORM.accepts and not FORM.accepts. Consider replacing this settingform = FORM('First Name:', INPUT(_name='firstname', requires=IS_NOT_EMPTY(), value= %s%default_firstname), 'Last Name:',

[web2py:22600] Re: Version reports a 1.62.3 (2009-05-19 23:25:03) as newest version

2009-05-24 Thread mdipierro
Yes, this is a known problem with the windows version. I will fix it asap. Massimo On May 24, 9:40 pm, Yannick ytchatch...@gmail.com wrote: Sorry maybe I don't understand but did you downloaded it from web2py.com ? Because from the website the latest version is still set as 1.62.3 Thanks,

[web2py:22601] experimental: decimal and pickable and custom columns

2009-05-24 Thread mdipierro
I do not know if this is a good idea and I'd like to hear your opinions: I have added in trunk to define custom column types Here is an example of usage: import cPickle from gluon.sql import SQLCustomType from decimal import Decimal decimal =

[web2py:22602] Re: experimental: decimal and pickable and custom columns

2009-05-24 Thread Alexey Nezhdanov
I think that's handy. Dropping cross-db compartibility is bad indeed, but you just need to have a big warning in the place where user have to make that choice. Also - I don't think that you can safely replace ' with on pickled object. Most likely you are ruining it. Either proper sql escaping