[web2py] testing routes.py patterns

2010-08-08 Thread Jonathan Lundell
I've been advocating the use of doctests in routes.py to debug problems. Here's another doctest you can use (I'll send a patch to Massimo that adds an example). compile_re('.*http://otherdomain.com.* (?Pany.*)', '/app/ctr\gany')[0].pattern '^.*http://otherdomain.com.* (?Pany.*)$'

Re: [web2py] testing routes.py patterns

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 8:31 AM, Jonathan Lundell wrote: I've been advocating the use of doctests in routes.py to debug problems. Here's another doctest you can use (I'll send a patch to Massimo that adds an example). compile_re('.*http://otherdomain.com.* (?Pany.*)', '/app/ctr\gany')[0

Re: [web2py] Why is routes.py not recommended for production?

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 2:35 PM, mwolfe02 wrote: According to the web2py book, routes.py should not be used in production environment (http://web2py.com/book/default/chapter/04? search=lighttpd). Instead, Apache/lighttpd web server rewrite is suggested. I assumed this was due to some overhead

Re: [web2py] routes_in 153, me 0

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 5:10 PM, Andrew Thompson wrote: I can not wrap my head around routes_in. I'm attempting to host 3 sites via lighttpd and fcgihandler.py (is this the best way?) I ripped this mostly from a mdpierro post, and tweaked it for my domain, but I'm just not making progress:

Re: [web2py] routes_in 153, me 0

2010-08-08 Thread Jonathan Lundell
suppose. That's why I'd like to see logging. rewrite.py already does some logging. I'll take a look at doing something simpleminded. Maybe a logging-enable variable in routes.py I'm hacking in there anyway at the moment. -- Thadeus On Sun, Aug 8, 2010 at 7:30 PM, Jonathan

Re: [web2py] routes_in 153, me 0

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 6:00 PM, Andrew Thompson wrote: On 8/8/2010 8:30 PM, Jonathan Lundell wrote: On Aug 8, 2010, at 5:10 PM, Andrew Thompson wrote: I can not wrap my head around routes_in. I'm attempting to host 3 sites via lighttpd and fcgihandler.py (is this the best way?) I ripped

Re: [web2py] routes_in 153, me 0

2010-08-08 Thread Jonathan Lundell
On Aug 8, 2010, at 6:15 PM, Andrew Thompson wrote: On 8/8/2010 9:10 PM, Jonathan Lundell wrote: Is it possible that lighttpd is altering the URL enough that it doesn't match what you've got in routes.py? Perhaps. I've got to figure out how to test for that. I'll try to send Massimo

Re: [web2py] Managing routes.py with mercurial checkout

2010-08-09 Thread Jonathan Lundell
On Aug 9, 2010, at 8:20 AM, mwolfe02 wrote: I'm just looking for a best practice here. I am running web2py using a clone of the repository https://web2py.googlecode.com/hg/. This has worked really well for me. However, I just added a routes.py file. Clearly, I want to version control this

Re: [web2py] Managing routes.py with mercurial checkout

2010-08-09 Thread Jonathan Lundell
folder. That's not a complete solution, because .hgignore is itself in web2py's repository. On Mon, Aug 9, 2010 at 11:40 AM, Jonathan Lundell jlund...@pobox.com wrote: On Aug 9, 2010, at 8:20 AM, mwolfe02 wrote: I'm just looking for a best practice here. I am running web2py using a clone

Re: [web2py] testing app-specific routing

2010-08-10 Thread Jonathan Lundell
On Aug 9, 2010, at 10:25 PM, Thadeus Burgess wrote: Where is the documentation on how to use it? I sent an email on the subject, and there are comments in routes.example.py. Tomorrow I'll try to add some info to the book in time for Massimo's deadline. Hang on just a minute and I'll try to

[web2py] web2py logging

2010-08-10 Thread Jonathan Lundell
web2py makes semi-extensive use of the Python logging module, but (near as I can tell) it never changes the output away from the default stdout. Is this true, and if so isn't it a problem?

Re: [web2py] Cyclic tables

2010-08-10 Thread Jonathan Lundell
On Aug 10, 2010, at 10:55 AM, Oatman wrote: Hi all, How do I create two tables that both refer to each other? Here's a simple example: db.define_table( 'item', Field('current_alias', 'db.item_alias') ) db.define_table( 'item_alias', Field('name'), Field('item',

Re: [web2py] using URL() inside a component view

2010-08-10 Thread Jonathan Lundell
On Aug 10, 2010, at 5:48 PM, Miguel Lopes wrote: I'm pretty sure this as been asked, but I can't find it anywhere. I would like to use the URL function to construct a link inside a component view (i.e. views/components/view_x.load). This would be a link to a completely new page, to be

Re: [web2py] using URL() inside a component view

2010-08-10 Thread Jonathan Lundell
On Aug 10, 2010, at 7:11 PM, Bruno Rocha wrote: extension=False is new to me, Thats not covered by the Book I found and reported that before : http://groups.google.com/group/web2py/browse_thread/thread/99c2f5b8db562fba/8b82a682dff3fc58?lnk=gstq=URL+changed#8b82a682dff3fc58 It's a side

Re: [web2py] using URL() inside a component view

2010-08-10 Thread Jonathan Lundell
=extension ) I've just added it to the end of the URL section of Chapter 4. Massimo, would you please check that I've got it right? 2010/8/10 Jonathan Lundell jlund...@pobox.com On Aug 10, 2010, at 7:11 PM, Bruno Rocha wrote: extension=False is new to me, Thats not covered by the Book

Re: [web2py] using URL() inside a component view

2010-08-10 Thread Jonathan Lundell
On Aug 10, 2010, at 7:59 PM, Bruno Rocha wrote: I thought your explanation is very well written, we need always maintain the practice of looking for something relevant to be documented when a new thread emerges, and document as quickly as possible, so soon web2py will be the framework with

Re: [web2py] Re: Cyclic tables

2010-08-11 Thread Jonathan Lundell
can add it to the manual section. I'm wondering, though, whether you can't use 'reference' in your first table to refer to the second one. Any thoughts? Thanks again On Aug 10, 7:16 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 10, 2010, at 10:55 AM, Oatman wrote: Hi

Re: [web2py] Chapter3: Form self-submission

2010-08-11 Thread Jonathan Lundell
On Aug 11, 2010, at 6:05 AM, Hector Oron wrote: Hello, Following the example on Chapter 3 [1] about Form self-submission, I get Internal Error after visiting first and introducing the name, getting the following traceback: What version of web2py are you running? If you're not running

Re: [web2py] Re: web2py logging

2010-08-11 Thread Jonathan Lundell
if there's a central place to configure logging, common to all modes? rocket does installs logging.NullHandler, for example. I'm unclear on the implications of that for web2py applications. On Aug 10, 12:28 pm, Jonathan Lundell jlund...@pobox.com wrote: web2py makes semi-extensive use

Re: [web2py] Re: web2py logging (and Rocket: ahoy, Tim!)

2010-08-11 Thread Jonathan Lundell
is consistent (and configurable) runtime logging for the web2py core as well as applications. On Aug 11, 10:14 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 11, 2010, at 6:00 AM, mdipierro wrote: we could specify line option to change it but why not use regular stdout redirection

Re: [web2py] Re: Cyclic tables

2010-08-11 Thread Jonathan Lundell
it a reference. If someone will test an example of this, I'll add it to the book. It's too late, I assume, to make the next print edition, but at least we'll have it on line, and it'll make the next one. On Aug 11, 9:56 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 11, 2010, at 2:48

Re: [web2py] Re: Is there a way how to specifiy, which controller act as default?

2010-08-11 Thread Jonathan Lundell
On Aug 6, 2010, at 9:40 AM, Phyo Arkar wrote: i voted this too. I just dont like the controller named default and i want it different on each apps. On 8/6/10, mr.freeze nat...@freezable.com wrote: Massimo, why not make the default application,controller and function configurable in an

Re: [web2py] routes_in 153, me 0

2010-08-11 Thread Jonathan Lundell
On Aug 8, 2010, at 6:29 PM, Jonathan Lundell wrote: On Aug 8, 2010, at 6:15 PM, Andrew Thompson wrote: On 8/8/2010 9:10 PM, Jonathan Lundell wrote: Is it possible that lighttpd is altering the URL enough that it doesn't match what you've got in routes.py? Perhaps. I've got to figure out

Re: [web2py] Re: doc2py - php.net like python module documentation

2010-08-11 Thread Jonathan Lundell
A minor suggestion: when an arg default is [] or {}, it would enhance readability to stick a space in there. Or set it in a monospace font. (I can't say I'm a big fan of Andale Mono, though.)

Re: [web2py] Re: web2py logging

2010-08-11 Thread Jonathan Lundell
logging will work OK when web2py.py is run from the command line. On Aug 11, 10:14 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 11, 2010, at 6:00 AM, mdipierro wrote: we could specify line option to change it but why not use regular stdout redirection? I suppose we could

Re: [web2py] Re: proper way to transform a query GAE #1

2010-08-11 Thread Jonathan Lundell
On Aug 11, 2010, at 5:14 PM, Rob wrote: Where is this syntax documented? db(query1)(query2) Is this the same as 'db(query1 query2)' except web2py does the join and not the database? It's identical. db(query) returns a Set instance. And calling a Set instance that already has a query

Re: [web2py] Re: Is there a way how to specifiy, which controller act as default?

2010-08-11 Thread Jonathan Lundell
rewriting. And with app-specific routing, of course, the other defaults can and should be in the app-specific routes.py, if there is one. On Aug 11, 11:12 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 6, 2010, at 9:40 AM, Phyo Arkar wrote: i voted this too. I just dont like

Re: [web2py] web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 8:44 AM, David Marko wrote: Failed requests:19 (Connect: 0, Receive: 0, Length: 19, Exceptions: 0) http://www.celebrazio.net/tech/unix/apache_bench.html In the above example, if the server returns dynamic content, the file size may be different from one

Re: [web2py] web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 8:44 AM, David Marko wrote: Failed requests:19 (Connect: 0, Receive: 0, Length: 19, Exceptions: 0) May not actually be a problem. Reason? It might be a site that serves dynamic context (such as different cookie IDs mentioned) where the file size changes

Re: [web2py] web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 8:44 AM, David Marko wrote: Failed requests:19 (Connect: 0, Receive: 0, Length: 19, Exceptions: 0) Even more reassurance: http://stackoverflow.com/questions/1512304/failed-requests-by-length-in-my-apachebench-load-test-result

Re: [web2py] Re: web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 10:00 AM, mdipierro wrote: You are the man. For the page I am considering the fail requests are not a real failure but declare a content-length of 19383 (wrong) instead of 19384 (correct). Let's continue investigate... I'm seeing two variations (using curl -i). One is

Re: [web2py] Re: web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 10:00 AM, mdipierro wrote: For the page I am considering the fail requests are not a real failure but declare a content-length of 19383 (wrong) instead of 19384 (correct). Let's continue investigate... Once the chunked encoding question is answered, it seems to me that we

Re: [web2py] Re: Can you share some web2py performance info?

2010-08-12 Thread Jonathan Lundell
On Aug 12, 2010, at 10:29 AM, mdipierro wrote: The fail requests are due to the fact that dynamical pages may have different length at each time and ab reports them as failure. It is not an issue. http://groups.google.com/group/web2py/msg/e6509b1d543696b3 But why the erratic

Re: [web2py] Re: web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
, no-cache, must-revalidate, post-check=0, pre-check=0 Set-Cookie: session_id_examples=70-0-249-65-3139077f-0ef8-4e39-8ddf-6bc40690414f; Path=/ Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 Massimo On Aug 12, 12:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 12

Re: [web2py] Re: web2py FORM, concurrency and failed requests

2010-08-12 Thread Jonathan Lundell
requests are not a real failure but declare a content-length of 19383 (wrong) instead of 19384 (correct). Let's continue investigate... Massimo On Aug 12, 11:53 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 12, 2010, at 8:44 AM, David Marko wrote: Failed requests:19

Re: [web2py] Re: web2py FORM, concurrency and failed requests

2010-08-13 Thread Jonathan Lundell
. There's a bit of explanation here, along with a fragment of relevant Apache source (in the comments): http://bytes.com/topic/php/answers/10395-chunked-encoding-php-apache2 Massimo On Aug 12, 9:59 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 12, 2010, at 5:13 PM, mdipierro wrote

Re: [web2py] Re: Problem with IS_STRONG() and CRYPT() methods

2010-08-13 Thread Jonathan Lundell
On Aug 13, 2010, at 2:19 AM, mdipierro wrote: @elfuogo1, let us know if the problems are solved. Following up on Mr Freeze's comment, IS_STRONG is a bit problematical, or at least it doesn't fit so well into the pattern of the other validators. There's no good way to translate its messages,

[web2py] widget.py: -f folder

2010-08-13 Thread Jonathan Lundell
Remind me, please, what the function of the -f folder command line option is. All the other startup method appear to use the location of the startup file (eg wsgihandler.py).

Re: [web2py] Re: is it possible to pass string C++ as URL argument?

2010-08-14 Thread Jonathan Lundell
On Aug 14, 2010, at 6:10 AM, mdipierro wrote: On Aug 14, 5:55 am, Jurgis Pralgauskis jurgis.pralgaus...@gmail.com wrote: On Aug 5, 3:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: the problem is not the escaping (which is correct, + must be escaped) the problem is thta web2py urls do not

Re: [web2py] Re: is it possible to pass string C++ as URL argument?

2010-08-14 Thread Jonathan Lundell
validation. This would be useful for a query string that needed different validation for different args/vars. We could automate that, too, or at least provide helpers. Perhaps a list of var-key patterns and corresponding validation patterns for the arguments. On Aug 14, 11:04 am, Jonathan Lundell

Re: [web2py] Re: Translated sets

2010-08-15 Thread Jonathan Lundell
On Aug 15, 2010, at 6:48 AM, mdipierro wrote: IS_IN_SET(set,[T(x) for x in set]) How do the language files get updated for something dynamic like this? On Aug 15, 7:54 am, Fabio Alessandro Locati floc...@grimp.eu wrote: Hi, I've created a set in 'modules/sets.py'. I use this set for a db

Re: [web2py] Re: ?code=400ticket=Nonerequested_uri=None

2010-08-16 Thread Jonathan Lundell
On Aug 16, 2010, at 11:56 AM, mdipierro wrote: This is important and should be fixed. we will look into it. Perhaps Jonathan who has worked on routes extensively can look into this. I'm a little in the dark on routes_onerror; I recall looking at it a while back when I noticed that its doctest

Re: [web2py] Re: ?code=400ticket=Nonerequested_uri=None

2010-08-16 Thread Jonathan Lundell
On Aug 16, 2010, at 12:41 PM, Michael Wolfe wrote: I'm not sure anything can be done about it from within web2py (though Jonathan could certainly answer that better than I). It appears to be a limitation of the rocket web server. It may need to be taken up with the development team working

Re: [web2py] Logging in web2py

2010-08-16 Thread Jonathan Lundell
On Aug 16, 2010, at 1:31 PM, Yarin wrote: I've posted an updated slice with an in-depth treatment of logging in web2py. http://web2pyslices.com/main/slices/take_slice/91 I've got a patch pending that adds a (standard format) logging configuration file, and converts all of web2py's logging

Re: [web2py] Re: Logging in web2py

2010-08-16 Thread Jonathan Lundell
call. The only interesting code is in main.py, along with logging.example.conf. Nothing much to it: just loading a configuration file, and using specific loggers. On Aug 16, 5:03 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 16, 2010, at 1:31 PM, Yarin wrote: I've posted

Re: [web2py] Re: PAPERBACK web2py book

2010-08-17 Thread Jonathan Lundell
On Aug 17, 2010, at 4:49 AM, mdipierro wrote: As I explained in a previous thread there seem to be some legal problems. Lulu is the publisher and they offer amazon or ibookstore. They do not seem to allow both and I cannot redistribute the book without them using the same isbn. yet ibookstore

Re: [web2py] Re: Logging in web2py

2010-08-17 Thread Jonathan Lundell
On Aug 17, 2010, at 9:16 PM, Yarin wrote: @Jonathan- Like your use of config files for default configurations, but beyond that I'm not clear on what your patch is meant to solve- What's your reason for introducing named loggers and sub-loggers at the site level? Couldn't the root logger just

Re: [web2py] Re: Logging in web2py

2010-08-18 Thread Jonathan Lundell
On Aug 18, 2010, at 6:36 AM, Yarin wrote: The reason for named loggers is twofold. One is trivial: to identify the source of log messages. Logging already tracks module, function, lineno... we can even insert a stack trace The other ... to let us have different log levels for different

Re: [web2py] Re: Bug in URL(..,..,vars={})

2010-08-20 Thread Jonathan Lundell
On Aug 20, 2010, at 8:29 AM, mdipierro wrote: I changed and changed back. I am waiting for comments form other developers. I am not sure what the best course of action is. What's an example of the framework breakage using the helper form of URL? Massimo On Aug 20, 8:23 am, Phyo Arkar

Re: [web2py] Re: Bug in URL(..,..,vars={})

2010-08-20 Thread Jonathan Lundell
On Aug 19, 2010, at 6:38 PM, mdipierro wrote: In trunk, I modified the definition of URL so that it returns the XML(..) helper wrapping the string. This will prevent {{=URL(...)}} from double escaping but will prevent you from doing 'http://127.0.0.:8000'+URL(..) Couldn't this be

Re: [web2py] Re: Bug in URL(..,..,vars={})

2010-08-20 Thread Jonathan Lundell
On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote: On Aug 19, 2010, at 6:38 PM, mdipierro wrote: In trunk, I modified the definition of URL so that it returns the XML(..) helper wrapping the string. This will prevent {{=URL(...)}} from double escaping but will prevent you from doing

Re: [web2py] Re: Bug in URL(..,..,vars={})

2010-08-20 Thread Jonathan Lundell
, Jonathan Lundell jlund...@pobox.com wrote: On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote: On Aug 19, 2010, at 6:38 PM, mdipierro wrote: In trunk, I modified the definition of URL so that it returns the XML(..) helper wrapping the string. This will prevent {{=URL(...)}} from

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-21 Thread Jonathan Lundell
On Aug 20, 2010, at 2:40 PM, mdipierro wrote: I see a lot of value in - bug-squishing-contest , - Stress test, Test everything , try to crash web2py etc. - fix bugs, fix performance issues , improve performance - code cleanup , documentation. we can set deadlines for that. This means we

Re: [web2py] Re: TypeError: 'XML' object is unsubscriptable

2010-08-21 Thread Jonathan Lundell
On Aug 21, 2010, at 10:02 PM, mdipierro wrote: Did you try 819? I think XML needs this: def __getitem__(self, key): return str(self).__getitem__(key) Massimo On Aug 21, 11:01 pm, mr.freeze nat...@freezable.com wrote: I get the same thing on a newly created app when

Re: [web2py] Re: TypeError: 'XML' object is unsubscriptable

2010-08-21 Thread Jonathan Lundell
On Aug 21, 2010, at 10:41 PM, mdipierro wrote: I had it, together with __getslice__, I thought I pushed in 819 but perhaps I did not. Pushing again. That's better. On Aug 22, 12:17 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 21, 2010, at 10:02 PM, mdipierro wrote: Did you try

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-24 Thread Jonathan Lundell
On Aug 24, 2010, at 11:29 AM, mart wrote: Well, this is all interesting :) After reading Michele's email, I just had to spend hours looking at Mercurial ( the like) as deeply as the day would let me (I'm on PTO, so I can do this). I thought I had a good idea about distributed version control

