[web2py:32991] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread ed
Hi Massimo, Congratulations! Glad to hear that, will buy it. I like the hard copy than the digital. Cheers! Ed On Oct 16, 11:03 am, mdipierro wrote: > Today I bought a few copy of the book (and for the record they charge > me the same price as you for the book). I noticed something strange > wit

[web2py:32992] Re: How can I set a view to a controller manually?

2009-10-16 Thread Iceberg
Newbie should really read through the built-in documents. It takes some time but it is worthy! http://www.web2py.com/examples/default/examples The response.view trick is mentioned inside. On Oct15, 7:12pm, Renato-ES-Brazil wrote: > Simple and perfect! > > Thanks. > > On Oct 14, 9:56 pm, mdipi

[web2py:32993] Re: SQLFORM.factory conditional Field in form

2009-10-16 Thread ed
Hi Boris, Thank you, will try using "no_table_". I am still grappling with jQuery. I have a 2 select options as condition to implement. Thanks again. Ed On Oct 15, 7:12 pm, Boris Manojlovic wrote: > no_table_fieldname > > so "no_table" is what you need > > On Thu, Oct 15, 2009 at 8:55 AM, ed wr

[web2py:32994] Re: vim for the admin editor

2009-10-16 Thread Benigno
LoL, didnt know this project, it was a good laugh to use Vi right on the screen... I love and use Vim all the time, but my personal opinion is that not so many people would be delighted with the idea to start with, but whats more important, the people that use Vim, ussually just skip straight awa

[web2py:32995] Re: web2py + matplotlib, is there a how-to posted

2009-10-16 Thread Vincent
Thanks this will help me get started. I have a simulation and plots that I would like to turn into a web app. Vincent On Oct 15, 3:08 pm, mdipierro wrote: > Thanks. > > On Oct 15, 4:00 pm, weheh wrote: > > > Massimo, I've reviewed your slide presentation and have the following > > comments (pag

[web2py:32996] import module from modules

2009-10-16 Thread leone
I try to import a module of py files (initialized by __init__.py) and that is set in applications/myapp/modules folder, but I receive errors about import. from applications/myapp/modules/mymodule import * fails! Is it possible this approach or I have to put py files directly under / modules

[web2py:32997] Re: How can I set a view to a controller manually?

2009-10-16 Thread Renato-ES-Brazil
Iceberg, I have read the manual and looked up quickly at him about this question, but I looked for wrong words like "layout" and "template". Anyway, sorry. On Oct 16, 5:13 am, Iceberg wrote: > Newbie should really read through the built-in documents. It takes > some time but it is worthy! >  h

[web2py:32998] Re: vim for the admin editor

2009-10-16 Thread Vasile Ermicioi
EditArea that is used is very annoying ... Often in copy paste operations I am getting unexpected results in the editor.I would propose to switch to CodeMirror http://marijn.haverbeke.nl/codemirror/contrib/python/index.html On Fri, Oct 16, 2009 at 1:26 PM, Benigno wrote: > > LoL, didnt know this

[web2py:32999] Issue running doctest with decorated functions

2009-10-16 Thread rboissat
Hi, I'm using web2py v1.66.2 and I have some issues to run doctest within the admin app. Indeed, when a function in a controller is decorated, let's say with @auth.requires_login(), then the tests from doctests are not running and are marked as "[no doctest]". I assume this is due to the lack o

[web2py:33000] Re: Case sensitive application name

2009-10-16 Thread mdipierro
Actually Yes. Should this be different? On Oct 15, 11:15 pm, "mr.freeze" wrote: > http://web2py.com/AlterEgoworks.http://web2py.com/alteregodoesn't. > > Is this by design? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

[web2py:33001] Re: import module from modules

2009-10-16 Thread mdipierro
If you module is a file applications/mypp/modules/mymodule.py then you should be able to import is with from applications.myapp.modules.mymodule import * or exec('from applications.%s.modules.mymodule import *' % request.application) It is important that the module itself imports ot

[web2py:33002] Re: vim for the admin editor

2009-10-16 Thread mdipierro
I did not know about this project and I think the author is the same Tim as this list. Tim, are you? Unfortunately, it does not work well for me (Firefox on Mac). Massimo On Oct 16, 6:22 am, Vasile Ermicioi wrote: > EditArea that is used is very annoying ... Often in copy paste operations I >

[web2py:33003] Re: Issue running doctest with decorated functions

