[web2py:18019] Re: the need for an ID field

2009-03-13 Thread Yarko Tymciurak
This keeps pulling at my attention, so forgive me for thinking out loud a bit more... On Fri, Mar 13, 2009 at 6:43 PM, Yarko Tymciurak wrote: *snip* > >> 2) Thanks for the ipython suggestion and the SQLDB._instances >> explanation. >> What I find obscure is the use of SQLBD._instances by itsel

[web2py:18018] Feaure request: CRYPT with SHA1

2009-03-13 Thread NguyendHEX
CRYPT validator works with MD5 only, it is great if CRYPT validator has a option to support SHA1 (or other) instead only one MD5 hash. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To p

[web2py:18017] Plotting with web2py

2009-03-13 Thread weheh
Anybody know what the state of the art is with regards to plotting with web2py? It would be great to have access to the kind of functionality like in the python matplotlib package. I downloaded PlotKitWrapper from the appliances list to test it out (it sounded promising) but it wouldn't work for

[web2py:18016] Re: Qusestion about the book?

2009-03-13 Thread Jeffield
I bought the book off of lulu and was reading it 5 min's later. Just buy it! ($12) Massimo does a really nice job of presenting the framework in a cohesive fashion. Oh, and yes its like ~250 pages long. Thanks, Jeff On Mar 13, 4:39 pm, Yarko Tymciurak wrote: > On Fri, Mar 13, 2009 at 4:24 PM, M

[web2py:18015] Re: note to self: exciting stuff

2009-03-13 Thread Zoom.Quiet
On Sat, Mar 14, 2009 at 08:12, mdipierro wrote: > > Web2py could be an excellent tool for this: > abt. Semantic Web ; SNSaaS ? hope make one app. for support Linked Data ? i suggest, make all web2py site, can exchange data/login/message through LinkedDataApp. ;-) > Video: > http://www.ted.com/in

[web2py:18014] note to self: exciting stuff

2009-03-13 Thread mdipierro
Web2py could be an excellent tool for this: Video: http://www.ted.com/index.php/talks/tim_berners_lee_on_the_next_web.html Def: http://en.wikipedia.org/wiki/Linked_Data Tech specs: http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/ Who can help? Massimo --~--~-~--~~

[web2py:18013] Re: Deleted record returning

2009-03-13 Thread Yarko Tymciurak
this may be what DenisL referred to --- sqlite's ALTER does not support column rename or column drop... http://www.sqlite.org/lang_altertable.html On Fri, Mar 13, 2009 at 6:43 PM, mdipierro wrote: > > This is definitively not a web2py issue. Nor I can reproduce it. > Could it be a sqlite issue?

[web2py:18012] Re: the need for an ID field

2009-03-13 Thread Yarko Tymciurak
On Fri, Mar 13, 2009 at 5:06 PM, DenesL wrote: > > 1) "Views" in sqlite: > > sqlite does not have ALTER TABLE ... DROP COLUMN so that explains > the "extra" fields. Ah, yes - now I see: http://www.sqlite.org/lang_altertable.html > > 2) Thanks for the ipython suggestion and the SQLDB._instanc

[web2py:18011] Re: Deleted record returning

2009-03-13 Thread mdipierro
This is definitively not a web2py issue. Nor I can reproduce it. Could it be a sqlite issue? Are you running one of the binary versions? If not, which python version? Could you make a step by step description on how to reproduce it? Massimo On Mar 13, 4:53 pm, Keith Edmunds wrote: > I'm return

[web2py:18010] Re: the need for an ID field

2009-03-13 Thread DenesL
1) "Views" in sqlite: sqlite does not have ALTER TABLE ... DROP COLUMN so that explains the "extra" fields. 2) Thanks for the ipython suggestion and the SQLDB._instances explanation. What I find obscure is the use of SQLBD._instances by itself. SQLDB is a class and yes, it has an attrib

[web2py:18009] Re: Deleted record returning