Re: [web2py] dashes in controller names?

2010-08-24 Thread Jonathan Lundell
On Aug 24, 2010, at 6:47 PM, Cory Coager wrote: How do you use dashes in controller names? I get errors, Invalid request. You can't. The URL parser allows only \w+ (alphanumeric or underscore).

Re: [web2py] Re: dashes in controller names?

2010-08-24 Thread Jonathan Lundell
On Aug 24, 2010, at 8:03 PM, Kevin wrote: As far as I can find, you have to set up web2py routes to do this -- it's pretty easy to do redirection using routes (using routes_in), but I'm not aware of any way off-hand to do the equivalent of rewriting/ translation the URL for inbound requests

Re: [web2py] Re: dashes in controller names?

2010-08-25 Thread Jonathan Lundell
to translate underscores in the query string. On Aug 24, 9:46 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 24, 2010, at 8:03 PM, Kevin wrote: As far as I can find, you have to set up web2py routes to do this -- it's pretty easy to do redirection using routes (using routes_in), but I'm

Re: [web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 8:11 AM, Joe Wakefield wrote: The assertion errors are blank, so I added some extra output: -IS_IMAGE STARTED- filename: 1.png extension: png self.extensions: jpeg ERROR IN IS_IMAGE: -IS_IMAGE STARTED- filename: llamas.jpg extension: jpg

Re: [web2py] Re: IS_IMAGE() broke?

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 8:33 AM, Joe Wakefield wrote: I'll do you one better. The problem is in sqlhtml.py at lines 909-917. It changes ret=False to ret=True if the field already has a value. Good catch. This is a case where a comment documenting the intent of this hunk of code would come in

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 9:00 AM, Phyo Arkar wrote: Did I Read that reading files inside controller will block web2py , Does it? Thats a bad news.. i am doing a file crawler and while crawling , web2py is blocked even tho the process talke only 25% of 1 out of 4 CPUs .. This stuff gets a little

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 1:41 PM, mdipierro wrote: call session._unlock() if you do not need session locking If you do that (without calling session.forget), what will happen in _try_store_on_disk when cPickle.dump(dict(self), response.session_file) is called with a None file argument? Or

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
and saves it On Aug 25, 3:52 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 25, 2010, at 1:41 PM, mdipierro wrote: call session._unlock() if you do not need session locking If you do that (without calling session.forget), what will happen in _try_store_on_disk when

Re: [web2py] Re: Web2py and threads

2010-08-25 Thread Jonathan Lundell
On Aug 25, 2010, at 7:56 PM, mdipierro wrote: This is a bug. I fixed it in trunk. Thanks Jonathan. It's fixed in the sense that it won't raise an exception. But now how is calling _unlock different from calling forget? On Aug 25, 9:30 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug

Re: [web2py] Re: IS_IMAGE() broke?

2010-08-26 Thread Jonathan Lundell
added makes any sense. Massimo On Aug 25, 10:59 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 25, 2010, at 8:33 AM, Joe Wakefield wrote: I'll do you one better. The problem is in sqlhtml.py at lines 909-917. It changes ret=False to ret=True if the field already has a value

Re: [web2py] Re: Web2py and threads

2010-08-27 Thread Jonathan Lundell
On Aug 25, 2010, at 8:12 PM, Jonathan Lundell wrote: On Aug 25, 2010, at 7:56 PM, mdipierro wrote: This is a bug. I fixed it in trunk. Thanks Jonathan. It's fixed in the sense that it won't raise an exception. But now how is calling _unlock different from calling forget? Nag

Re: [web2py] Re: best grid system

2010-08-28 Thread Jonathan Lundell
On Aug 28, 2010, at 10:07 AM, mdipierro wrote: datatable -- i can do all i want, nice documentation/example good for searching but only for small datasets Supports server-side filtering, though: http://www.datatables.net/usage/server-side jqgrid -- i cant find a good documentation, i

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
On Aug 29, 2010, at 12:02 AM, mart wrote: 2. changed .bash_profile to point to python 2.7 (even if nor recommended, 1.83 worked just fine on 2.7 for me). This time got the 'No handlers could be found for logger web2py' error and returned the terminal to the cursor (web2py stopped immediately

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
On Aug 29, 2010, at 9:46 AM, mart wrote: So, I just downloaded the src from http://web2py.com/examples/static/nightly/web2py_src.zip, just in case there are changes since last night. I am on mac os 10.6.4 and this is what I get (copied from terminal): macmart:web2py_184 mart$ python

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
On Aug 29, 2010, at 9:46 AM, mart wrote: So, we still notice the same error No handlers could be found for logger web2py and the I am brought back to the terminal cursor. There may be two problems here. One is that the no handlers message may be normal, but shouldn't result in termination.

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
try that python command-line test under 2.7? On Aug 29, 1:06 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 29, 2010, at 9:46 AM, mart wrote: So, I just downloaded the src fromhttp://web2py.com/examples/static/nightly/web2py_src.zip, just in case there are changes since last

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
On Aug 29, 2010, at 11:12 AM, mart wrote: hey Jonathan, renamed logging.conf to logging_x.conf, modified main.py, and re-ran web2py. Worked great for me! :) Thanks, I appreciate it. Thanks, Mart :) On Aug 29, 1:42 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 29, 2010

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
29, 6:34 pm, mart msenecal...@gmail.com wrote: Any time :) On Aug 29, 4:40 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 29, 2010, at 11:12 AM, mart wrote: hey Jonathan, renamed logging.conf to logging_x.conf, modified main.py, and re-ran web2py. Worked great for me