2009-10-16 Thread mdipierro
On Oct 16, 4:32 am, rboissat wrote: > Hi, > > I'm using web2py v1.66.2 and I have some issues to run doctest within > the admin app. > > Indeed, when a function in a controller is decorated, let's say with > @auth.requires_login(), > then the tests from doctests are not running and are marked as

[web2py:33004] Re: How can I set a view to a controller manually?

2009-10-16 Thread mdipierro
Notice you can also do def index(): return response.render('default/myview.html',a=5,b=8) where a,b are the vars to be passed to the view. On Oct 16, 6:16 am, Renato-ES-Brazil wrote: > Iceberg, > > I have read the manual and looked up quickly at him about this > question, but I looked for

[web2py:33005] Re: Case sensitive application name

2009-10-16 Thread mr.freeze
No, I think you are right (after doing some reading). Can I use routes.py to make my application name (or entire url) case insensitive? On Oct 16, 8:34 am, mdipierro wrote: > Actually Yes. Should this be different? > > On Oct 15, 11:15 pm, "mr.freeze" wrote: > > > > > > >http://web2py.com/Alte

[web2py:33006] Re: Issue running doctest with decorated functions

2009-10-16 Thread rboissat
Hi Massimo :) Thanks to your message I could code a tiny python decorator to bypass auth.requires_login(), when the code gets tested in web2py (i.e request.function = "_TEST"). There is the code: def if_test_no_auth(): def decorator(f): if request.function != '_TEST': f

[web2py:33008] Re: Issue running doctest with decorated functions

2009-10-16 Thread rboissat
One issue though, with the code given above for instantiating a dummy env, I get this traceback: http://oxynux.org/pastebin/lbc6tu-534 It seems that in the line: SQLDB._set_thread_folder(os.path.join(request.folder, 'databases')) request.folder is NoneType, therefore making os.path.join fail.

[web2py:33009] Re: Case sensitive application name

2009-10-16 Thread Julio
Be careful going the "windows" route, this can make many of the non- windows based web crawlers and indexers (read: a LARGE part of the internet) have issues with it, for example, http://yoursite.com/YourResource may be indexed and show up in the first page of your browser search engine results, b

[web2py:33010] Re: Case sensitive application name

2009-10-16 Thread mdipierro
Yes and no. you would have to build a regex to include all possible combinations. horrible. On Oct 16, 9:32 am, "mr.freeze" wrote: > No, I think you are right (after doing some reading).  Can I use > routes.py to make my application name (or entire url) case > insensitive? > > On Oct 16, 8:34 am

[web2py:33011] Re: Issue running doctest with decorated functions

2009-10-16 Thread mdipierro
I cannot say on top of my head. I would look into the build_environment when/where that is set. Thanks for looking into this. It is an important problem that needs to be solved. Massimo On Oct 16, 10:03 am, rboissat wrote: > One issue though, with the code given above for instantiating a dummy

[web2py:33012] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Thadeus Burgess
Is this the print with errata fixed, or does errata alterego still need to be referenced? Still debating whether buying it now or waiting to version 3 lol. -Thadeus On Fri, Oct 16, 2009 at 2:40 AM, ed wrote: > > Hi Massimo, > Congratulations! > Glad to hear that, will buy it. I like the har

[web2py:33013] new on web2pyslices.com: code select

2009-10-16 Thread mr.freeze
When you create a slice, any code sections will automatically get a 'Select' button that lets you select their contents. Handy for copying code. Enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" g

[web2py:33014] Re: Case sensitive application name

2009-10-16 Thread mr.freeze
Sounds treacherous. I'll skip it. Thanks anyway. On Oct 16, 10:06 am, mdipierro wrote: > Yes and no. you would have to build a regex to include all possible > combinations. horrible. > > On Oct 16, 9:32 am, "mr.freeze" wrote: > > > No, I think you are right (after doing some reading).  Can I u

[web2py:33015] Re: A simple patch to provide upload progress

2009-10-16 Thread AndCycle
would you? :p On Oct 15, 2:03 pm, mdipierro wrote: > yes. Thank you! We should post a web2pyslice about this. > > On Oct 14, 11:50 pm, Richard wrote: > > > is this it?http://pastebin.com/f69e7b008 > > > On Oct 15, 11:55 am, mdipierro wrote: > > > > I remember the author of the patch posted an

[web2py:33016] Re: Case sensitive application name

2009-10-16 Thread Thadeus Burgess
I dislike capital letters in the URL, just because of case in-sensitive websites. You type it in to the address bar, and you get a 404. http://tools.ietf.org/html/rfc3986 All though the document it talks about how URL/URI should be case-insensitive. 6.2.2.1 is the most relevant. That being said

