[web2py] Re: global name 'db' is not recognize in a module

2010-05-05 Thread cjrh
On May 4, 1:26 pm, canna wrote: > so how would you share functions between controllers easily? without > passing global objects to the functions all the time? Functions in a module should really only have access to identifiers and namespaces within that module; hence passing "db" as an argument.

[web2py] Re: New to web app development -- is web2py a good choice

2010-05-06 Thread cjrh
On May 6, 7:37 am, Anthony wrote: > I am brand new to web application development, and I'm looking for a > good web framework to learn in order to build a new web application > (sort of a personal task/project management system). > > Any insights and advice would be much appreciated. Thanks. I kn

[web2py] Re: Top 3 web2py features

2010-05-06 Thread cjrh
On May 6, 5:18 pm, Álvaro Justen [Turicas] wrote: > So, please, each of you, prioritize your list and show me the top 3 > features you like. batteries, migration, python-in-templates.

[web2py] Re: web2py and rails on windows

2010-05-10 Thread cjrh
On May 10, 3:15 am, mdipierro wrote: > What is your impression on web2py on windows? > Is there any issue that is windows specific? I use it on Windows. There don't seem to be any platform-specific issues, and I think it is because python's cross-platform support is good.

[web2py] Re: Do you use web2py in your company?

2010-05-11 Thread cjrh
On May 10, 11:09 pm, mdipierro wrote: > For now let's concentrate on one of them for now. If you have > developed software in web2py that you use internally in your company > but you cannot release it open source, would you let us know? Can you > tell us what is the software for? Could you provide

[web2py] Re: performance issue- multiple db connection

2010-05-11 Thread cjrh
On May 11, 10:58 am, vihang wrote: > I am trying to understand the possible performance setback if I try to > open multiple db connections. Is there some mechanism in web2py which > would optimizes the number of open connections to the database? What do your measurements say so far?

[web2py] Re: Review my web2py app: Radbox.me

2010-05-11 Thread cjrh
On May 11, 11:40 am, Adi wrote: > Radbox (http://radbox.me) is a video bookmarking service. Its still a > very young product, but I believe its pretty good at what it does. Cool!

[web2py] Re: Looping in the browser?

2010-05-11 Thread cjrh
On May 12, 4:25 am, Miguel Lopes wrote: Alternatively, instead of this: >             result_list.append(a_str) > >    # Now you can return the list >    return result_list one could yield the values: yield(a_str) and then whatever other code uses function "check()" can still it

[web2py] Re: New to web app development -- is web2py a good choice

2010-05-12 Thread cjrh
On May 12, 6:11 am, Richard wrote: > The book was a huge improvement but there is certainly more to be > done. Unfortunately this kind of work is not fun so happens slowly. I am happy to volunteer help for documentation. I enjoy improving documentation. > Would it be worth migrating useful cont

[web2py] Re: How to auto-login into an account from an specific computer.

2010-05-13 Thread cjrh
On May 13, 10:06 am, Benigno wrote: > We have made an app with web2py to present data from a home-automated > home as a web service. There is a certain hardware at the home that > sends all the information that transverses the bus into our server, > and from there on, we process and present the da

[web2py] Re: design issue

2010-05-13 Thread cjrh
On May 13, 2:24 pm, annet wrote: > I know web2py can connect to multiple databases, and I wonder whether > it would be possible to have two db.py files: db1.py and db2.py, where > db1.py connects to the database containing the first type of data and > db2.py connects to the company's database. db2

[web2py] Re: design issue

2010-05-14 Thread cjrh
On May 14, 9:24 am, annet wrote: > Thank you very much for your extensive reply, it's very helpful, at > least I now have an idea of how to approach this problem. If you come up with a better way, please share!

[web2py] Re: How to auto-login into an account from an specific computer.

2010-05-14 Thread cjrh
On May 14, 10:05 am, Benigno wrote: > Is there any simpler way or any example of this or something similar > anywhere that I could use as an example?. The presence of the "Session ID" in the "response" object is all handled by web2py. On the client side, whatever tool you're using to make the HT

[web2py] Re: web2py suggestions

2010-06-20 Thread cjrh
On Jun 20, 8:07 am, Binh wrote: > 4. Controllers don't seem to have a clean way to implement before and > after filters.  Maybe web2py needs to incorporate the idea of > inheritance controllers like Rails. Unless I misunderstand some other subtlety, this is exactly what decorators are for.

[web2py] Re: Fixed book or source to book?

2010-06-21 Thread cjrh
On Jun 21, 9:59 am, Stefan Scholl wrote: > There are (3 month old) comments on those > pages who address this, but nothing got changed. I fixed a couple recently. If you send me links, I can try to get a few more? > Is there any repository with the source to the book? The online book is it, AF

[web2py] Re: Native Web2Py/CherryPy Server. It is so bad?

2010-06-21 Thread cjrh
On Jun 21, 10:44 pm, Giuseppe Luca Scrofani wrote: > But now my question is, I read in > manual the included wsgi server in web2py it is not intended for > production use due to lack of configurability. But this for a small > site make sense? It depends :) I run an intranet app serving some tens

