[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 is

[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 24

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

2009-05-24 Thread dlypka
I see the fine distinction is that python has decimal 'support' but no decimal 'type' The decimal 'support' is described here http://www.network-theory.co.uk/docs/pytut/DecimalFloatingPointArithmetic.html I don't see how you can mimic aggregation of a decimal type using that 'virtual' decimal ide

[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 subs

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

2009-05-24 Thread Francois (Jersey)
I thought that Python, since version 2.4 could deal with decimal. Please have a look at the link http://docs.python.org/library/decimal.html Am I missing something? If Python can deal with decimal and the database can as well, would it make sense to have decimal implemented in Web2py? Apologies,

[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 me

[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 service-architectu

[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 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 need o refresh

[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 (r=request,f='crud_add

[web2py:22549] auth redirection problem

2009-05-24 Thread Horst Herb
In controller "default", I have defined def user(): return dict(form=auth()) and the usual /myapp/default/user/login etc works just fine In another controller"patient" I have functions like @auth.requires_membership('staff') def somecontroller() do something In the model, I have se

[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)" 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 something? If Python can deal

[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 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 > application. E.g. R

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

2009-05-24 Thread mdipierro
The latest one should work, does it not? On May 24, 6:20 am, murray3 wrote: > Static RSS Module just "Loading" is there a fix for this? > chrism > > On May 21, 5:51 pm, murray3 wrote: > > > just some feedback, I work of a netbook with win xp and Iexplorer > > 6.0.2 installed (although i always

[web2py:22553] Re: executesql is safe?

2009-05-24 Thread carlo
I would add that in appadmin.py there are several examples for using DAL when table and field names are generated at "runtime". carlo On 24 Mag, 08:09, mdipierro wrote: > > But I have some questions: > > > 1.- Is more safe to use  executesql? > > It is less safe because you must validate values

[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, c='default

[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 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 been sent alre

[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 wrote: > Here is my problem. > There is a javascript app that does asyncronous file upload. > It works nice with web2py when I test

[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 wrote: > I would add that in appadmin.py there are several examples for using > DAL when table and field nam

[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 > auth

[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 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 delete the > record.

[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)" wrote: > Floats can not be used, as float may give a different result from > decimal, and this is not acceptable for financia

[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:22563] Re: shouldn't tickets return HTTP(500)?

2009-05-24 Thread mdipierro
If you find a workaround I am happy to change this. On May 24, 9:57 am, Alexey Nezhdanov wrote: > В сообщении от 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

[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 --~--~-~--~~~---~--~---

[web2py:22565] Re: auth redirection problem

2009-05-24 Thread mdipierro
uploading in trunk now. On May 24, 9:44 am, mdipierro wrote: > 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.

[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 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)" > > > > wrote: > > Floats

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

2009-05-24 Thread Alexey Nezhdanov
Please see the patch attached. Tested with IE6, I don't have any others under the hand, but deciding on what I've found on the Net - it should work for IE7 too at least. On Sunday 24 May 2009 18:59:57 mdipierro wrote: > If you find a workaround I am happy to change this. > > On May 24, 9:57 am,

[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 subscr

[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 do

[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 --~--~-~--~~~---~--~~ Y

[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 lift

[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 > > 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 d

[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 wrote: > forget it. I did it. > > Massimo > > On May

[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 fr

[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 wrote: > 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.

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

2009-05-24 Thread mdipierro
send. thanks Alexey, sorry if I am slow to keep up with your patches. On May 24, 10:41 am, Alexey Nezhdanov wrote: > Please see the patch attached. Tested with IE6, I don't have any others under > the hand, but deciding on what I've found on the Net - it should work for IE7 > too at least. > > O

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

2009-05-24 Thread mdipierro
I am looking into this and the more I do the more I am convinced there is not make to implement it so that it behaves the same on all database backends if they do not support Decimal (and sqlite for examples does not). Anyway, I am still working on this... On May 24, 1:33 pm, Yarko Tymciurak wr

[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 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 version 3 is in

[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 wrote: > Massimo,

[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 t

[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 wrote: > https://www.web2py.com/jpolite/default/main#t7 > > shows static rss as loading. > > I presume this is using the

[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 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 cours

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

2009-05-24 Thread Yarko Tymciurak
This is a bit long, so I will summarize here: At this point, I recommend web2py support a decimal type in DAL, but it will be support of the Python-decimal "type" (class) and optimized backend storage for the Python form. Given the stated desires (accuracy) I lay out why this is what makes sense.

[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 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) > backend spec

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

2009-05-24 Thread Yarko Tymciurak
On Sun, May 24, 2009 at 7:39 PM, Yarko Tymciurak wrote: > > .. (Clearly, string would be the simplest for these mixed*comutation > *, high demand applications). > *comPutation* (debug mode browsers can't keep up w/ my typing speed?! ;-) > > >> >> Regards, >> - Yarko >> >> >> --~--

[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 expressi

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

2009-05-24 Thread Yarko Tymciurak
*sigh* yes, I am coming around to this simple awareness... and there appears to be no unified decimal approach to sqlite (from what I can tell) On Sun, May 24, 2009 at 7:53 PM, mdipierro wrote: > > For those db that support decimal, decimal is stored as a string but > treated as double

[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 plugins

[web2py:22592] Re: small paid project with web2py and nicEditor

2009-05-24 Thread Richard
hi Horst, I have emailed an example that implements image upload from nicEdit. Notes: * nicEdit.js 1368: set nicURI to: '/nicedit_upload/default/ upload', * nicEdit.js 1391: removed ImageShack string * The image data from nicEdit comes as a FieldStorage: http://python.about.com/od/cg

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

2009-05-24 Thread Iceberg
IMHO, the default JSONEncoder need not be serialized into javascript Date objects, otherwise it is troublesome when using in non-js situation. But we can have another subclass, say JSONEncoderForJs, for that purpose. See also the docstring of JSONEncoder: To extend this to recognize other obj

[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 wrote: > Hello > > Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need > to install W2P. > > Thanks, > Pynthon --~--~-~--

[web2py:22595] Re: small paid project with web2py and nicEditor

2009-05-24 Thread Horst Herb
On Mon, May 25, 2009 at 11:28 AM, Richard wrote: > > hi Horst, > > I have emailed an example that implements image upload from nicEdit. > > Notes: >* nicEdit.js 1368: set nicURI to: '/nicedit_upload/default/ > upload', >* nicEdit.js 1391: removed ImageShack string >* The image data fr

[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 y

[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:22598] Re: Version reports a 1.62.3 (2009-05-19 23:25:03) as newest version

2009-05-24 Thread Yannick
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, Yannick P. On May 24, 10:11 pm, mikech wrote: > But the windows version installs as (2009-05-19 23:24:39).  I've > downloaded the newest zip from

[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:', INPUT(_name='lastnam

[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 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, > Yannick P. > >

[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 = SQLCustomType(native='NUMERIC(10,2)',decoder=(lambda

[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 s