[web2py:33017] Re: Case sensitive application name

2009-10-16 Thread Jonathan Lundell
On Oct 16, 2009, at 7:32 AM, mr.freeze wrote: > No, I think you are right (after doing some reading). Can I use > routes.py to make my application name (or entire url) case > insensitive? You could in principle (by patching rewrite.py) force all incoming paths to lower case, which would accom

[web2py:33018] Re: Case sensitive application name

2009-10-16 Thread Jonathan Lundell
On Oct 16, 2009, at 8:41 AM, Thadeus Burgess wrote: > I dislike capital letters in the URL, just because of case in- > sensitive websites. You type it in to the address bar, and you get a > 404. > > http://tools.ietf.org/html/rfc3986 > > All though the document it talks about how URL/URI should

[web2py:33019] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread mdipierro
The process of printing a book is very long. This is the exact version that is on lulu.com since I sent them the files in September. Probably there will be a printed version 3 but not for one more year. Massimo On Oct 16, 10:29 am, Thadeus Burgess wrote: > Is this the print with errata fixed, o

[web2py:33020] Re: Cron table deletion on GAE

2009-10-16 Thread Robin B
Also, GAE has a brand new, under documented, feature called deferreds, which allows you to create deferred functions which are automatically pickled and then executed later on. It uses the task queue, but presents a simpler interface for simple tasks. http://code.google.com/appengine/articles/de

[web2py:33021] Re: A simple patch to provide upload progress

2009-10-16 Thread AndCycle
http://www.web2pyslices.com/main/slices/take_slice/10 anyway, I have done the sample, any comment? :~ On Oct 16, 11:39 pm, AndCycle wrote: > would you? :p > > On Oct 15, 2:03 pm, mdipierro wrote: > > > yes. Thank you! We should post a web2pyslice about this. > > > On Oct 14, 11:50 pm, Richard

[web2py:33022] Re: Case sensitive application name

2009-10-16 Thread Thadeus Burgess
Perhaps just a variable that could be set to a function to perform on incoming/outgoing urls, that could be set in routes.py URL_CASE = str.lower URL_CASE = str.upper URL_CASE = None # url is left as is. After working on a proof of concept, probably better just to have case-sensitive urls :) -T

[web2py:33023] Re: A simple patch to provide upload progress

2009-10-16 Thread mr.freeze
Looks great! On Oct 16, 11:59 am, AndCycle wrote: > http://www.web2pyslices.com/main/slices/take_slice/10 > > anyway, I have done the sample, any comment? :~ > > On Oct 16, 11:39 pm, AndCycle wrote: > > > would you? :p > > > On Oct 15, 2:03 pm, mdipierro wrote: > > > > yes. Thank you! We shoul

[web2py:33024] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
Any tips? What could I do to "form.accepts" to get just the first object (SELECT) and not a tuple (SELECT and A)? Do I have to remove the A object ("add" link) from the where is the SELECT? :-/ Thanks. Does it happens because "form.accepts" trying get some attributes, like "errors", from the "

[web2py:33025] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
Please, ignore the last paragraph after the word "Thanks" in the last message. So, fixing: Any tips? What could I do to "form.accepts" to get just the first object (SELECT) and not a tuple (SELECT and A)? Do I have to remove the A object ("add" link) from the where is the SELECT? :-/ Thanks.

[web2py:33026] Re: import module from modules

2009-10-16 Thread leone
Yes I know. I use it to import single module. I receive errors when I try to import applications.myapp.modules.widgets.pippo as pippo where widgets is a directory ( with __init__.py) located in myapp/ modules and contain pippo.py. I can import only modules as files under /modules? leone On 16 O

[web2py:33027] Re: "Add" button next to "combo box"

2009-10-16 Thread mr.freeze
Is the link inside the form? If so, try moving it outside and see if it still fails. On Oct 16, 1:53 pm, Renato-ES-Brazil wrote: > Any tips? What could I do to "form.accepts" to get just the first > object (SELECT) and not a tuple (SELECT and A)? > > Do I have to remove the A object ("add" link)

[web2py:33028] CRON doesn't work when installed as win32 service

2009-10-16 Thread AndCycle
I have looked part of the code, hard cron execute in widght.py, but not winservice.py, I thought winservice should consider as a standalone server too because http://www.web2py.com/examples/default/cron says "Hard cron, available if using the built-in web server" yes, as a win32 service I think

[web2py:33029] Re: import module from modules