[web2py] Re: Houston, Houston, the rocket lost contact!

2010-05-01 Thread cjrh
On May 1, 1:36 pm, Iceberg wrote: >         please visit: >                http://127.0.0.1:8000 and > The console output is as usual. But we only get "400 Bad Request" > fromhttp://localhost:8000 http://mwolk.com/blog/localhost-not-working-but-127001-does/

[web2py] Re: Web2py and threads

2010-08-24 Thread cjrh
On Aug 24, 9:00 pm, John Heenan wrote: > Can't we at least have an acknowledgement that it is not necessary for > web2py to use a thread per request model and that web2py could instead > use an event model? Acknowledged.

[web2py] Re: Web2py Book 3rd Edition

2010-09-14 Thread cjrh
On Sep 14, 11:27 pm, NetAdmin wrote: > I just received the Printed 3rd Edition of the Web2py Manual from > LULU.com Your post inspired me to order a copy. Thanks.

[web2py] Re: misunderstandings

2010-09-16 Thread cjrh
On Sep 16, 7:11 am, mdipierro wrote: > http://web2py.com/AlterEgo/default/show/271 In general, the arguments put forward by critics of web2py are almost entirely vacuous. The most that can be said of them, I think, is that as criticism towards web2py increases, that can be taken as an indicatio

[web2py] Re: StackExchange for web2py community

2010-09-16 Thread cjrh
On Sep 16, 1:31 pm, Narendran wrote: > What does the community > think of having a stackexchange page for web2py? Good idea. The StackOverflow model is the future of technical Q&A forums. I joined and added some good and bad questions.We need 59 more users to join in support.

[web2py] Re: Hi guys.. reg:plugin_wiki select/read

2010-09-17 Thread cjrh
On Sep 17, 5:00 pm, bally boy wrote: > I am at this url:-http://127.0.0.1/ There's no place like home :)

[web2py] Documentation: The Python Language, lambda

2010-09-19 Thread cjrh
Hi With my editor cap on, I am working my way through the documentation. The section on lambda, in the python language section of the book, makes me uncomfortable. It says this: *** The existence of lambda allows re-factoring an existing function in terms of a different set of arguments. cache.r

[web2py] Re: Documentation: The Python Language, lambda

2010-09-19 Thread cjrh
Could I take a crack at editing it? I won't change the book online directly, I'll mail you the modified markup text directly, to check with you. Ok? On Sep 19, 10:09 pm, mdipierro wrote: > You are right. > > On Sep 19, 2:14 pm, cjrh wrote: > > > > > Hi

[web2py] Re: Documentation: The Python Language, lambda