Re: [web2py] Re: please check 1.84.0 (beta)

2010-08-29 Thread Jonathan Lundell
renamed the previous web2py's folder name (just in case, something had picked it up)... but still working (and getting the warning)... So, not too sure why this isn't failing as it did, this morning... Thanks, Mart :) On Aug 29, 6:59 pm, Jonathan Lundell jlund...@pobox.com wrote

Re: [web2py] Re: per app routes

2010-08-31 Thread Jonathan Lundell
routes file, then use that for routes_in. -Mike On Aug 7, 12:36 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 7, 2010, at 9:32 AM, David Marko wrote: Hello, have you tested performance impact on application. Do you assume some noticeable slowdown when usingroutes? I have

Re: [web2py] Re: per app routes

2010-08-31 Thread Jonathan Lundell
. It appears that the incoming URL is being applied to eachapp-specificroutes_in one at a time before it is applied against routes_app. I'll try to include more details later, but I wanted to bring it to your attention now. -Mike On Aug 7, 12:36 pm, Jonathan Lundell jlund...@pobox.com wrote

Re: [web2py] Re: per app routes

2010-08-31 Thread Jonathan Lundell
On Aug 31, 2010, at 12:53 PM, mwolfe02 wrote: default_function does not seem to be recognized properly in app- specific routes.py. I'm thinking default_controller may have a similar problem, but I'm not really redefining it. My base routes.py has default_application set to 'my_app' (and

Re: [web2py] Re: per app routes

2010-08-31 Thread Jonathan Lundell
On Aug 31, 2010, at 12:53 PM, mwolfe02 wrote: default_function does not seem to be recognized properly in app- specific routes.py. I'm thinking default_controller may have a similar problem, but I'm not really redefining it. My base routes.py has default_application set to 'my_app' (and

Re: [web2py] Re: per app routes

2010-08-31 Thread Jonathan Lundell
look. It's helpful to know that it's getting 'index' in this case. One final thing: what's your routes_app? Is http://domain.com/ resulting in my_app? Maybe you could send me, privately if you like, your global and my_app routes.py. -Mike On Tue, Aug 31, 2010 at 4:09 PM, Jonathan Lundell

[web2py] rewrite.py patch

2010-08-31 Thread Jonathan Lundell
One more change to rewrite.py. http://web.me.com/jlundell/filechute/rewrite.zip I took out the custom logging logic, which was confusing, because now that we have generalized logging it's redundant. However, there's a remaining problem to be resolved. Maybe.

[web2py] bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
Massimo, it dawned on me (literally--I was lying in bed with the sun coming up) that we can't use the global rewrite.params to store the app-specific routing parameters because it's not thread-safe. Right? But I can't think of where we *could* keep that info, given the places that need to use

Re: [web2py] Re: bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
not available. Maybe the environment that carries request and the other globals? On Sep 1, 8:46 am, Jonathan Lundell jlund...@pobox.com wrote: Massimo, it dawned on me (literally--I was lying in bed with the sun coming up) that we can't use the global rewrite.params to store the app-specific

Re: [web2py] Re: bug in app-specific routing

2010-09-01 Thread Jonathan Lundell
programmatically, but it looks to me like we can't count on having request here. Similarly, in rewrite.filter_out, the first thing we look for is params.routes_out, but can we count on any global context at all? On Sep 1, 9:17 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 1, 2010

Re: [web2py] Re: rewrite.py patch

2010-09-01 Thread Jonathan Lundell
. No problem if you're not using it, or if you have only one application running. thanks, Mart :) On Aug 31, 9:08 pm, Jonathan Lundell jlund...@pobox.com wrote: One more change to rewrite.py. http://web.me.com/jlundell/filechute/rewrite.zip I took out the custom logging logic, which

Re: [web2py] Re: per app routes

2010-09-02 Thread Jonathan Lundell
, and default_function parameters all actually do interact in terms of URL rewriting. Thanks again, -Mike On Aug 31, 5:34 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 31, 2010, at 2:20 PM, Michael Wolfe wrote: That didn't seem to quite do it. Visitinghttp://domain.com/rewrites

Re: [web2py] Re: per app routes

2010-09-02 Thread Jonathan Lundell
the routes_app, default_app, default_controller, and default_function parameters all actually do interact in terms of URL rewriting. Thanks again, -Mike On Aug 31, 5:34 pm, Jonathan Lundell jlund...@pobox.com wrote: On Aug 31, 2010, at 2:20 PM, Michael Wolfe wrote: That didn't

Re: [web2py] Using SOLR as the web2py backend

2010-09-02 Thread Jonathan Lundell
On Sep 2, 2010, at 2:05 PM, harryf wrote: This is kind of a re-post of a question I asked on stackoverflow - http://stackoverflow.com/questions/3630641/whats-the-most-productive-frontend-framework-to-use-with-solr-as-the-backend/ which Massimo invited me to ask here. To repeat, I want to

Re: [web2py] RESTful URLs

2010-09-03 Thread Jonathan Lundell
On Sep 3, 2010, at 9:28 PM, bally boy wrote: Hi is there a way to generate RESTful URLS. Let me explain:- 1. I have an app called 'app' 2. a controller called 'cont' 3. a function called 'func' Instead of being called by the url http://.../app/cont/func Can it be called like

Re: [web2py] What is polymodel?

2010-09-06 Thread Jonathan Lundell
On Sep 6, 2010, at 9:10 AM, Jose wrote: What is polymodel? http://code.google.com/appengine/articles/polymodel.html Do you use? How is it used?

Re: [web2py] Re: Routes.py on GAE

2010-09-09 Thread Jonathan Lundell
On Sep 9, 2010, at 6:27 AM, mdipierro wrote: I do not understand where unable to import Rocket comes from. That's a strange error. Also, the syntax error on routes.py is on line 3, which is empty; there's no code until line 4. My advice is to resolve the first error (Rocket) before worrying

Re: [web2py] Re: Routes.py on GAE

2010-09-09 Thread Jonathan Lundell
On Sep 9, 2010, at 7:49 AM, mdipierro wrote: gaehanlder.py does not import Rocket. main imports Rocket Is it possible gaehandler.py or app.yaml were modified? On Sep 9, 9:40 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 9, 2010, at 6:27 AM, mdipierro wrote: I do

Re: [web2py] Re: Routes.py on GAE

2010-09-09 Thread Jonathan Lundell
uploading to GAE, and send me a copy. On Sep 9, 9:57 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 9, 2010, at 7:49 AM, mdipierro wrote: gaehanlder.py does not import Rocket. main imports Rocket Is it possible gaehandler.py or app.yaml were modified? On Sep 9, 9:40

Re: [web2py] Re: Routes.py on GAE

2010-09-09 Thread Jonathan Lundell
in app-specific routes.py default_function = 'index' routes_in = ( ('/', '/reviewround/default/index'),) routes_out = ( ('/reviewround/default/index', '/'),) -Miguel On Thu, Sep 9, 2010 at 9:28 AM, Jonathan Lundell jlund...@pobox.com wrote: On Sep 9, 2010, at 9:17 AM, mdipierro wrote

[web2py] app-specific routing

2010-09-10 Thread Jonathan Lundell
Massimo has applied (after a false start on my part) the final portion of the app-specific routing patch. There are no API changes (unless you're directly looking at rewrite.params, in which case ask about the new interface), but the new code is thread-safe and should be good to go. Have a

Re: [web2py] Re: app-specific routing

2010-09-10 Thread Jonathan Lundell
documents/Documents/Prog/web2py/gluon/ streamer.py, line 46, in module error_message = main.thread.routes.error_message % 'invalid request', AttributeError: 'thread._local' object has no attribute 'routes' On 10 sep, 19:10, Jonathan Lundell jlund...@pobox.com wrote: Massimo has applied

Re: [web2py] Re: app-specific routing

2010-09-10 Thread Jonathan Lundell
, DEFAULT_CHUNK_SIZE File /media/DONNEES/Mes documents/Documents/Prog/web2py/gluon/ streamer.py, line 46, in module error_message = main.thread.routes.error_message % 'invalid request', AttributeError: 'thread._local' object has no attribute 'routes' On 10 sep, 19:10, Jonathan

Re: [web2py] Re: Scaffolding app with Twitter OAuth1.0a auth

2010-09-10 Thread Jonathan Lundell
Folks playing with Twitter OAuth might care to read this: http://arstechnica.com/security/guides/2010/09/twitter-a-case-study-on-how-to-do-oauth-wrong.ars/

Re: [web2py] TAG() throws a ticket when string too short

2010-09-12 Thread Jonathan Lundell
On Sep 12, 2010, at 8:57 AM, weheh wrote: I'm flattening some text, assuming it's html, and get this error message when the text input is less than 4 characters: input='abc' stream=cStringIO.StringIO(TAG(input).flatten()) What are you expecting this to generate? At first glance, it seems

Re: [web2py] Re: Routes.py on GAE

2010-09-12 Thread Jonathan Lundell
+ \ 'Please fix it before you restart web2py\n' + \ 'File: %s\n' % hex + \ traceback.format_exc()) raise e thanks Miguel On Thu, Sep 9, 2010 at 9:24 PM, Jonathan Lundell jlund...@pobox.com wrote: On Sep 9, 2010, at 9

<    1   2   3   4   5   6   7   8   9   10   >