2009-10-16 Thread mdipierro
No this should work. I do it all the time. There must a bypo somewhere On Oct 16, 2:15 pm, leone wrote: > Yes I know. > I use it to import single module. > I receive errors when I try to > import applications.myapp.modules.widgets.pippo as pippo > where widgets is a directory ( with __init__.py)

[web2py:33030] The first page on App Engine

2009-10-16 Thread BearXu
Suppose I have an app named 'myapp' and I delete the 'welcome' app and buid a new app named 'init' putting redirect in its index func.It pass the test local but fail on GAE. Can anybody help? --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:33031] Re: The first page on App Engine

2009-10-16 Thread BearXu
it also fail on dev_server 2009/10/16 BearXu > Suppose I have an app named 'myapp' and I delete the 'welcome' app and buid > a new app named 'init' putting redirect in its index func.It pass the test > local but fail on GAE. > Can anybody help? > --~--~-~--~~~---~--~

[web2py:33032] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread mdipierro
I have come up with a plan to promote web2py locally. I bought 10 copies of web2py and I am going to main bookstores in Chicago and leaving them secretly there in the Software section. People will find it and ask "what is this?" If somebody tries to buy them, they will run into problems and that

[web2py:33033] Re: import module from modules

2009-10-16 Thread leone
Thanks leone On 16 Ott, 22:05, mdipierro wrote: > No this should work. I do it all the time. There must a bypo somewhere > > On Oct 16, 2:15 pm, leone wrote: > > > > > Yes I know. > > I use it to import single module. > > I receive errors when I try to > > import applications.myapp.modules.widg

[web2py:33034] Re: The first page on App Engine

2009-10-16 Thread mdipierro
what does it mean fail? what is the error? what is the app? what version of python? what id the version of appserver? what is the os? On Oct 16, 3:17 pm, BearXu wrote: > it also fail on dev_server > > 2009/10/16 BearXu > > > Suppose I have an app named 'myapp' and I delete the 'welcome' app and

[web2py:33035] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Jonathan Lundell
On Oct 16, 2009, at 1:29 PM, mdipierro wrote: > You may also want to consider having a bookstore buy a copy for you > (from the ISBN) instead of ordering via Wiley so that it will be in > their records. Remind us what the ISBN is, please. http://www.web2py.com/examples/default/docs still links

[web2py:33036] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Thadeus Burgess
Hahahaha... thats great! I'm so going to make some trips to the local bookstores and have them order it, and not pick it up so it stays on their shelves :P -Thadeus On Fri, Oct 16, 2009 at 3:29 PM, mdipierro wrote: > > I have come up with a plan to promote web2py locally. > > I bought 10

[web2py:33037] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Michael T
How about the local libraries - suggest a feature table for programming and put the Web2py in the front. On Fri, Oct 16, 2009 at 4:44 PM, Thadeus Burgess wrote: > Hahahaha... thats great! > > I'm so going to make some trips to the local bookstores and have them order > it, and not pick it up so i

[web2py:33038] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Michael T
I meant to say DONATE to the local libraries - suggest a feature table for programming and put the Web2py in the front. On Fri, Oct 16, 2009 at 5:02 PM, Michael T wrote: > How about the local libraries - suggest a feature table for programming and > put the Web2py in the front. > > On Fri, Oct 1

[web2py:33039] Re: import module from modules

2009-10-16 Thread villas
On Oct 16, 9:05 pm, mdipierro wrote: > There must a bypo somewhere ^^ Haha! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@go

[web2py:33040] Re: The first page on App Engine

2009-10-16 Thread BearXu
I modified the init/default/index as redirect(URL(a='myapp',c='default',f='index')) it is ok in the web2py server when i visit http://localhost:8080/, it will automatically redirect to the myapp/default/index But when I use dev_server 1.2.7 to test it in Windows, Python 2.5 visit http://localhost:

[web2py:33041] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread mr.freeze
>>http://www.web2py.com/examples/default/docs still links to the first edition. Strange, it brings up the 2nd edition for me. On Oct 16, 3:42 pm, Jonathan Lundell wrote: > On Oct 16, 2009, at 1:29 PM, mdipierro wrote: > > > You may also want to consider having a bookstore buy a copy for you > >

[web2py:33042] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread Jonathan Lundell
On Oct 16, 2009, at 3:16 PM, mr.freeze wrote: > >>> http://www.web2py.com/examples/default/docs still links to the >>> first edition. > Strange, it brings up the 2nd edition for me. I'm referring to the Amazon and Wiley hard-copy links. > > On Oct 16, 3:42 pm, Jonathan Lundell wrote: >> On