2010-09-19 Thread cjrh
On Sep 19, 10:37 pm, mdipierro wrote: > You can edit the book online. Just register, than let me know when > done and I will make you editor. You have already made me an editor, and I have already made numerous smaller fixes. This one would have been slightly larger than the others, which is wh

[web2py] Re: Pypi update

2010-09-21 Thread cjrh
On Sep 21, 11:01 pm, mdipierro wrote: > I also also discovered users can vte for Pypi packages. I did not know > that. Nor did I. Might be new.

[web2py] Re: Think you got something wrong in the web2py book

2010-09-22 Thread cjrh
On Sep 22, 11:47 am, ron_m wrote: > No, I think you are possibly looking at the meaning of record_id in a > different way than intended. Documentation edited to be explicit here.

[web2py] Re: welcome app normalize hack ie and html5 ready

2010-09-22 Thread cjrh
On Sep 22, 7:33 pm, "Martin.Mulone" wrote: > Tellme what you think Looks good on Opera 10.61.

[web2py] Python versions discrepancy between different online sources

2010-09-23 Thread cjrh
The main page: http://www.web2py.com/ Says, "Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.4/2.5/2.6, or Java with Jython." The PyPI page, here: http://pypi.python.org/pypi/web2py/1.85.3 Says, "Platform: CPython/Jython 2.4,2.5,2.6,2.7

[web2py] Image zoom from thumbnail, jQuery plugin recommendations?

2010-09-25 Thread cjrh
Hi Imagine you have a row of thumbnails in a page, and when the guest clicks on an image, a popup-like window is opened with a larger version of the image shown; what is the best or easiest method to do this in web2py, and does anyone perhaps have experience with one of the jQuery plugins listed

[web2py] Re: compute=lambda function

2010-09-25 Thread cjrh
On Sep 25, 10:23 am, annet wrote: > compute=lambda r: str(r['selector']) + ' ' + str(r['property']) > > is syntactically incorrect. What is the correct syntax? The syntax of that command, on its own, is correct. Perhaps you can try dumping the contents of the argument to see whether it contains

[web2py] @Massimo: email notification on documentation User Comments additions

2010-10-03 Thread cjrh
Hi Massimo Is it possible for you to set something up so that I can be notified by email whenever a visitor to the web2py book leaves a User Comment? Frequently, these comments point out errors in the documentation. I would like to fix errors faster, but I don't get around to check the all commen

[web2py] Re: Multiline comments in views difficult

2010-10-05 Thread cjrh
Zone Title {{if 0:}} {{for zone in zones:}} {{=zone.code}}: {{=B(zone.description)}} {{pass}} {{pass}} Change the zero ("0") to a one ("1") when you want the code back in. On Oct 5, 8:50 am, dederocks wrote: > Hello, > I wish it were easier to write comments in views. > Right

[web2py] Re: book type - chapter 10

2010-10-05 Thread cjrh
On Oct 5, 2:21 pm, Steve Romanow wrote: > Look for instances of "weigth" I found only one instance, which I fixed.

[web2py] f.y.i. pypy 1.3

2010-10-07 Thread cjrh
web2py on pypy 1.3 appears to work: 1. http://pypy.org/download/pypy-1.3-linux.tar.bz2 2. In a terminal, extract & run "bin/pypy web2py" It seems to take a long time to start up, and it seems to take a while to load up the welcome page for the first time too; these are probably signs of the JIT

[web2py] Re: f.y.i. pypy 1.3

2010-10-08 Thread cjrh
On Oct 7, 11:35 pm, mdipierro wrote: > yes but it has a memory leak because some files are not closed by > default. It can be fixed. Yes, of course. I expect that the same problem remains as reported in the original post. It is just that I didn't see such errors in my small tests last night.

[web2py] Re: book, chapter 07

2010-10-10 Thread cjrh
On Oct 9, 11:35 am, andrej burja wrote: > hi > > in the section about crud [snip] Fixed, thanks.

[web2py] Re: Did anybody notice oracle bought Sun?