2009-03-13 Thread Yarko Tymciurak
DenisL said something similar today w/ sqlite which I didn't quite understand. You've added something - inspecting w/ sqlite to see the row isn't there... On Fri, Mar 13, 2009 at 4:53 PM, Keith Edmunds wrote: > > I'm returning to web2py after a bit of a break, so maybe things have > changed

[web2py:18008] Deleted record returning

2009-03-13 Thread Keith Edmunds
I'm returning to web2py after a bit of a break, so maybe things have changed in the intervening six months or so (well, I'm sure they have). Version 1.58 (2009-03-10 10:51:30) I have a SQLite database with a number of rows in it. I had been retrieving the rows with: todos_ds = db(db.tod

[web2py:18007] Re: the need for an ID field

2009-03-13 Thread Yarko Tymciurak
Ah, yes - would it help the update to leave _instances={}, and add _by_thread=_instances (and change all the code to reference _by_thread) Then at some future date, remove again replace _by_thread=instances with _by_thread={} (and remove _instances). Would this work? On Fri, Mar 13, 2009 at 4

[web2py:18006] Re: renaming SQLDB._instances...

2009-03-13 Thread mdipierro
The problem is that you may access a db instance that was created by another thread and the other thread could commit/rollback/close while you are using it. It would also break the linked list object that contains it. I would take this discussion off-line since I do not people to get the idea they

[web2py:18005] Re: renaming SQLDB._instances...

2009-03-13 Thread mdipierro
Yes. I will change it tonight be very very careful. This is not thread safe that is why it not exposed. Web2py only access this variable in a mutex lock which makes it thread safe, On Mar 13, 4:21 pm, Yarko Tymciurak wrote: > Hi - > We are going to rename SQLDB._instances to make it clearer (

[web2py:18004] Re: Qusestion about the book?

2009-03-13 Thread Yarko Tymciurak
On Fri, Mar 13, 2009 at 4:24 PM, Mike Axelrod wrote: > > I noticed there is a book about web2py available ob Amazon (Web2Py > Manual). The description on Amazon claims it is 256 pages long. But > the one review up there says it is only 68 pages long. What gives? Looking at my copy, P.246 is

[web2py:18003] Re: the need for an ID field

2009-03-13 Thread mdipierro
I can change the name. The problem is that if the app is accessed while you are doing this, the object has to be mutex locked. That is why this is not exposed. it is not thread safe. Massimo On Mar 13, 3:58 pm, Yarko Tymciurak wrote: > On Fri, Mar 13, 2009 at 8:58 AM, DenesL wrote: > > > On Ma

[web2py:18002] Re: How to upload a file into web2py?

2009-03-13 Thread mdipierro
Glad to hear it. On Mar 13, 1:48 pm, Joe Barnhart wrote: > Thanks Massimo -- > > I don't know what my problem was other than the view was confusing > me. > > Your code works perfectly on my end as well (Python 2.5.2 on Mac > here). The view still reports request.var.import_csv as a > "FieldSto

[web2py:18001] Re: Qusestion about the book?

2009-03-13 Thread Joe Barnhart
It is the essential reference for web2py at this point. If you are going to use web2py, it's worth wy more than $50. Yes, it has more than 68 pages (dunno where that came from). If money is tight, there is also a PDF version available on lulu.com. (see http://www.lulu.com/content/4968879)

[web2py:17999] renaming SQLDB._instances...

2009-03-13 Thread Yarko Tymciurak
Hi - We are going to rename SQLDB._instances to make it clearer (see attached thread). Since _instances is an "internal" name to a gluon defined object, there should be no backward compatibility issues, but I want to be sure no one is affected. If anyone has an opinion on what would be the "c

[web2py:18000] Qusestion about the book?

2009-03-13 Thread Mike Axelrod
I noticed there is a book about web2py available ob Amazon (Web2Py Manual). The description on Amazon claims it is 256 pages long. But the one review up there says it is only 68 pages long. What gives? I'm also thinking members of this community who own the book might want to post reviews on

[web2py:17998] Re: How to download csv file?

2009-03-13 Thread Joe Barnhart
I wrote something similar to what you want. It outputs the file directly instead of creating an intermediate file. In my case I'm selecting a set of fields in a big "join" but you can get the idea. The "hash" function is just to create a signature so I can tell if some of the fields were changed

[web2py:17997] Re: markdown..?

2009-03-13 Thread Jeffield
Thanks!! You put me back on the trail. this was the document that I remembered. http://docutils.sourceforge.net/docs/user/rst/quickref.html#tables ..a little bit later... $ sudo easy_install http://docutils.sf.net/docutils-snapshot.tgz $ rst2html.py FAQ.txt FAQ.html ..Whoohoo... Jeff On Mar 13

[web2py:17996] Re: the need for an ID field

2009-03-13 Thread Yarko Tymciurak
On Fri, Mar 13, 2009 at 8:58 AM, DenesL wrote: > > On Mar 13, 8:27 am, mdipierro wrote: > > They are listed in > > > > SQLDB._instances[thread.id] > > > > Look into SQLDB._close_all_instances in sql.py > > I know there is class SQLDB in gluon.sql, but what is this SQLDB > object? DenesL - sou

[web2py:17995] Re: markdown..?

2009-03-13 Thread Timothy Farrell
That's restuctured text. Jeffield wrote: > what converts the data below into a html table? > +---+-+ > | C1| C2 | > ++-+ > I read about something that would convert the above into an > html table... and I thought it was markdown... but I cant find a > reference

[web2py:17994] markdown..?

2009-03-13 Thread Jeffield
what converts the data below into a html table? +---+-+ | C1| C2 | ++-+ I read about something that would convert the above into an html table... and I thought it was markdown... but I cant find a reference to it now. Thanks, Jeff --~--~-~--~~--

[web2py:17993] Re: the need for an ID field

2009-03-13 Thread Yarko Tymciurak
On Fri, Mar 13, 2009 at 6:02 AM, DenesL wrote: > > On Mar 12, 10:49 pm, Yarko Tymciurak wrote: > > On Thu, Mar 12, 2009 at 9:47 PM, DenesL wrote: > > > > > Actually we are currently using views in a way. > > > When a table is migrated the old fields remain in there but we can not > > > see them

[web2py:17992] Re: SQLFORM without commit

2009-03-13 Thread mdipierro
yes. define form=SQLFORM() but instead of form.accepts(request.vars,session) call instead FORM.accepts(form,request.vars,session) On Mar 13, 1:04 pm, Kacper Krupa wrote: > Hello, > > I've a problem. I want to use SQLFORM and commit it to db manually. I > mean create form, send some dat

[web2py:17991] How to download csv file?

2009-03-13 Thread SergeyPo
Hi all, can you recommend an elegant way to download CSV file from web2py? Using gluon code, I wrote a controller function that creates good CSV for me in cStringIO object, but my recordsets are large and I'd like to stream download file. I.e. approach when I write temp file and then download it

[web2py:17990] Re: How to upload a file into web2py?

2009-03-13 Thread Joe Barnhart
Thanks Massimo -- I don't know what my problem was other than the view was confusing me. Your code works perfectly on my end as well (Python 2.5.2 on Mac here). The view still reports request.var.import_csv as a "FieldStorage" object, but the form.accepts() processing gets triggered properly an

[web2py:17989] SQLFORM without commit

2009-03-13 Thread Kacper Krupa
Hello, I've a problem. I want to use SQLFORM and commit it to db manually. I mean create form, send some data, create ready data for db insert, modify this data and at the finish insert it into database. It's possible, or i have to replace the source of web2py? --~--~-~--~~---

[web2py:17988] Re: routes_onerror in routes.py returns 303 but should return error code

2009-03-13 Thread Jim
Think the IE issue might be with small custom 404 pages: "As this page is less than 512 bytes in size, the Toolbar (and Internet Explorer, for that matter) will display an internal 404 page instead." http://www.google.com/support/forum/p/Webmasters/thread?tid=4ab6a12fada20e0d&hl=en As things

[web2py:17987] Re: web2py on gae on mac

2009-03-13 Thread mdipierro
Hi Matt, Yes, I use Mac all the time. You need to download the source code version, not the Mac binary version. Mac comes already with Python 2.5 (although the version that ships with Leopard is buggy and lacks a working bsddb module) so you should not need anything else but the GoogleLauncher.

[web2py:17986] web2py on gae on mac

2009-03-13 Thread mattynoce
hi all. i'm trying to get web2py to work through the google app engine on a mac, and i'm having some difficulty. see this thread for details: http://groups.google.com/group/web2py/browse_thread/thread/e58c2fa3212b04a7/dfcfc7ec91949acf?lnk=gst&q=web2py.app+resources#dfcfc7ec91949acf the instructi

[web2py:17985] Re: How to upload a file into web2py?

2009-03-13 Thread mdipierro
I tried this: def import_csv(): from gluon.sqlhtml import form_factory form=form_factory(SQLField('import_csv','upload')) if form.accepts(request.vars,session): request.flash='Received: %s'%request.vars.import_csv print request.vars.import_csv.filename print le

[web2py:17984] Re: the need for an ID field

2009-03-13 Thread DenesL
On Mar 13, 8:27 am, mdipierro wrote: > They are listed in > > SQLDB._instances[thread.id] > > Look into SQLDB._close_all_instances in sql.py I know there is class SQLDB in gluon.sql, but what is this SQLDB object? And, furthermore, if I have db1, db2, ... len(SQLDB._instances) == 1 (???) --~--~

[web2py:17983] Re: the need for an ID field

2009-03-13 Thread mdipierro
They are listed in SQLDB._instances[thread.id] Look into SQLDB._close_all_instances in sql.py On Mar 13, 6:02 am, DenesL wrote: > On Mar 12, 10:49 pm, Yarko Tymciurak wrote: > > > > > On Thu, Mar 12, 2009 at 9:47 PM, DenesL wrote: > > > > Actually we are currently using views in a way. > >

[web2py:17982] Re: Procedures and views in DB execute.

2009-03-13 Thread mdipierro
No. The statement below would not work. On Mar 13, 1:14 am, shuval wrote: > There is one question. How use parameters procedure DB (Firebird) in > web2py? For example org_chart("parameter"). > May be web2py not work procedure with parametres. > db.define_table('org_chart("parameter")',   SQL

[web2py:17981] Re: the need for an ID field

2009-03-13 Thread DenesL
On Mar 12, 10:49 pm, Yarko Tymciurak wrote: > On Thu, Mar 12, 2009 at 9:47 PM, DenesL wrote: > > > Actually we are currently using views in a way. > > When a table is migrated the old fields remain in there but we can not > > see them. > > I do not think so... here's an example of a recent migra

[web2py:17980] Re: Source repository confusion

2009-03-13 Thread Markus Gritsch
Hi, the source distribution contains a file 'c.py' which is not present in the repositories. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to

[web2py:17979] Re: Errata

2009-03-13 Thread Nick Leaton
No problem. As I come across any I'll let you know Nick On Fri, Mar 13, 2009 at 3:51 AM, mdipierro wrote: > > Thanks Nick. > > On Mar 12, 5:58 pm, Nick Leaton wrote: > > Web Manual. Page 129. Second bit of code > > > > 1 response.menu=[['Google',False','http://www.google.com'], > > 2 ['Index',

[web2py:17978] Re: How to upload a file into web2py?

2009-03-13 Thread Joe Barnhart
I must be doing something very wrong. The field I get back does not seem to have any of the components it should have. Here is my controlller: def import_csv(): from gluon.sqlhtml import form_factory form=form_factory(SQLField('import_csv','upload')) if form.accepts(request.vars,ses

[web2py:17977] Re: The web2py wiki is now ready for your input!

2009-03-13 Thread maplye
there is error when i use google chrome brower.. 2009/3/13 DenesL : > > By that I mean I can see the index with the [+]s but the links are a > bunch of numbers, letters and dashes. > So which one is '/docs/examples' or '/docs/howto' ? > > > --~--~-~--~~~---~--~~ Y