Re: [web2py] 1.91.4 error reading version file

2010-12-25 Thread Jonathan Lundell
On Dec 25, 2010, at 1:40 PM, reyelts wrote: Either the code should be looking for the name 'version' (since that's what is shipped) or the file should be renamed 'VERSION' (since that's what's hardcoded in the source). Shipping 'version' and coding 'VERSION' is just asking for the problem we

Re: [web2py] Re: 1.91.4 error reading version file

2010-12-27 Thread Jonathan Lundell
, and how are you unpacking it? On Dec 25, 5:22 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 25, 2010, at 1:40 PM, reyelts wrote: Either the code should be looking for the name 'version' (since that's what is shipped) or the file should be renamed 'VERSION' (since that's

Re: [web2py] Call for posting issues on Google Code

2010-12-27 Thread Jonathan Lundell
On Dec 27, 2010, at 8:20 AM, Bruno Rocha wrote: Many issues have emerged here in the list, I think it looks a little messy to manage these issues in this group. I think it's very important to post the issue here and report it as this can generate a good discussion between other users (and

Re: [web2py] Re: 1.91.4 error reading version file

2010-12-27 Thread Jonathan Lundell
:52 am, Jonathan Lundell jlund...@pobox.com wrote: On Dec 27, 2010, at 7:39 AM, reyelts wrote: So is this a packaging error when building the source package for download from web2py.com? I got VERSION just now when I downloaded it. http://www.web2py.com/examples/static/web2py_src.zip

[web2py] patch notes

2010-12-27 Thread Jonathan Lundell
By way of explanation... My parse_url patch today is strictly refactoring, with no functional change--another in a series of patches to make URL rewriting more modular. The Rocket patch is slightly more than cosmetic, in a development context. New worker threads, beyond the first default

Re: [web2py] Re: 1.91.4 error reading version file

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 8:34 AM, reyelts wrote: Both downloads were done using Linux, which wouldn't be playing around with the names like Windows. The downloads were done to a clean/empty directory, so no infection from a prior file, either. What does unzip -l show you on the downloaded .zip?

Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 11:05 AM, Bruno Rocha wrote: So the question: who can take over web2py, if Massimo no longer commits to it for whatever reason? It is not clear. Looking at people list at google code page, I see Jlundell with comitter role.

Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 11:54 AM, VP wrote: I love the fact that if I have a problem with web2py and asked a question, Massimo will likely answer it. But the perceptual problem of web2py is a single-person effort is real. Massimo fixes most of the bugs (it seems so). Massimo is mainly

Re: [web2py] Cron: what happens if a process isn't finished and the next time to start it comes again?

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 1:18 PM, Lorin Rivers wrote: I am working on moving some of the computation-intensive processes to a cron-launched scheme. I have some that run every minute, every 2 minutes, every 5 minutes and every 15 minutes. In production, it's possible that the volume of incoming

Re: [web2py] web2py 1.91.5 is OUT

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 2:09 PM, mdipierro wrote: Mostly bug fixes about new dal (joins, with_alias, ordering on joins in postgresql, db().select(db.table.ALL) on GAE, behavior of boolean writable=False, upload of new apps with missing file) and some internal improvements (mostly due to

Re: [web2py] web2py 1.91.5 is OUT

2010-12-28 Thread Jonathan Lundell
On Dec 28, 2010, at 3:43 PM, Michele Comitini wrote: I thought it was intentional to keep urlencode compat. I used to solve it like this: vars = (('a',1), ('b',2), ('b',3)) request.vars is a dict already, so it was more straightforward to go the other way. Also, I think that's the way

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 12:37 PM, Arun K.Rajeevan wrote: great as far as 25 page pdf is in consideration. next time a simple text file is good enough. how the page get rendered? using generic.html or is it have a custom view file? And what's the controller returns? btw which version of

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Jonathan Lundell
, Jonathan Lundell jlund...@pobox.com wrote: On Dec 29, 2010, at 12:37 PM, Arun K.Rajeevan wrote: great as far as 25 page pdf is in consideration. next time a simple text file is good enough. how the page get rendered? using generic.html or is it have a custom view file? And what's

Re: [web2py] component .load

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 3:25 PM, mattynoce wrote: hi all. i have a component i'm plugging into the middle of a page, but i want that component to act seamlessly with the rest of the page. i do NOT want the component to do what components usually do and act independently. i need to include

Re: [web2py] What's the best way to insert raw html ?

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 3:10 PM, Stef Mientki wrote: Now I encounter 2 problems: 1. the raw html contains tags, like: ptoch iets over stromen, een plaatje/ppbr //pbr /pnbsp;nbsp; I remove them with the helper function TAG. Although it seems to work, I'm not convinced that this is

Re: [web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 4:32 PM, Branko Vukelić wrote: Btw, in case you're new to these things, the main point of URL helpers (called URL generators in some frameworks) is to generate the URL based on the information about the internal structure of the application. This is done to avoid

Re: [web2py] web2py Turnkey Linux Appliance (collaborator needed)

2010-12-30 Thread Jonathan Lundell
On Dec 30, 2010, at 7:36 AM, ghoulmann wrote: I'm collaborating with Massimo to produce a Web2py appliance that will install a Lucid distro with Web2py fully configured (probably by patching TurnKey Linux's LAPP stack 11.0). The icing on this would be an init hook to ask the user to set the

Re: [web2py] component .load

2010-12-30 Thread Jonathan Lundell
On Dec 29, 2010, at 3:25 PM, mattynoce wrote: hi all. i have a component i'm plugging into the middle of a page, but i want that component to act seamlessly with the rest of the page. i do NOT want the component to do what components usually do and act independently. i need to include

Re: [web2py] Re: component .load

2010-12-30 Thread Jonathan Lundell
On Dec 30, 2010, at 9:49 AM, mattynoce wrote: if i can override request.extension and have it propagate, that's totally fine. if, for example, i could do this: def formControllerFromComponent: # *** new line *** request.extension = 'html' doSomething() doSomethingElse()

Re: [web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-30 Thread Jonathan Lundell
On Dec 30, 2010, at 12:55 PM, Niphlod wrote: PS: on line 561 of gluon/main.py of trunk there's a typo: INPORTANT instead of IMPORTANT Thanks. I have an unrelated patch in the works that affects main.py, so I'll include it unless Massimo gets around to fixing it first.

Re: [web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-30 Thread Jonathan Lundell
On Dec 30, 2010, at 12:51 PM, Niphlod wrote: uhm virtually very very very draft of Jonathan's concept. That looks about right, perhaps with some minor wording changes: help='exit after saving password' (no sense in confusing the user about file names, and there's really no

Re: [web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-30 Thread Jonathan Lundell
helptext is definetely acceptable, in the long run maybe a comment in the code will be more helpful than the explicit helpstring of optparse Niphlod On Dec 30, 11:06 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 30, 2010, at 12:51 PM, Niphlod wrote: uhm virtually very very

Re: [web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-30 Thread Jonathan Lundell
. On Dec 31, 3:45 am, Jonathan Lundell jlund...@pobox.com wrote: On Dec 30, 2010, at 6:32 PM, ghoulmann wrote: Jonathon, Niphlod, Massimo, thank you for taking the time to write. I think I know much less than I implied in my original post. Is the Jonathon and Niphlod produced something I

Re: [web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-31 Thread Jonathan Lundell
On Dec 30, 2010, at 10:47 PM, Christopher Steel wrote: you could become the www-data user with su www-data change to /home/www-data/web2py and then run the commands: python -c from gluon.widget import console; console(); and python -c from gluon.main import save_password;

Re: [web2py] Translation problem

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 6:18 AM, Martin Weissenboeck wrote: I want to translate my web page to German. The T()operator is very fine, but I could not find any way to translate message like enter an integer less than or equal to %(max)g in class IS_INT_IN_RANGE. I think it is very

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
defined? I'm a little fuzzy on the whole subject, and would appreciate some clarification. On Dec 31, 11:26 am, Jonathan Lundell jlund...@pobox.com wrote: On Dec 31, 2010, at 6:18 AM, Martin Weissenboeck wrote: I want to translate my web page to German. The T()operator is very fine, but I

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 9:44 AM, DenesL wrote: On Dec 31, 12:23 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 31, 2010, at 8:54 AM, DenesL wrote: = The problem is that those messages are defined internally in the validator and can not be set via error_message. Actually, they can

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
: global name 'T' is not defined, line 188, in restricted So the question is why T can not be part of the environment variable when it is available at the model level. On Dec 31, 11:26 am, Jonathan Lundell jlund...@pobox.com wrote: On Dec 31, 2010, at 6:18 AM, Martin Weissenboeck wrote: I

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 9:23 AM, Jonathan Lundell wrote: On Dec 31, 2010, at 8:54 AM, DenesL wrote: The problem is that those messages are defined internally in the validator and can not be set via error_message. Actually, they can, except that there's a bug for the first one, 'enter

Re: [web2py] Translation problem

2010-12-31 Thread Jonathan Lundell
an argument forces Python to defer binding. 2010/12/31 Jonathan Lundell jlund...@pobox.com On Dec 31, 2010, at 6:18 AM, Martin Weissenboeck wrote: I want to translate my web page to German. The T()operator is very fine, but I could not find any way to translate message like enter an integer less

Re: [web2py] comet for web2py (give it a try) - and happy new year

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 11:14 AM, mdipierro wrote: Should be self explanatory: http://code.google.com/p/web2py/source/browse/scripts/comet_messaging.py It got checked into gluon/contrib, not scripts.

Re: [web2py] Re: comet for web2py (give it a try) - and happy new year

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 12:29 PM, Bruno Rocha wrote: I tried rochacbr...@macubuntu:~/projects/web2py/gluon/contrib$ sudo easy_install tornado[sudo] password for rochacbruno: install_dir /usr/local/lib/python2.6/dist-packages/ Searching for tornado Best match: tornado 0.2 tornado 0.2 is

[web2py] RFC: new URL routing facility

2010-12-31 Thread Jonathan Lundell
I've been working on a new URL routing facility that provides fairly powerful rewriting with very simple configuration and no regexes. The configuration is described below. Features: * remove default application/controller names from URLs * support domain-app mapping (no visible app names) *

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 8:06 PM, DenesL wrote: The ideal solution would be one that allowed using T() normally in gluon (at least in code that's invoked from an application); that avoids the T=T requirement. My conjecture is when Python compiles the gluon code, it binds T references (to

Re: [web2py] Re: Translation problem

2010-12-31 Thread Jonathan Lundell
On Dec 31, 2010, at 8:06 PM, DenesL wrote: The ideal solution would be one that allowed using T() normally in gluon (at least in code that's invoked from an application); that avoids the T=T requirement. My conjecture is when Python compiles the gluon code, it binds T references (to

Re: [web2py] Translation problem

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 2:30 AM, Martin Weissenboeck wrote: 2010/12/31 Jonathan Lundell jlund...@pobox.com On Dec 31, 2010, at 11:20 AM, Martin Weissenboeck wrote: No, I did not not want to translate these sentences manually. The error_message=T(..) does not work, because there are some

Re: [web2py] URL encoding

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 12:38 AM, Arun K.Rajeevan wrote: My application has a search form: it self submit to whatever page it is in and redirects to search function. I took vars from search form (like, term = request.args(0)) and redirect as redirect (c='..', f='..', args=[v]) Now, in result

Re: [web2py] How web2py handles URLs

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 7:05 AM, Arun K.Rajeevan wrote: I don't see the resultant url encoding apostrophe. Also, space is getting replaced by underscore! How can I determine whether that's actually an underscore? I see this tutorial and I'm not wrong in saying that apostrophes must be

Re: [web2py] Re: RFC: new URL routing facility

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 9:25 AM, Arun K.Rajeevan wrote: When will it be available for us to experiment. regex is always a bit difficult to maintain. I hope to get a beta patch to Massimo in a few days. By beta I mean that it's not fully tested, and the API might not be final. But all the

Re: [web2py] URL encoding

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 9:23 AM, Arun K.Rajeevan wrote: Ok, I'm gonna experiment with raw_args. I was wondering what's this #routes_apps_raw=['myapp'] thing before (I was customizing routes) Don't forget to remove the #. When I use this functionality, am I correct in assuming that, I've to do

Re: [web2py] URL encoding

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 10:05 AM, Arun K.Rajeevan wrote: I did just this and seems working args = request.raw_args args = args.split('/') But now problem is with download function. It works by taking filename from request.args now, it should take value from request.raw_args My download

Re: [web2py] routes_apps_raw=['myapp'] and associated problems

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 10:12 AM, Arun K.Rajeevan wrote: I set, routes_apps_raw=['init'] and modified controllers to use request.raw_args Now my controllers are working fine. But it caused two new problems :related to download and login 1) def download(): return

Re: [web2py] Re: routes_apps_raw=['myapp'] and associated problems

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 10:33 AM, Arun K.Rajeevan wrote: apart from setting, routes_apps_raw=['init'] I've these changes to routs.py routes_in = ( (r'.*:/favicon.ico', r'/init/static/favicon.ico'), (r'.*:/robots.txt', r'/init/static/robots.txt'),

Re: [web2py] routes_apps_raw=['myapp'] and associated problems

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 11:33 AM, Arun K.Rajeevan wrote: I'm doing following code now, and is working. as you can see, no checking on arguments. Please show me how to do (or what to check) any checks on arguments.

Re: [web2py] Re: RFC: new URL routing facility

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 5:46 PM, villas wrote: The 'default_controller' variable in routes.py doesn't seem to be available in the rest of the app. From where may I access that information? Or, do I have to set that variable again in as an app setting somewhere (not very DRY!). I'm not sure what

Re: [web2py] Re: Error message during upgrade

2011-01-01 Thread Jonathan Lundell
On Jan 1, 2011, at 9:23 PM, Bruno Rocha wrote: 2011/1/2 mdipierro mdipie...@cs.depaul.edu its is a known problem that the automatic upgrade button does not work on windows Is there a way to detect that is running on Windows to disable the upgrade buttom? platform.system()

Re: [web2py] Re: RFC: new URL routing facility

2011-01-02 Thread Jonathan Lundell
that work? On Jan 2, 2:09 am, Jonathan Lundell jlund...@pobox.com wrote: On Jan 1, 2011, at 5:46 PM, villas wrote: The 'default_controller' variable in routes.py doesn't seem to be available in the rest of the app. From where may I access that information? Or, do I have to set that variable

Re: [web2py] Re: How to delete a user?

2011-01-02 Thread Jonathan Lundell
On Jan 2, 2011, at 7:01 AM, Rick wrote: I changed the code but it still doesn't work: Here's a fragment of my code that I use to delete a user. It's not ajax, but you'll get the idea: ut = auth.settings.table_user uu = urow.auth_user ... if not

Re: [web2py] Re: RFC: new URL routing facility

2011-01-02 Thread Jonathan Lundell
. Thanks. D On Jan 2, 3:58 pm, Jonathan Lundell jlund...@pobox.com wrote: On Jan 2, 2011, at 5:54 AM, villas wrote: Well, say I make a plugin which I want to link back to a function in my default_controller. I would not wish to to make my link like this URL('default','func'), but like

Re: [web2py] Re: How to delete a user?

2011-01-02 Thread Jonathan Lundell
, in this case, is not to use ajax. Just link directly to your deleteusr function. Something like this: def deleteusr(): db(custom_auth_table.username==session.username).delete() session.flash('the record has been deleted') redirect(wherever) On Jan 2, 5:13 pm, Jonathan Lundell

Re: [web2py] Re: How to delete a user?

2011-01-02 Thread Jonathan Lundell
On Jan 2, 2011, at 11:10 AM, Arun K.Rajeevan wrote: Try this, a href=# onclick=ajax('{{=URL('deleteusr')}}',[],''); window.location.reload();Delete this user/a I haven't tested, but must work. If I were coding this for myself, I think I'd self-submit and conditionally do the

Re: [web2py] Re: Crontab

2011-01-03 Thread Jonathan Lundell
On Jan 3, 2011, at 9:20 AM, mdipierro wrote: Yes they can. They should all run from the main web2py folder (do not use os.chdir(...)!) Digression: I'd like to fix that eventually. It's not so bad to require the cwd to be web2py for startup, but it shouldn't matter after that. the only

[web2py] BETA: new URL routing facility

2011-01-03 Thread Jonathan Lundell
The new URL routing facility that I described a few days ago is now in the trunk. Iprovides fairly powerful rewriting with very simple configuration and no regexes. The configuration is described below. WARNING: this is beta-quality code. There are surely bugs in it, and the API/configuration

Re: [web2py] Re: BETA: new URL routing facility

2011-01-03 Thread Jonathan Lundell
for controllers for other apps must be specified in app-specific routers. I'll be checking in a new feature in a day or two that allows you to define app-specific routers in the root routes.py. On Jan 3, 8:28 pm, Jonathan Lundell jlund...@pobox.com wrote: The new URL routing facility that I

Re: [web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread Jonathan Lundell
On Jan 4, 2011, at 7:19 AM, annet wrote: Thanks for your reply. I tried: form[0][2][2].insert(0,A('already in database?',_onmouseover=this.style.cursor='pointer';,_onclick=javascript:details('%s/'+ $('#kvk_number').val()+'/'+$ ('#subdossiernumber').val())%URL(r=request,f='retrieve')))

Re: [web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread Jonathan Lundell
On Jan 4, 2011, at 8:26 AM, mdipierro wrote: We have that form.element(...) form.elements(...) both take jQuery syntax. So the construction below can be expressed that way? Massimo On Jan 4, 10:13 am, Jonathan Lundell jlund...@pobox.com wrote: On Jan 4, 2011, at 7:19 AM, annet

[web2py] BETA 2: new routing facility

2011-01-04 Thread Jonathan Lundell
The second beta of the new routing logic is in the trunk. The example file isn't quite up to date as I write, but it will be shortly. The text below is taken from it. The underlying logic hasn't changed significantly, but the format of the routes.py file is new. You now specify routers, a dict

Re: [web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-05 Thread Jonathan Lundell
On Jan 5, 2011, at 2:25 AM, blackthorne wrote: ok What about the menu option /Computer /option, wouldn it be caught by the same regex currently used? I haven't been following this thread too closely, but all this stuff should be fine in vars. Question marks, slashes, spaces--all ought to

[web2py] new URL router release candidate

2011-01-06 Thread Jonathan Lundell
The new router logic in the trunk is looking fairly stable now, and needs feedback. See the comments in router.example.py for summary documentation (reproduced below), and ask here if you have questions. The simplest possible router is: routers = dict() This sets all the defaults (including

Re: [web2py] Re: new URL router release candidate

2011-01-06 Thread Jonathan Lundell
is default_application if domain mapping is not involved). A URL like this: http://domain2.com/admin/fcn/abc/def ...will be mapped correctly to: http://domain2.com/admin/default/fcn/abc/def (assuming that applications/admin is installed) Thank you. On Jan 6, 10:29 am, Jonathan Lundell

Re: [web2py] Re: new URL router release candidate

2011-01-06 Thread Jonathan Lundell
On Jan 6, 2011, at 11:52 AM, VP wrote: While this is intended to simplify the current specifications of routes.py (I think), what I have seen is more confusing to me. Does this replace the old routes.py? Maybe, can you provide examples of typical use cases? For example, one VPS account,

Re: [web2py] ADVOCACY: every single other Python program ever written uses imports?

2011-01-06 Thread Jonathan Lundell
On Jan 6, 2011, at 4:12 PM, Mariano Reingart wrote: With this I only want to help to demystify this negative appreciation about web2py, surely there are many more examples like this as Python is a dynamic language specially designed to execute and evaluate code (i.e., OpenOffice/GIMP/etc.

Re: [web2py] Re: [OT] Drupal alternatives in Python or web2py

2011-01-06 Thread Jonathan Lundell
On Jan 6, 2011, at 7:47 PM, Luther Goh Lu Feng wrote: I see. I did hear about InstantPress, but was under the impression that it is simply meant to be a blog because the similar name to Wordpress. WordPress is increasingly useful as a site builder. I developed http://prfound.org using

Re: [web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 2:15 AM, puercoespin wrote: Indeed. Moreover, while it's not best practice, it's certainly common enough to see from somewhere import * which magically injects a bunch of names into the namespace. Your suggestion that web2py simply has a small set of

Re: [web2py] Re: Drupal alternatives in Python or web2py

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 8:40 AM, Luther Goh Lu Feng wrote: On Jan 7, 6:37 pm, cjrh caleb.hatti...@gmail.com wrote: On Jan 7, 10:27 am, VP vtp2...@gmail.com wrote: But as you go deeper, trying to add features, it will be so difficult. Just to make the app looks right to your taste is really a

Re: [web2py] Re: new URL router release candidate

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 12:34 AM, VP wrote: sorry that was copypaste mistake. Here it is: Thanks. What's your routes.conf? try: config=open('routes.conf','r').read() except: config='' def auto_in(apps): routes=[ ('/robots.txt','/welcome/static/robots.txt'),

Re: [web2py] Re: Drupal alternatives in Python or web2py

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 9:00 AM, Luther Goh Lu Feng wrote: Looking at web2py, we already have an IDE, a wizard, and a plugin wiki. Might be the beginnings of a drupal-like CMS for this year's web2py exhibition. I'd like to see a good CMS based on web2py (the analogy isn't exact, but sort of like

Re: [web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 9:26 AM, blackthorne wrote: ok, after some work, here's the patch. Massimo, I tried to follow your way, hope you like it. The code is made in non strict way, so it shouldn't break at the first non valid input. URL() in meta-menu plugin_wiki patch:

Re: [web2py] Re: new URL router release candidate

2011-01-07 Thread Jonathan Lundell
='example3.com'), ) On Jan 7, 11:17 am, Jonathan Lundell jlund...@pobox.com wrote: On Jan 7, 2011, at 12:34 AM, VP wrote: sorry that was copypaste mistake. Here it is: Thanks. What's your routes.conf? try: config=open('routes.conf','r').read() except: config='' def

Re: [web2py] Re: new URL router release candidate

2011-01-07 Thread Jonathan Lundell
On Jan 7, 2011, at 12:25 PM, Jonathan Lundell wrote: On Jan 7, 2011, at 12:14 PM, VP wrote: It is something like this: example1.com /app1/default example2.com /app2/default example3.com /app3/default In that case: routers = dict( app1 = dict(domain='example1.com

Re: [web2py] Re: new URL router release candidate

2011-01-07 Thread Jonathan Lundell
, example1.net : app1/controller2 }, ) ) Thanks. On Jan 7, 2:39 pm, Jonathan Lundell jlund...@pobox.com wrote: On Jan 7, 2011, at 12:25 PM, Jonathan Lundell wrote: On Jan 7, 2011, at 12:14 PM, VP wrote: It is something like this: example1.com /app1/default

Re: [web2py] Re: Running PHP on top of Web2Py

2011-01-08 Thread Jonathan Lundell
On Jan 8, 2011, at 5:43 AM, jeff wrote: And I have obviously to write some lines in routes.py like (the proxy action is in the w.py controller of the poc app): (r'.*:http://.*:.* /(?Pany(?:admin/|poc/).*)', r'/\gany'), (r'.*:http://.*:.* /(?Pany.*)', r'/poc/w/proxy/vars=\gany'), # I

Re: [web2py] Re: new URL router release candidate

2011-01-08 Thread Jonathan Lundell
On Jan 7, 2011, at 1:56 PM, VP wrote: Thanks. What if I have something like this: example1.com /app1/controller1 example1.net /app1/controller2 How would this translate into this new syntax? I've been thinking about this one a little more, and I see a problem. When we rewrite

Re: [web2py] Limitations in a multiuser linux environment (or Debian packaging issues)

2011-01-08 Thread Jonathan Lundell
On Jan 8, 2011, at 11:29 AM, Jos? L. wrote: Anyway I know I'll have to patch the admin application in order to remove the remote upgrade of web2py as this option is not allowed in Debian packages (it's removed from firefox or openoffice too). Perhaps this should be a configuration option of

Re: [web2py] Re: on a possible web2py memory leak

2011-01-08 Thread Jonathan Lundell
On Jan 8, 2011, at 2:48 PM, Massimo Di Pierro wrote: In the case of web2py exec code in {} creates the circular reference for objects defined in the code. What is the circular reference?

Re: [web2py] Re: on a possible web2py memory leak

2011-01-09 Thread Jonathan Lundell
On Jan 9, 2011, at 1:20 PM, Massimo Di Pierro wrote: correct. Isn't the need to call gc.collect() explicitly a bit of a puzzle? Or is it just speeding up something that would happen eventually? On Jan 9, 1:18 pm, Anthony abasta...@gmail.com wrote: On Sunday, January 9, 2011 12:59:47 AM

Re: [web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-09 Thread Jonathan Lundell
On Jan 9, 2011, at 1:35 PM, Massimo Di Pierro wrote: About enterprise: For me enterprise always meant business and non-profit as a way to emphasize non-profit since that is what I have major interest in. It looks like many people read enterprise as large and bloated businesses. I think

Re: [web2py] Re: BETA: new URL routing facility

2011-01-09 Thread Jonathan Lundell
On Jan 9, 2011, at 10:55 PM, Wikus van de Merwe wrote: Jonathan, can you explain a bit more about how the new routes would work on some examples? How would the mappings below (just /c/f/args) look like with the new routes? /_ah/xmpp/message/chat/ - /comm/jabber /new-article -

Re: [web2py] Re: BETA: new URL routing facility

2011-01-10 Thread Jonathan Lundell
On Jan 9, 2011, at 11:41 PM, pbreit wrote: I'm a bit confused as well. Perhaps some more example would help. What's your current routes.py? A general question for the list: how many of you are using domain routing? That is, where you route a particular incoming domain to a particular route?

Re: [web2py] Re: BETA: new URL routing facility

2011-01-10 Thread Jonathan Lundell
On Jan 10, 2011, at 9:33 AM, Wikus van de Merwe wrote: I'm not using these routes. These were just made up examples to challenge the proposed new routes. Now I understand that new routes are not intend to be replacement for the old one, but rather a simplified alternative to handle the most

Re: [web2py] Re: BETA: new URL routing facility

2011-01-10 Thread Jonathan Lundell
On Jan 10, 2011, at 11:31 AM, pbreit wrote: As usual, there's more to it than I first imagined! To overcome the issue of routes being overwritten with an update, could there be a routes_default.py that ships with Web2py and can be overridden by routes.py in the same directory? Not super

Re: [web2py] (OT) Choosing a javascript mvc framework

2011-01-11 Thread Jonathan Lundell
On Jan 11, 2011, at 12:33 AM, Luther Goh Lu Feng wrote: Firstly, this topic is only remotely related to web2py. Being familiar with jquery and the fact that web2py uses jquery, I wonder if anyone has any recommendations for a javascript MVC framework and the reasons for doing so? Thanks

Re: [web2py] Re: new URL router release candidate

2011-01-11 Thread Jonathan Lundell
On Jan 7, 2011, at 1:56 PM, VP wrote: Thanks. What if I have something like this: example1.com /app1/controller1 example1.net /app1/controller2 How would this translate into this new syntax? OK, I've submitted a patch that allows this. The syntax: domains = { 'example1.com' :

Re: [web2py] Re: BETA: new URL routing facility

2011-01-11 Thread Jonathan Lundell
On Jan 11, 2011, at 2:39 PM, Wikus van de Merwe wrote: To visualise that better let me specify some examples from my own routes which are already covered: (.*:/favicon.ico, /init/static/favicon.ico) - covered by default (root_static key) (.*:/robots.txt, /init/static/robots.txt) -

Re: [web2py] Re: SCRIPT tag

2011-01-11 Thread Jonathan Lundell
On Jan 11, 2011, at 5:04 PM, Martin.Mulone wrote: Perhaps I miss something but did you render in a view with {{=XML(SCRIPT(alert(hi);))}} , and if you want to execute when the page is loaded you have to put the code in No need for XML(SCRIPT(xxx)), I don't think. Either XML

Re: [web2py] What is queue.yaml

2011-01-12 Thread Jonathan Lundell
On Jan 12, 2011, at 1:29 AM, Luther Goh Lu Feng wrote: Looking at the source, I see http://code.google.com/p/web2py/source/browse/queue.yaml and wonder what it is used for. Any ideas? http://code.google.com/appengine/docs/python/config/queue.html

[web2py] new router

2011-01-12 Thread Jonathan Lundell
With one more patch pending, the new URL router is looking pretty stable. There are some features pending, but they'll have to wait. I thought I'd describe some of the possibilities with a few use cases. Suppose you've written an app, named it 'myapp', and want to make it the default, with

Re: [web2py] new router

2011-01-12 Thread Jonathan Lundell
On Jan 12, 2011, at 4:56 PM, Bruno Rocha wrote: I am trying to configure a different way of routing, may be you can help me or point some hint about it, It is a system where the user will register himself and get instant access to an account (just like twitter), and the system will give a

Re: [web2py] new router

2011-01-13 Thread Jonathan Lundell
On Jan 12, 2011, at 4:56 PM, Bruno Rocha wrote: I am trying to configure a different way of routing, may be you can help me or point some hint about it, It is a system where the user will register himself and get instant access to an account (just like twitter), and the system will give a

Re: [web2py] Best practice for including python libraries with my app

2011-01-13 Thread Jonathan Lundell
On Jan 13, 2011, at 11:49 AM, Lorin Rivers wrote: That's exactly the kind of user experience I want to avoid. You could put a copy in web2py's site-packages, though it'd have to be the right version for the environment (or at least a compatible version). You could put it in your app's

Re: [web2py] non-string (type list) error in appadmin on GAE

2011-01-13 Thread Jonathan Lundell
On Jan 13, 2011, at 9:45 PM, johntynan wrote: I recently updated my web2py app to version 1.91.6 (along with updating GAE to version 1.4.1) and am now able to export csv files from the appadmin as I had intended. However, now, if I try to view _any_ of the rows within the tables by way of

Re: [web2py] Re: Why the need of return dict() in controller?

2011-01-14 Thread Jonathan Lundell
On Jan 14, 2011, at 1:06 AM, Bob wrote: I see no downsides and seems that Massimo confirmed that. I already tried using return locals() and it works without issues. On 14 Ян, 07:37, pbreit pbreitenb...@gmail.com wrote: Wait, so are you saying that instead of return dict(items=items,

Re: [web2py] country / state / city of the current visitor?

2011-01-14 Thread Jonathan Lundell
On Jan 13, 2011, at 6:23 PM, Bruno Rocha wrote: I fund this useful script: http://eternal-todo.com/var/scripts/geoloc As long as you don't attach to much significance to the result. I use two ISPs; depending on which one I go through, I'm shown in Fresno CA (200 miles away) or simply in the

Re: [web2py] Buttons in forms

2011-01-14 Thread Jonathan Lundell
On Jan 14, 2011, at 7:41 AM, annet wrote: I have a form containing two buttons, one to update data and one to close the window: {{=INPUT(_type='button',_value='Update data',_onclick=URL(r=request,f='update_form',args=[company[0].id]))}} {{=INPUT(_type='button',_value='Close

Re: [web2py] Re: Web2py Most Wanted

2011-01-14 Thread Jonathan Lundell
On Jan 14, 2011, at 10:19 AM, Massimo Di Pierro wrote: +1 One good practice that would help out a lot. When possible, whenever you find or fix a bug in gluon, write a unit test that shows the bug, and *then* fix the bug. On Jan 14, 11:37 am, cjrh caleb.hatti...@gmail.com wrote: On Jan

Re: [web2py] Re: issue with TAG and unicode

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 1:22 AM, carlo wrote: r=TAG['pippo'](u'plutò') str(r) 'pippoplut\xc3\xb2/pippo' r=TAG[u'pippo'](u'plutò') str(r) Traceback (most recent call last): File console, line 1, in module File C:\Python26\web2py\gluon\html.py, line 797, in __str__ return self.xml()

Re: [web2py] request.vars and lists question

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 8:57 AM, rick wrote: I have a simple function: def simpletest(animals): theAnimals = request.vars[animals] leng = len(theAnimals) return dict(leng = leng) When I call it with two animals:

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 1:57 PM, Kenneth Lundström wrote: how do I test the new router that Jonathan has made. I renamed the routes.examples.py to routes.py and edited it. No mather what I write in it gets used. I tried to find the answer in all posts on the mailinglist but no success.

Re: [web2py] Re: issue with TAG and unicode

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 2:00 PM, carlo wrote: Leave the tag itself a plain string. don't you think this is a hard constraint? Personally I do. TAG promised to be such a handy tool to generate XML from Excel data, which is the purpose of my app, but unfortunately this will not be true. I

Re: [web2py] Testing the new router

2011-01-16 Thread Jonathan Lundell
On Jan 16, 2011, at 2:42 PM, Kenneth Lundström wrote: I just added: routers = dict( BASE = dict( domains = { 'economy.nudata.fi' : 'economy', 'testing.nudata.fi' : 'testapplication', } ), ) but if if go to economy.nudata.fi I get to

<    5   6   7   8   9   10   11   12   13   14   >