2010-10-11 Thread cjrh
On Oct 11, 4:38 am, mdipierro wrote: > This all happened in less than 2 months: Yes, ofc. OpenSolaris was the first to go. The future of MySQL is looking suspicious. OpenOffice has already become "Libre Office" as published by the "Document Foundation": http://www.documentfoundation.org/downl

[web2py] Re: Slow streaming of several images

2010-10-11 Thread cjrh
On Oct 11, 5:30 am, VP wrote: > 2. These small images are being streamed simultaneously.  I don't know > if this makes a difference, but I'd prefer these images are "static", > not streamed. But I don't know how to do this in web2py. If your images are stored in 'upload' fields, then they are ind

[web2py] Re: Where's Errata Page for Web2py 3rd Edition

2010-10-14 Thread cjrh
On Oct 14, 10:53 pm, NetAdmin wrote: > I'd like to make notes of  any typos / errors in my printed edition. Send me all errors and typos, I'll fix them (almost) immediately in the online book.

[web2py] Re: basic hosting requiresments on shared server

2010-10-14 Thread cjrh
On Oct 14, 10:03 pm, shaun wrote: > My host does not support the requirements for djanjo so I wondering if > they will support web2py The minimum you need is something like Python (pref. 2.5+) and .htaccess. Apache must have support for FastCGI. There are many deployment recipes for specific ho

[web2py] Re: Web2py like clone in Java?

2010-10-14 Thread cjrh
On Oct 15, 1:38 am, DJ wrote: > Hello web2py people, > > I was in a discussion recently telling my friend how great Web2Py was > for programmer productivity with all the inbuilt features (server, > CRUD, auth). We were wondering if there was anything similar in Java? > Quick google search brought

[web2py] Re: Web2py like clone in Java?

2010-10-14 Thread cjrh
On Oct 15, 2:06 am, Bruno Rocha wrote: > I tought Python was the language with more web frameworks, but Java wins. hehe

[web2py] Re: Vote for a new logo

2010-10-15 Thread cjrh
On Oct 15, 3:17 am, mdipierro wrote: > I would have sworn this was in the book. Shame on me. It is now.

[web2py] Re: PyScripter is nice Python IDE for Windows ....

2010-10-18 Thread cjrh
On Oct 18, 1:26 pm, David Marko wrote: > PyScripter seems to be alive again and releasing new > versions.http://code.google.com/p/pyscripter/ I've been using PyScripter ever since it was a demo app for the Python- for-Delphi integration components. The best Python editor on Windows, even though

[web2py] Re: PyScripter is nice Python IDE for Windows ....

2010-10-18 Thread cjrh
On Oct 19, 2:37 am, DenesL wrote: > Looks good. Thanks. > Any tips on using it with web2py?. Not much. Edit your files. You get code-completion and method argument "intellisense" for Python built-ins as well as your own code in the same file. As you edit, refresh your browser and the changes

[web2py] Re: Instant Press in beta

2010-10-18 Thread cjrh
On Oct 18, 5:09 pm, "Martin.Mulone" wrote: > After almost 3 month of heavy development, i think its mature enough > to move to beta phase. Well for me was a proof of concept, of what can > i do in web2py, i have to thank to massimo and the community to > answered my littles questions. It's very g

[web2py] Re: PyScripter is nice Python IDE for Windows ....

2010-10-19 Thread cjrh
On Oct 19, 2:26 pm, DenesL wrote: > Have you used it to debug a running web2py app?. No. I tend to use print statements and look at what comes out in the shell window.

[web2py] Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
Hi I have a different layout.html file for each of several different users, but I need to select and use the right one, depending on on the user. What is best practice for doing that?Which bit of what must be substituted where?

[web2py] Re: Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
On Oct 21, 3:15 pm, mdipierro wrote: > cp views/plugin_layouts/layouts/.html views/layout.html Perhaps I am missing something, but surely if views/layout.html is replaced, it is replaced for all users? I want to show different users some pages that are generated using a different layout.html fi