[web2py:33043] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
mr.freeze, Yes, the link is inside the form. Each "add" link is next to your own "select" (combo box) object. The "add" link is created by a widget set in my model, hence it is rendered by SQLFORM inside the form. On 16 out, 16:24, "mr.freeze" wrote: > Is the link inside the form? If so, try

[web2py:33044] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread mr.freeze
Ah, gotcha. On Oct 16, 5:19 pm, Jonathan Lundell wrote: > On Oct 16, 2009, at 3:16 PM, mr.freeze wrote: > > > > >>>http://www.web2py.com/examples/default/docsstill links to the   > >>> first edition. > > Strange, it brings up the 2nd edition for me. > > I'm referring to the Amazon and Wiley hard

[web2py:33045] I can not do "orderby=db.table.id" in GAE

2009-10-16 Thread BearXu
if I write this into my select command using dev_server, it is wrong. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe f

[web2py:33046] Re: I can not do "orderby=db.table.id" in GAE

2009-10-16 Thread BearXu
Actually I want to desc orderbut the orderby=~db.table.id is also wrong 2009/10/17 BearXu > if I write this into my select command using dev_server, it is wrong. > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "w

[web2py:33047] Re: running from source on Vista requires pywin32

2009-10-16 Thread Web2py-SuperFan
I installed pywin32 also just now. It got rid of the root lock warning. I don't know if that fixed my issue though, cause yesterday I tried something else first that got me going. In particular, I had originally installed web2py in c:\users\me\docs \web2py then I started working on my new app,

[web2py:33048] Re: running from source on Vista requires pywin32

2009-10-16 Thread Web2py-SuperFan
Just ran it from c:\web2py and it works from there as well now too. guess it was that dependency. bizarre how it worked in users but not from outside after the security update. Anyway, seems like problem is solved Thanks to all who looked into it --~--~-~--~~~---~--~

[web2py:33049] Re: It is alive!!! (the new book is on sale)

2009-10-16 Thread mdipierro
I need to fix that. The ISBN of the second edition is 9780470592359 but I do not know if it is already available to bookstores to order. Not even Wiley and Amazon list it on search by ISBN. If you manage to try, let me know. On Oct 16, 6:05 pm, "mr.freeze" wrote: > Ah, gotcha. > > On Oct 16, 5:

[web2py:33050] Re: I can not do "orderby=db.table.id" in GAE

2009-10-16 Thread mdipierro
You can orderby but not by id. GAE does not support that and the id on GAE are not sequential anyway. You need to timestamp records and order by timestamp. On Oct 16, 6:46 pm, BearXu wrote: > Actually I want to desc orderbut the orderby=~db.table.id is also wrong > > 2009/10/17 BearXu > > > if

[web2py:33051] Re: running from source on Vista requires pywin32

2009-10-16 Thread mdipierro
Thank you for reporting the problem. On Oct 16, 7:11 pm, Web2py-SuperFan wrote: > Just ran it from c:\web2py and it works from there as well now too. > guess it was that dependency. > > bizarre how it worked in users but not from outside after the security > update.  Anyway, seems like problem i

[web2py:33052] pycon open for business

2009-10-16 Thread mdipierro
We are looking for early testers. If you plan to attend https://us.pycon.org/2010/register Thanks to Yarko for all his work on this. He is the official registration man! We are running registration for the conference the second year in a raw. Massimo --~--~-~--~~~---

[web2py:33053] Re: pycon open for business

2009-10-16 Thread mr.freeze
Do you know if you will be giving a talk yet? On Oct 16, 8:59 pm, mdipierro wrote: > We are looking for early testers. If you plan to attend > > https://us.pycon.org/2010/register > > Thanks to Yarko for all his work on this. He is the official > registration man! We are running registration for

[web2py:33054] Re: pycon open for business

2009-10-16 Thread mdipierro
No, I do not know. On Oct 16, 11:35 pm, "mr.freeze" wrote: > Do you know if you will be giving a talk yet? > > On Oct 16, 8:59 pm, mdipierro wrote: > > > We are looking for early testers. If you plan to attend > > >https://us.pycon.org/2010/register > > > Thanks to Yarko for all his work on thi

[web2py:33055] jQuery and tag

2009-10-16 Thread weheh
I'm doing a jQuery like this: A('Test link', _href='#', _id='abc', _class='title', _onclick="ajax('callback_function',['abc'],':eval');" ) After callback, the webpage title has been set to "#". How can I write my callback func