[web2py] Re: Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
On Oct 21, 4:05 pm, annet wrote: > if auth.has_membership(group_id=user_x): >     response.view='user_x_view.html' > if auth.has_membership(group_id=user_y): >     response.view='user_y_view.html' Ok, but then would do you just keep copies of your view files around, save only for the line that sp

[web2py] Re: File download after creation

2010-10-21 Thread cjrh
On Oct 21, 12:56 pm, Bernardo wrote: > How can I make a files.update_record(processedfile=...???) in order to > have a valid downloadable file? http://web2py.com/book/default/chapter/06#Manual-Uploads

[web2py] Re: Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
On Oct 21, 5:17 pm, annet wrote: > {{if user_x:}} >   {{extend 'user_x_view.html'}} > {{elif user_y:}} >   {{extend 'user_y_view.html'}} > {{else:}} >   {{extend 'user_z_view.html'}} > {{pass}} Excellent, yes! I think that is what I want. I'll need to keep the filename in a variable though.

[web2py] Re: Best practice: swapping between different layout.html files within a single application

2010-10-21 Thread cjrh
On Oct 21, 10:03 pm, mdipierro wrote: > Not sure this works. Does it? > > {{extend variable}} works as long as you do not bytecode compile. I'll give it a try in the next few days and keep you posted. Interesting comment about bytecode compiling.

[web2py] Re: #...@pydevcodeanalysisignore in Web2py code

2010-10-21 Thread cjrh
On Oct 21, 10:59 pm, pierreth wrote: > Hello, > > Is it possible to add the comment "#...@pydevcodeanalysisignore" in > future versions of web2py to all the controllers and all the models of > new applications created by the web2py admin? You can do it yourself. Something like (untested) for ro

[web2py] Re: Little Error in the Online book - Chapter 11 - http://web2py.com/book/default/chapter/11

2010-10-22 Thread cjrh
On Oct 21, 9:30 pm, Yannick wrote: > In the Memcached section of chapter 11 it said. Fixed, thanks.

[web2py] Re: JSON-RPC best practices

2010-10-22 Thread cjrh
On Oct 22, 11:28 am, Omri wrote: > Should I write a very general function that basically exposes the > database to the client side? Yes > Should a write many small functions, each > wrapping a database call (perhaps sometimes also doing some > calculations in the background)? No > Should I opt

[web2py] Re: Best practice: swapping between different layout.html files within a single application

2010-10-22 Thread cjrh
On Oct 22, 9:11 am, annet wrote: > I logged in several times as different users, and it SEEMS to work, > but only as long as you don't byte compile the application. I don't > know whether there is a solution for that problem. Thanks very much for testing this. What I might do is make the if stat

[web2py] Re: request for fcgi users

2010-10-22 Thread cjrh
On Oct 22, 8:21 pm, Jonathan Lundell wrote: > Thanks, John. I was asking in part because it appears that routes_in might be > broken for FastCGI and other interfaces that don't provide PATH_INFO. I have > a patch, but no good way to test it (I don't have a FastCGI environment > available myself

[web2py] Re: request for fcgi users

2010-10-22 Thread cjrh
On Oct 22, 10:06 pm, cjrh wrote: > routes_in=(('/web2py/(?P.*)','/\g'),) I should have mentioned that web2py is in a subfolder (called "web2py") from the document root.

[web2py] Re: Supporters of the current logo concept

2010-10-22 Thread cjrh
On Oct 22, 9:20 pm, Thadeus Burgess wrote: > I think we just need one more stage of logo submissions and then voting > (voting can only happen after the submission deadline), then there is a > voting deadline. How is it you all have time to spend on this? Is your employer hiring? :)

[web2py] Re: problems with deployment

2010-10-22 Thread cjrh
> Where am I supposed to give web2py this password? Assuming you have SSH or shell access, first run web2py from the command line directly: $ ./web2py It will ask you for a password. After you do that and hit enter, you can terminate the process. If the parameters file contains 8000 in the fil

[web2py] Re: request for fcgi users

2010-10-22 Thread cjrh
On Oct 22, 10:25 pm, Jonathan Lundell wrote: > On Oct 22, 2010, at 1:06 PM, cjrh wrote: > > > > > On Oct 22, 8:21 pm, Jonathan Lundell wrote: > >> Thanks, John. I was asking in part because it appears that routes_in might > >> be broken for FastCGI and

[web2py] Re: request for fcgi users

2010-10-23 Thread cjrh
On Oct 22, 11:49 pm, Jonathan Lundell wrote: > Just a reminder: a change to routes.py won't be noticed until you restart > web2py (or explicitly do a reload). Yes, I touch the web2py.fcgi file so that Apache restarts the process. So I assume that the web2py process was restarted. I'd need to

[web2py] Re: Hosting service for web2py

2010-10-23 Thread cjrh
On Oct 23, 4:43 am, José Luna Venezuela wrote: > Hi i whant to know what hosting provider offer suport for web2py or i > need to have a vps if i whant to make a web page? You can use any (Linux) host that provides: 1) SSH access 2) FastCGI & .htaccess Many, many hosts provide these. If these t

[web2py] Link-pass data to new view via session not on URL

2010-10-23 Thread cjrh
At the risk of asking a stupid question: I have a table of links. There is a bit of data associated with each link. I want to have that bit of data available in the controller function that is being referred-to in the link, but I don't want to pass anything to do with that data via the URL.T

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-23 Thread cjrh
On Oct 24, 1:56 am, cjrh wrote: > My tests below doesn't seem to permanently update the session object > inside setnum(), even though request.args does contain the number sent > by ajax. Ok, I figured out that the $.ajax() call doesn't send a cookie, so the session object in

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 2:20 am, Branko Vukelic wrote: > How is the data 'associated' with the link? Say I have a table of 10 items. In each row, there is a link to the same URL. However, I want to access row-specific data in the target controller function, without supplying that data through the URL itsel

[web2py] $.ajax() call uses different session

2010-10-24 Thread cjrh
As a side-issue from another post I made recently, it seems to be the case that when javascript $.ajax() method is executed, and it points to a controller function, a different session is used in that target controller function than the original one. This could be because the session cookie is not

[web2py] Re: Should forms be defined in the controller or the view?

2010-10-24 Thread cjrh
On Oct 24, 10:32 am, Luther Goh Lu Feng wrote: > I am wondering what are the issues to be considered when deciding where to > generate a form. Is it better to do so in the controller or in the view? I am a beginner at web apps, but my feeling is that since forms are concerned with specific variab

[web2py] Re: $.ajax() call uses different session

2010-10-24 Thread cjrh
On Oct 24, 11:13 am, cjrh wrote: > As a side-issue from another post I made recently, it seems to be the > case that when javascript $.ajax() method is executed, and it points > to a controller function, a different session is used in that target > controller function than the origina

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 1:56 am, cjrh wrote: > Would I have to use javascript? > > My tests below doesn't seem to permanently update the session object > inside setnum(), even though request.args does contain the number sent > by ajax.  Inside showme(), the session value is default onc

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 3:23 pm, Branko Vukelic wrote: > It might help if you could show us the table. I'm still not sure I > understand what you're trying to do. There are three ways (that I know of) to get data to be available in successive controller functions: 1) Pass it on the URL as arguments 2) Write

[web2py] Re: $.ajax() call uses different session

2010-10-24 Thread cjrh
On Oct 24, 3:20 pm, Branko Vukelic wrote: > I just had to smile at this. :) Happened to me so many times before I > finally learned the lesson. I am still paying school fees :)

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 4:29 pm, Branko Vukelic wrote: > Since > you say the data is already in the table on the page, there's no point > in trying to hide it, especially since POST isn't really hiding > anything if someone really wants to get ahold of request data. The datum in my case is a room rate that a

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 4:43 pm, cjrh wrote: > So as I said, looks like the safest is for me to simply calculate the > rate again. On the server-side, I mean. Dunno if that was clear.

[web2py] Re: Should forms be defined in the controller or the view?

2010-10-24 Thread cjrh
On Oct 24, 4:43 pm, Luther Goh Lu Feng wrote: > So this will be considered an acceptable violation of DRY? There is no DRY violation.

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 5:03 pm, Branko Vukelic wrote: > * Calculated values are shown, and a form with hidden fields and a > submit button labeled 'Confirm' is shown The hidden fields still show in the page source though. A smart user could submit his own set of data if he can see what field id's are being

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 9:41 pm, Branko Vukelic wrote: > Oh, so ok, I get what you're trying to do now. Don't pass charge > amount around. Charge amount should be one-way. You NEVER, under ANY > circumstances, using ANY technology, expect that amount to come from > client side. Yes, I guess that should have b

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-24 Thread cjrh
On Oct 24, 9:48 pm, Brian M wrote: > How about include all the calculated values in your form and add in an > additional field that's a HMAC keyed hash of the others using a key > that only you know? When the user submits, make sure the rest of the > field values still combine & hash the same way

[web2py] Re: run-away threads

2010-10-24 Thread cjrh
On Oct 25, 1:42 am, ae wrote: > Every so often, I have to restart web2py because no threads will > respond. Are you working on Windows? Do you send debugging output to the cmd shell window, and then restore that window to inspect your output? It could be that that shell window is locking your a

[web2py] Re: Link-pass data to new view via session not on URL

2010-10-25 Thread cjrh
On Oct 25, 4:26 am, Brian M wrote: > It may not be a > concern for your app, but it is something to consider. You raise some very interesting points. I am probably not going to design anything for these kinds of situations right now, simply due to lack of time, but I'll certainly keep it in mind

[web2py] Re: Suggestion to include a tip in the components documentation of web2py book

2010-10-26 Thread cjrh
On Oct 25, 9:24 pm, Luther Goh Lu Feng wrote: > What happens here is that the component that is acquired by LOAD upon form > submission is still the old set of rows. I spent quite some time figuring it > out > unfortunately. Perhaps this point could be highlighted in the book. I am willing to im

[web2py] Re: celery queue?

2010-10-26 Thread cjrh
On Oct 26, 4:06 am, "Jonathan Z." wrote: > Has anyone tried integrating celery with web2py?   Celery looks interesting. If you take a shot at integration, I would be interested to hear about your experiences on doing that.

[web2py] Re: web2py arguments syntax

2010-10-27 Thread cjrh
On Oct 27, 5:43 pm, VP wrote: > I saw this marriage between web2py and Flask (a strange one, I'll give > you that)... but I'm thinking web2py might be able to improve its > syntax/convention as follows. > > Here's Flask: > > @app.route('/insertdog///') > def insertdog(name,owner,age): >      # oth

[web2py] Re: web2py arguments syntax

2010-10-28 Thread cjrh
On Oct 27, 5:43 pm, VP wrote: > @app.route('/insertdog///') > def insertdog(name,owner,age): >      # other things For fun, I tried an experiment with decorators. Hold onto your seats: # Simulation of the request object class R(object): pass request = R() request.args=['caleb', 100] # A v

[web2py] Re: web2py arguments syntax

2010-10-28 Thread cjrh
On Oct 28, 9:53 am, cjrh wrote: > On Oct 27, 5:43 pm, VP wrote: > > > @app.route('/insertdog///') > > def insertdog(name,owner,age): > >      # other things > > For fun, I tried an experiment with decorators.   Hold onto your > seats: Naturally, this

[web2py] Re: web2py arguments syntax

2010-10-28 Thread cjrh
On Oct 28, 11:02 am, Vinicius Assef wrote: > Massimo, I think it can be a good feature, mainly for beginners. But > only if I don't need to implement my own request object. No, you don't need to make your own request object, I just included it here to test my idea in an interpreter window, and th

[web2py] Re: web2py arguments syntax

2010-10-28 Thread cjrh
On Oct 28, 10:39 am, cjrh wrote: > On Oct 28, 9:53 am, cjrh wrote: > @validator('/controller_action//') > def controller_action(): >     return f.first_name, f.age Sorry, this should be: @validator('/controller_action//') def controller_action(): ret

[web2py] Re: Record Versioning findings

2010-10-29 Thread cjrh
On Oct 29, 4:09 pm, baloan wrote: > 3. In the documentation the archive table is defined like > > db.define_table('mytable_history', >    Field('current_record',db.mytable), >    db.mytable) > > while in the current version it is defined like > > db.define_table('mytable_arcvhive', >    Field('cur

[web2py] Book 3rd Edition, Lulu Printed Copy, comments

2010-10-30 Thread cjrh
Hi My new printed copy of the third edition of the book arrived a few days ago (took almost 2 months to find me!). Comments: - It's my first Lulu purchase. The quality is as good as or even better than expected. - The new dark default theme for web2py does not reproduce well in the book. The

[web2py] Return as unicode instead of str

2010-11-01 Thread cjrh
Some of the data I return from web2py is unicode. By default, the text that is return is converted to str: "Table d'h\u00f4te" As you can see, the unicode has been escaped. This happens because simplejson.dumps always returns str. To solve this, I had to do this: import gluon.contrib.si

[web2py] Re: Return as unicode instead of str

2010-11-01 Thread cjrh
On Nov 1, 11:45 am, cjrh wrote: > Some of the data I return from web2py is unicode.   Apologies, I meant to specify: using response.json()

[web2py] Re: Return as unicode instead of str

2010-11-03 Thread cjrh
On Nov 1, 11:45 am, cjrh wrote: >     import gluon.contrib.simplejson as simplejson >     return unicode(simplejson.dumps(make_result_list(msg_out, rows, > success)), 'unicode-escape') This is bad advice, because 'unicode-escape' will clobber all things that have b

[web2py] Re: plugin.wiki.theme: error in book?

2010-11-06 Thread cjrh
On Nov 5, 8:27 pm, mdipierro wrote: > plugins = PluginManager > > should be > > plugins = PluginManager() Fixed in the book.

[web2py] Re: new admin in trunk

2010-11-08 Thread cjrh
Just checked now using Opera 10.61: the code editor doesn't load properly. It seems all squashed over to the right, or something like that. On Nov 8, 6:11 pm, mdipierro wrote: > You can try it here: > > http://web2py.com/demo_admin/default/site > > I think Branko did an excellent job!

[web2py] Re: newbie + resources on web design

2010-11-08 Thread cjrh
On Nov 9, 8:38 am, Markandeya wrote: > Dear Friends at Web2Py, >  i need some resources, books ebooks, tutorials, etc. on how to design > a database driven web application that will help me with web2py > development. Any advice will be appreciated. http://web2py.com/book

[web2py] Windows binary distribution

2010-11-09 Thread cjrh
Is there a recipe somewhere showing how the binary win version of web2py is produced? I would like to make my own custom zip for easier in-house distribution, and using different version of python, for example.

[web2py] Re: RFC: Why web2py rocks

2010-11-09 Thread cjrh
On Nov 9, 12:16 am, mdipierro wrote: > This is not the first image I have seen this this format (thin and > long) but I am not sure I understand what it is intended for. Beauty. DeviantArt has a great many like this for Photoshop tutorials, for example.

[web2py] Build custom windows binary distro

2010-11-09 Thread cjrh
I would like to make a custom binary distro zip of web2py, using a different version of python (2.6 or 2.7) and incorporating PIL. Are there any recipes somewhere showing how to setup the toolchain? I already know about the file setup_exe.py in the web2py folder, I reckon that will feature promin

  1   2   3   4   >