[web2py:30171] Re: Optimising returning of file content using wsgi.file_wrapper extension.

2009-09-05 Thread Jonathan Lundell
On Sep 5, 2009, at 2:06 PM, Jonathan Lundell wrote: On Sep 5, 2009, at 2:04 PM, Jonathan Lundell wrote: On Sep 5, 2009, at 1:56 PM, mdipierro wrote: Is it ever called with request=None? Apparently; Jose was getting a crash to that effect. It's the declared default

[web2py:30174] Re: Optimising returning of file content using wsgi.file_wrapper extension.

2009-09-05 Thread Jonathan Lundell
, there's one more set of literal errnos in streamer.py. On Sep 5, 4:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 5, 2009, at 2:06 PM, Jonathan Lundell wrote: On Sep 5, 2009, at 2:04 PM, Jonathan Lundell wrote: On Sep 5, 2009, at 1:56 PM, mdipierro wrote: Is it ever called

[web2py:30242] Re: two tables, one form

2009-09-06 Thread Jonathan Lundell
On Sep 6, 2009, at 9:03 AM, weheh wrote: After further consideration, I think that, although the trick: db.table1.field1.readable=db.table1.field1.writable=False does work by adding it to the controller so that it only applies to the current form, in practice this isn't practical in my

[web2py:30494] Re: Web2py startup script for arch linux

2009-09-09 Thread Jonathan Lundell
On Sep 9, 2009, at 12:00 AM, Arvind wrote: when i run the startup script for arch linux provided inside the scripts folder. i keep getting this error. web2py.archlinux.sh: line 13: [: -ne: unary operator expected I have copied this script into the main web2py directory and from there i am

[web2py:30498] Re: Web2py startup script for arch linux

2009-09-09 Thread Jonathan Lundell
I'll be more verbose. Here's what the script appears (to me) to be doing. #!/bin/bash # the script should be run # from WEB2PY root directory prog=`basename $0` This sets $prog to web2py.archlinux.sh cd `pwd` Change directories to the current directory. Huh? chmod +x $prog Make

[web2py:30502] Re: Web2py startup script for arch linux

2009-09-09 Thread Jonathan Lundell
On Sep 9, 2009, at 8:54 AM, Arvind wrote: So, what do we need to run exactly, maybe, I can work on the script and fix it. do we need to execute web2py.py ? is that all ? For the start function, check if web2py.py is running, and don't do anything if it is; otherwise start it. For the

[web2py:30527] Re: Web2py startup script for arch linux

2009-09-09 Thread Jonathan Lundell
On Sep 9, 2009, at 12:00 AM, Arvind wrote: when i run the startup script for arch linux provided inside the scripts folder. i keep getting this error. web2py.archlinux.sh: line 13: [: -ne: unary operator expected I have copied this script into the main web2py directory and from there i am

[web2py:30730] Re: request.args parsing whitespaces

2009-09-11 Thread Jonathan Lundell
On Sep 11, 2009, at 1:16 AM, Richard wrote: I want to make my URLs pretty with /default/record/green apple instead of default/record/42. But the white spaces are being parsed so that request.args[0] comes in as green_apple. I can't do request.args[0].replace('_', ' '), because the original

[web2py:30767] Re: [web2py:/] Explicit use of web2py html generation engine

2009-09-11 Thread Jonathan Lundell
On Sep 11, 2009, at 10:57 AM, V. K wrote: I was looking to use the python shell to generate the final HTML that is rendered in a browser: Let me explain: Normally in web2py: the URL http://www.misite.com/app/default/index; maps to a python function and uses an appropriate view file to

[web2py:30769] Re: Explicit use of web2py html generation engine

2009-09-11 Thread Jonathan Lundell
service)? I'm probably not the person to answer that, partly because I'm a little confused about what you're trying to do. Suppose you invoke something from the shell that creates your document (let's say as a string). Then what? On Sep 11, 12:54 pm, Jonathan Lundell jlund...@pobox.com

[web2py:30833] Re: web2py source download problems in the secured enterprise environment

2009-09-12 Thread Jonathan Lundell
On Sep 12, 2009, at 9:30 AM, Babu wrote: I have noticed, that I not able to successfully download web2py source file in .zip format due to some kind of controls put in our company. Download completes successfully but the resulting file is not unzipable. Would it be possible to provide

[web2py:30835] Re: web2py source download problems in the secured enterprise environment

2009-09-12 Thread Jonathan Lundell
On Sep 12, 2009, at 9:30 AM, Babu wrote: I have noticed, that I not able to successfully download web2py source file in .zip format due to some kind of controls put in our company. Download completes successfully but the resulting file is not unzipable. Would it be possible to provide

[web2py:30991] Re: cookbook unzip error

2009-09-14 Thread Jonathan Lundell
On Sep 14, 2009, at 9:09 AM, mdipierro wrote: Just posted. http://groups.google.com/group/web2py/browse_thread/thread/796b11e9e88f552b Please try again and let me know. FWIW, I just got a good download with SL. On Sep 14, 10:58 am, Wes James compte...@gmail.com wrote: Odd - this

[web2py:31026] Re: some questions for web2py.

2009-09-14 Thread Jonathan Lundell
On Sep 14, 2009, at 4:26 PM, Graham Dumpleton wrote: On Sep 15, 12:14 am, mdipierro mdipie...@cs.depaul.edu wrote: The web2py_manual_cut.pdf is from the second edition. When I downloaded it yesterday and when I downloaded it again just now, it contains mod_wsgi setup example from first

[web2py:31052] Re: tip of the day: icons in menu

2009-09-15 Thread Jonathan Lundell
On Sep 13, 2009, at 11:00 PM, mdipierro wrote: In web2py you create a menu like response.menu=[['Title',False,URL(...),[]] where [] is a submenu. You place an icon close to the title by doing response.menu=[[TAG[''](IMG(_src=icon,'Title'),False,URL(...),[]] where icon is the url

[web2py:31146] Re: ticket tracking

2009-09-16 Thread Jonathan Lundell
On Sep 16, 2009, at 1:18 PM, David Zejda wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I returned to examine the problem more deeply, but now it behaves differently and I do not know why, I do not remember any change, which could cause the change. Now the error_handler

[web2py:31283] Re: Auth customization

2009-09-18 Thread Jonathan Lundell
On Sep 18, 2009, at 1:06 PM, waTR wrote: Related question though... how can one check if password entered matches password stored in DB for that user? When I retrieve the stored password via select(), it is encrypted. How does Auth decrypt? Where can I find that code (what file)? Briefly,

[web2py:31291] Re: Auth customization

2009-09-18 Thread Jonathan Lundell
user = temp_user The values being compared are hashes, because the field in question requires IS_CRYPT(), which really doesn't do anything but hash the value. On Sep 18, 1:34 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 18, 2009, at 1:06 PM, waTR wrote: Related

[web2py:31376] Re: Auth customization

2009-09-20 Thread Jonathan Lundell
of the field. The above code doesn't show that translation... On Sep 18, 5:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 18, 2009, at 4:44 PM, waTR wrote: I need to be able to compare another password submitted against the one in that field. How would I go about doing

[web2py:31377] Re: Auth customization

2009-09-20 Thread Jonathan Lundell
(it wasn't to me when I first read it) how password checking is handled. On Sep 18, 5:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 18, 2009, at 4:44 PM, waTR wrote: I need to be able to compare another password submitted against the one in that field. How would I go about doing

[web2py:31412] Re: Auth customization

2009-09-21 Thread Jonathan Lundell
On Sep 21, 2009, at 12:02 AM, Fran wrote: On Sep 21, 5:13 am, waTR r...@devshell.org wrote: Is it possible to convert the request.vars.get(passfied, '') to the same hash form as you would get from using form() ? Yes: myhash = hmac.new(auth.settings.hmac_key, request.vars.get(passfield,

[web2py:31420] Re: Auth customization

2009-09-21 Thread Jonathan Lundell
-building their forms in web2py using FORM. Well, that's reasonable. But I think it's desirable to use common code for hashing passwords when they're first written to the database and when they're being checked. On Sep 21, 8:06 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 21, 2009

[web2py:31614] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Jonathan Lundell
On Sep 24, 2009, at 7:40 AM, pwoolf wrote: Thanks for the suggestion Yarko. Here is the script attached. A small correction. I'm doubtful that os.system(cd ~/) will work as you expect, since it's going to change the directory in a child process, and not affect the caller's environment (or

[web2py:31616] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-24 Thread Jonathan Lundell
On Sep 24, 2009, at 8:27 AM, Jonathan Lundell wrote: On Sep 24, 2009, at 7:40 AM, pwoolf wrote: Thanks for the suggestion Yarko. Here is the script attached. A small correction. I'm doubtful that os.system(cd ~/) will work as you expect, since it's going to change the directory

[web2py:31703] Re: help from a mac user

2009-09-26 Thread Jonathan Lundell
On Sep 26, 2009, at 12:33 PM, mr.freeze wrote: Can someone with a mac please view this site and tell me what font it defaults to?: http://www.web2pyslices.com/main/default/index It's going to be a function of available fonts, not the browser or system. Macs have Arial and Helvetica, but

[web2py:31708] Re: help from a mac user

2009-09-26 Thread Jonathan Lundell
-family: Segoe UI, Arial, Helvetica, sans-serif; Also, you might want to check your CSS syntax: http://jigsaw.w3.org/css-validator/validator?uri=http://www.web2pyslices.com/main/default/index In particular, // is not a CSS comment delimiter. On Sep 26, 2:51 pm, Jonathan Lundell jlund...@pobox.com

[web2py:31710] Re: help from a mac user

2009-09-26 Thread Jonathan Lundell
26, 3:06 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 26, 2009, at 1:00 PM, mr.freeze wrote: Thanks, a friend was telling me that it was defaulting to Serif. I think he is confused. On general principles, I'd always terminate a font-family spec with a generic family. Instead

[web2py:31712] Re: help from a mac user

2009-09-26 Thread Jonathan Lundell
On Sep 26, 2009, at 1:42 PM, mr.freeze wrote: I fixed them. That site is really handy. Thanks again! It is. It's linked, along with some other useful stuff, from http://www.w3.org/ . On Sep 26, 3:30 pm, Jonathan Lundell jlund...@pobox.com wrote: On Sep 26, 2009, at 1:11 PM, mr.freeze

[web2py:31713] Re: help from a mac user

2009-09-26 Thread Jonathan Lundell
On Sep 26, 2009, at 1:49 PM, Jonathan Lundell wrote: On Sep 26, 2009, at 1:42 PM, mr.freeze wrote: I fixed them. That site is really handy. Thanks again! It is. It's linked, along with some other useful stuff, from http://www.w3.org/ I should have mentioned that I use a couple

[web2py:31763] Re: Potential bugs in auth system.

2009-09-27 Thread Jonathan Lundell
On Sep 27, 2009, at 1:31 PM, mr.freeze wrote: Not sure if it matters but RFC 2142 is from 1997 .RFC 2821 is from 2001. But as a matter of practicality, I would just do like google and make them case insensitive. 2821 is just a requirement that SMTP MTAs preserve mailbox case; web2py

[web2py:31768] Re: IS_EMAIL() validation bug?

2009-09-27 Thread Jonathan Lundell
There's a bug. Massimo, here's a patch with updated test cases. http://lobitos.net/web2py-patches/gluon/validators.py On Sep 27, 2009, at 3:50 PM, Russell wrote: Hi, It seems that email addresses without a user portion (eg, '@whatever.com') will pass IS_EMAIL() validation. Is this the

[web2py:31817] Re: vulnerability discovered and fixed in markdown

2009-09-28 Thread Jonathan Lundell
On Sep 28, 2009, at 2:53 PM, mr.freeze wrote: Can we just replace gluon.contrib.markdown2.py or were there other changes? Trying to avoid an upgrade on my live sites. That seems to be the only change (well, and the version number). On Sep 28, 4:42 pm, Massimo Di Pierro

[web2py:31847] Re: Web2py + Wing IDE + Mac Machine....

2009-09-28 Thread Jonathan Lundell
On Sep 28, 2009, at 6:39 PM, Yannick wrote: Hello mate, Does anyone use Wing IDE on a Mac machine with Web2py installed If yes can you please let me know how you configured Web2py and Wing ??? Because I followed this instruction http://www.wingware.com/doc/howtos/web2py and I got

[web2py:31851] Re: Web2py + Wing IDE + Mac Machine....

2009-09-29 Thread Jonathan Lundell
On Sep 28, 2009, at 6:39 PM, Yannick wrote: Does anyone use Wing IDE on a Mac machine with Web2py installed If yes can you please let me know how you configured Web2py and Wing ??? Because I followed this instruction http://www.wingware.com/doc/howtos/web2py and I got this error

[web2py:31868] Re: Web2py + Wing IDE + Mac Machine....

2009-09-29 Thread Jonathan Lundell
, since they're in the same directory. Try setting a breakpoint at import gluon.import_all and look at sys.path at that point. On Sep 29, 1:21 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 28, 2009, at 6:39 PM, Yannick wrote: Does anyone use Wing IDE on a Mac machine with Web2py

[web2py:31869] Re: selecting part of model to run

2009-09-29 Thread Jonathan Lundell
On Sep 29, 2009, at 7:03 AM, mdipierro wrote: If you still need more speed move the table definitions in a module (not a model) and import it from the model. I would not recommend this to everybody but 93 is a lot. How does that speed things up? (Just curious.)

[web2py:31870] Re: Web2py + Wing IDE + Mac Machine....

2009-09-29 Thread Jonathan Lundell
add gluon to the pythonpath or move it in a folder already in the python path. On Sep 29, 1:21 am, Jonathan Lundell jlund...@pobox.com wrote: On Sep 28, 2009, at 6:39 PM, Yannick wrote: Does anyone use Wing IDE on a Mac machine with Web2py installed If yes can you please let me

[web2py:32155] Re: Input validation

2009-10-03 Thread Jonathan Lundell
On Oct 3, 2009, at 7:50 AM, mdipierro wrote: something like this? def MYVALIDATOR: def __init__(self,error_message): self.error_message=error_message def __call__(self,value): if not re.compile('^([a-zA-Z]*[ ]*[á]*[é]*[í]*[ó]*[ú]*)+ Why not: if not

[web2py:32259] Re: web2py + pyjamas desktop = a desktop framework?

2009-10-05 Thread Jonathan Lundell
On Oct 5, 2009, at 5:02 PM, Álvaro Justen [Turicas] wrote: It depends on how you will distribute your application. My mother uses a system based on web2py and I've created a shell script to: - kill any web2py.py process - start a new web2py.py process - open firefox in

[web2py:32323] Re: URLs in static files

2009-10-06 Thread Jonathan Lundell
On Oct 6, 2009, at 1:35 PM, mdipierro wrote: It is good practice to put in the CSS only relative urls to other static files. That is not a problem with web2py. If you need to include in the CSS urls generated by {{=URL()}} then you should promote the css from a static file to a dynamic

[web2py:32329] Re: URLs in static files

2009-10-06 Thread Jonathan Lundell
, 2:29 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 6, 2009, at 1:35 PM, mdipierro wrote: It is good practice to put in the CSS only relative urls to other static files. That is not a problem with web2py. If you need to include in the CSS urls generated by {{=URL()}} then you

[web2py:32397] Re: URLs in static files

2009-10-07 Thread Jonathan Lundell
there are files. -Eric On Oct 6, 2:29 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 6, 2009, at 1:35 PM, mdipierro wrote: It is good practice to put in the CSS only relative urls to other static files. That is not a problem with web2py. If you need to include in the CSS urls generated

[web2py:32404] Re: URLs in static files

2009-10-07 Thread Jonathan Lundell
recognize that it's got a .css file and create css headers instead. On Oct 7, 8:19 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 6, 2009, at 2:54 PM, Eric Vicenti wrote: Thanks, mdi and Jonathan. I will borrow your __cssheaders() function, if you don't mind. I should have

[web2py:32441] Re: URLs in static files

2009-10-07 Thread Jonathan Lundell
controller solution for CSS files, which is a different issue, but it does eliminate the need for the __cssheaders() function. http://lobitos.net/web2py-patches/gluon/contenttype.py http://lobitos.net/web2py-patches/gluon/main.py Massimo On Oct 7, 10:56 am, Jonathan Lundell jlund

[web2py:32559] Re: web2py wiki

2009-10-09 Thread Jonathan Lundell
On Oct 9, 2009, at 1:22 AM, Joe Barnhart wrote: We could make the wiki even simpler... Get rid of comments on each page. The wiki IS comments it doesn't need additional comments! Get rid of tags. Tags imply we know in advance what the structure of the wiki is. We don't. Instead the

[web2py:32645] Re: stupid question: How to format a table.id in a form ? [ SOLVED ]

2009-10-10 Thread Jonathan Lundell
On Oct 10, 2009, at 1:22 PM, mdipierro wrote: When you post about an issue and the issue is solved and you email a response saying the issue is solved make sure you edit the subject and append [SOLVED]. That is all. Most people, including me, do not use email for posting/reading. We

[web2py:32690] Re: How to Change the css style color and text of submit button on a crud.create form in controller

2009-10-11 Thread Jonathan Lundell
On Oct 11, 2009, at 2:04 PM, mr.freeze wrote: The example I gave was for auth membership. Say you wanted to style the form based on which group they were a member of. You would need a style sheet for each group. Also, what would happen when a new group was created? You could generate

[web2py:32705] Re: hg and google

2009-10-11 Thread Jonathan Lundell
On Oct 11, 2009, at 5:37 PM, mdipierro wrote: It is one of those things that is not technically difficult but would require lots of people to change habits. Starting with me. I am still leaning toward switching but I would like to hear if there is any opposition to this. It does look like

[web2py:32743] Re: security bug in Django, what about web2py?

2009-10-12 Thread Jonathan Lundell
On Oct 12, 2009, at 8:32 AM, carlo wrote: This is the reported bug: http://code.djangoproject.com/changeset/11603 do you think web2py is also affected? I think that regex_url is OK, and I'm semi-sure that the email validator is OK. I'm not so sure about the http url validator.

[web2py:32833] Re: IS_MATCH

2009-10-13 Thread Jonathan Lundell
On Oct 13, 2009, at 7:59 PM, DenesL wrote: Hi Sophie, you want IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$',...) and you can drop IS_NOT_EMPTY(...). The regex above means: match a string composed only of the characters listed from beginning to end with minimum length=1. Yours said: match a

[web2py:32837] Re: IS_MATCH

2009-10-13 Thread Jonathan Lundell
)? Massimo On Oct 13, 10:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 13, 2009, at 7:59 PM, DenesL wrote: Hi Sophie, you want IS_MATCH('^[a-zA-Z áÁéÉíÍóÓúÚ]+$',...) and you can drop IS_NOT_EMPTY(...). The regex above means: match a string composed only of the characters listed

[web2py:32873] Re: Eclipse, json and reaching breaking point

2009-10-14 Thread Jonathan Lundell
On Oct 14, 2009, at 1:05 AM, Carl wrote: replying to this post myself to kick Google Groups to list it! FWIW, your first message showed up yesterday afternoon as web2py: 32811. No replies, though. On Oct 13, 10:47 pm, Carl carl.ro...@gmail.com wrote: hi, I'm using XP, Eclipse,

[web2py:32888] GG search FAIL

2009-10-14 Thread Jonathan Lundell
On Oct 14, 2009, at 1:02 AM, Carl wrote: I've replied to this message as the original (while in my browser history) is not listed by Google Groups. I did a little checking on this, with the following results. 1. I received Carl's original message (yesterday) via email. 2. I found the

[web2py:33017] Re: Case sensitive application name

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

[web2py:33018] Re: Case sensitive application name

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

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

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

[web2py:33084] Re: import static CSS files

2009-10-17 Thread Jonathan Lundell
On Oct 17, 2009, at 11:46 AM, Celso wrote: Hi, I have a html file in the myapp/static directory that I am opening using web2py. I can sucessfully import the javascript content from a subdirectory of myapp/static using relative path, for example, src=./dojoroot/dojo/ dojo.js. But, when I

[web2py:33205] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
On Oct 20, 2009, at 6:33 AM, mdipierro wrote: In trunk now. Please try it. I notice that the int float versions use conflicting interpretations of between: if value == fvalue and self.minimum = value self.maximum: if self.minimum = value = self.maximum:

[web2py:33219] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
On Oct 20, 2009, at 7:49 AM, mdipierro wrote: I agree, fixing in trunk. A (minor) quibble: integer number sounds redundant to me. I'd use whole number, integer value, or simply integer instead. Massimo On Oct 20, 9:43 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 20, 2009

[web2py:33223] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
On Oct 20, 2009, at 10:16 AM, mdipierro wrote: I think integer number is the proper way but I am not a native english speaker. Any english speaker can help us on this? Here's the (Oxford American) dictionary entry: integer |ˈɪntədʒər| noun 1 a whole number; a number that is not a fraction.

[web2py:33225] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
:19 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 20, 2009, at 10:16 AM, mdipierro wrote: I think integer number is the proper way but I am not a native english speaker. Any english speaker can help us on this? Here's the (Oxford American) dictionary entry: integer |ˈɪntədʒər| noun 1

[web2py:33229] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
but to me whole number does not sound good. Anyway, one can use internationalization to fix this. I wish like there are en-en, en-us, there were en-us-tech and en-us-non-tech. (Perhaps I should patent this!) Massimo On Oct 20, 12:38 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 20

[web2py:33247] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
On Oct 20, 2009, at 2:17 PM, mdipierro wrote: OK. I will take the patch. Here's a first cut: http://lobitos.net/web2py-patches/gluon/validators.py This is *not* ready to go; once we agree on the patch, I'll update the doctest strings accordingly. On Oct 20, 3:38 pm, Jonathan Lundell

[web2py:33260] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
On Oct 20, 2009, at 5:24 PM, mdipierro wrote: please email it to me when done. Thanks. Are you OK with the patches? I don't want to do the doctests until they're settled, since the error messages figure in the tests. On Oct 20, 6:42 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct

[web2py:33266] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
, really) is this one: IS_FLOAT_IN_RANGE(1,5)(5.1) (5.0996, 'enter a number between 1.0 and 5.0') Do we care? massimo On Oct 20, 9:25 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 20, 2009, at 5:24 PM, mdipierro wrote: please email it to me when done

[web2py:33279] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-20 Thread Jonathan Lundell
have to to make them thorough, but it'd be nice to have something as a starting point. Massimo On Oct 20, 11:07 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 20, 2009, at 8:32 PM, mdipierro wrote: I am ok with the patch. Perhaps for date and datetime we could also have

[web2py:33340] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-21 Thread Jonathan Lundell
On Oct 21, 2009, at 10:03 AM, Iceberg wrote: It is a little bit surprising and happy to see these error_message draw enough attention. :-) So is it time to also consider my proposal more than one month before? http://groups.google.com/group/web2py/browse_frm/thread/8cbe658406be595f That

[web2py:33607] Re: Web2py concerns

2009-10-24 Thread Jonathan Lundell
On Oct 24, 2009, at 11:08 AM, Thadeus Burgess wrote: My only complaint about the web editor is it is buggy. Every once in a while (like every 5 minutes) it will bug up, and not display the code correctly, hard to explain so heres a screenshot

[web2py:33608] Re: Code Snippets w examples

2009-10-24 Thread Jonathan Lundell
On Oct 24, 2009, at 11:05 AM, znafets wrote: I think Sebastian is right. Being in a similar place I did not manage yet to find out how to create a form with self located fields and styles and attributes. Better said all of the examples I found handle with the default layout of the

[web2py:33861] Re: Google Groups is Dead

2009-10-27 Thread Jonathan Lundell
On Oct 27, 2009, at 4:56 PM, mdipierro wrote: We are 10x smaller so I guess we get 10x less spam. We get about 50-100 spam emails/day. We block the emails used by spammers. We had only one reported case of actual user being spoofed. That did cause some trouble for the user. I am not sure

[web2py:33945] Re: bug in Rows.last()

2009-10-28 Thread Jonathan Lundell
On Oct 28, 2009, at 9:58 AM, mdipierro wrote: On a third thougth. Mr Freeze original names are better (find and filter it is). Your use of 'filter' (or my confusion about it) for both cases illustrates its ambiguity. How about 'find' and 'exclude'? I added slices too. Here is an example:

[web2py:33947] Re: bug in Rows.last()

2009-10-28 Thread Jonathan Lundell
On Oct 28, 2009, at 10:28 AM, mr.freeze wrote: I think you may be right. What about 'remove' instead of filter? Sure. On Oct 28, 12:23 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 28, 2009, at 9:58 AM, mdipierro wrote: On a third thougth. Mr Freeze original names are better

[web2py:34065] Re: Dynamically built Form

2009-10-29 Thread Jonathan Lundell
On Oct 29, 2009, at 8:36 AM, Chris S wrote: lol, well I've been all around that. Thank you so much, works just fine now. Is there a quick 2-min why that works or somewhere you could point me to as to what that * means/does? Apparently I'm missing out on something important. It's a

[web2py:34073] Re: IS_NOT_EMPTY validator.

2009-10-29 Thread Jonathan Lundell
On Oct 29, 2009, at 9:01 AM, mdipierro wrote: I do not disagree. Shall we make is_not_empty strip? If it's going to change, how about (also) an optional argument, defaulting to None, that's a string that counts as empty? I'm thinking of the case in which you put instructions to the user

[web2py:34077] Re: IS_NOT_EMPTY validator.

2009-10-29 Thread Jonathan Lundell
of the change you're suggesting is the same as the one I'm suggesting: IS_EMPTY should match non-empty strings that count as empty. It's syntactic sugar merely, but sweet nonetheless. On Oct 29, 11:18 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 29, 2009, at 9:01 AM, mdipierro wrote

[web2py:34082] Re: IS_NOT_EMPTY validator.

2009-10-29 Thread Jonathan Lundell
On Oct 29, 2009, at 9:57 AM, mdipierro wrote: send me a patch OK. Do you want to strip spaces? White space generally? If so, should IS_NULL_OR do the same? On Oct 29, 11:31 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 29, 2009, at 9:23 AM, mdipierro wrote: You can already

[web2py:34100] Re: IS_NOT_EMPTY validator.

2009-10-29 Thread Jonathan Lundell
confusing. I'll generate a patch that'll let you decide what to keep. On Oct 29, 12:25 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct 29, 2009, at 10:14 AM, Jonathan Lundell wrote: On Oct 29, 2009, at 9:57 AM, mdipierro wrote: send me a patch OK. Do you want to strip spaces

[web2py:34106] Re: IS_NOT_EMPTY validator.

2009-10-29 Thread Jonathan Lundell
. The changes are: * create IS_EMPTY_OR, same as IS_NULL_OR * create a common empty-field test for IS_EMPTY_OR and IS_NOT_EMPTY to share * allow specification of an arbitrary string to be treated as 'empty' * doctests all around On Oct 29, 2:46 pm, Jonathan Lundell jlund...@pobox.com wrote: On Oct

[web2py:34254] web2py update script

2009-10-30 Thread Jonathan Lundell
In case anyone is interested. I use it under OS X, but it ought to work under any unixalike. Put it in (say) update.sh in the same directory as web2py/, and run it to: 1. create a snapshot of your current web2py/, renamed to its web2py version 2. download the new source version 3. unzip it

[web2py:34262] Re: web2py update script

2009-10-30 Thread Jonathan Lundell
On Oct 30, 2009, at 8:44 PM, Thadeus Burgess wrote: I usually just svn update rm -R applications/examples applications/welcome That's cool if you want to update to root; I'm aiming for the release points (with checkpointing). --~--~-~--~~~---~--~~ You

[web2py:34291] Re: web2py update script

2009-10-31 Thread Jonathan Lundell
On Oct 30, 2009, at 8:33 PM, mr.freeze wrote: This is useful. Perhaps worth making a slice? http://www.web2pyslices.com/main/default/user/login?_next=/main/slices/make_slice I can do that. Here's an improved version. It zips the old version instead of copying it, and has cleaner messaging.

[web2py:34679] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 8:52 AM, Thadeus Burgess wrote: Instead of putting a timer on response.flash, I moved its location to another location on the site that does conflict with any text. I like Gmail's approach to flash messages. They're not obtrusive, but they're still prominent enough to be

[web2py:34686] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
On Nov 5, 2009, at 12:41 PM, Russell wrote: It does seem that a nice solution would be to position or shrink the flash message on the default layout so that it is unlikely to cover text. But it maybe we are trying to do too much with the flash message? There are some messages that only

[web2py:34701] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
, with this method, does the div end up getting escaped? On Nov 5, 3:13 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2009, at 12:41 PM, Russell wrote: It does seem that a nice solution would be to position or shrink the flash message on the default layout so that it is unlikely

[web2py:34704] Re: Does your Response Flash get in the way?

2009-11-05 Thread Jonathan Lundell
: div.flash table.error { ... } Thanks. On Nov 5, 9:28 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2009, at 1:39 PM, mdipierro wrote: well, you can do response.flash=DIV(message,_class=error) and handle both class flash and class error via css. That works fine if your flash html

[web2py:34883] Re: Charsets and Includes. Or why do my accented words get screwed in includes.

2009-11-08 Thread Jonathan Lundell
On Nov 8, 2009, at 7:33 AM, Benigno wrote: I didnt explain myself correctly. I am setting the meta http- equiv=Content-Type content=text/html; charset=iso-8859-1 / dinamically when in spanish. However, the accented words still show badly. The character set specified by the http header

[web2py:35055] Re: Using web2py with jython

2009-11-10 Thread Jonathan Lundell
On Nov 10, 2009, at 12:55 PM, Timbo wrote: Massimo, I'm trying to rewrite template.py for Jython and I can't seem to figure out what the re_strings regex is doing. I wrote a routine for what I thought it was doing and that puts \n all over my pages. So I took it out entirely and

[web2py:35090] Re: floating imprecision

2009-11-11 Thread Jonathan Lundell
On Nov 10, 2009, at 11:49 PM, Richard wrote: I have some floating point numbers in my database which I need to test for equality. Numbers like 0.3 are failing an equality test. So, is there a way to store floating point numbers precisely? Or should I be using something like: offset =

[web2py:35091] Re: borken IPV4 validator?

2009-11-11 Thread Jonathan Lundell
On Nov 11, 2009, at 2:32 AM, Frederik Wagner wrote: I already filed it as a bug some days ago, but should have ask here before. Could it be, that the IS_IPV4 provider validates erroneous IPv4's? Reproduction in the shell: 1. type: a=IS_IPV4() 2. type e.g.: a('123.123') which gives a

[web2py:35092] Re: New features not documented in book 2 ed.

2009-11-11 Thread Jonathan Lundell
Thank you for this. A suggestion: perhaps the 2ed errata page could have both errata and additions? On Nov 11, 2009, at 3:32 AM, DenesL wrote: New features not documented in book 2 ed. = 1.72.1 * Alias for id field allows to redefine the name

[web2py:35097] Re: New features not documented in book 2 ed.

2009-11-11 Thread Jonathan Lundell
On Nov 11, 2009, at 9:04 AM, DenesL wrote: You are welcome. Is all the errata in one place? any volunteers otherwise?. http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book Why have them together (errata additions)? Perhaps not on the same page, but parallel, and linked. I was

[web2py:35108] Re: New features not documented in book 2 ed.

2009-11-11 Thread Jonathan Lundell
On Nov 11, 2009, at 10:01 AM, DenesL wrote: On Nov 11, 12:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 11, 2009, at 9:04 AM, DenesL wrote: You are welcome. Is all the errata in one place? any volunteers otherwise?. http://wiki.web2py.com

[web2py:35312] Re: decimal type in web2py

2009-11-13 Thread Jonathan Lundell
On Nov 13, 2009, at 4:09 PM, mdipierro wrote: On a second thought. The problem is not the rounding. If we use float internally we do not have the precision of 1c in $1billion. Float has 53 bits, no? On Nov 13, 5:10 pm, villas villa...@gmail.com wrote: On Nov 13, 9:59 pm, mdipierro

[web2py:35319] Re: decimal type in web2py

2009-11-13 Thread Jonathan Lundell
On Nov 13, 2009, at 4:36 PM, Massimo Di Pierro wrote: In theory double has 53 bits. Yet I tried and it does not seem to work properly. It rounds to the cents. You may want to try the attached files. Perhaps I am doing something wrong. What are you expecting to see?

[web2py:35320] Re: decimal type in web2py

2009-11-13 Thread Jonathan Lundell
On Nov 13, 2009, at 5:12 PM, Jonathan Lundell wrote: On Nov 13, 2009, at 4:36 PM, Massimo Di Pierro wrote: In theory double has 53 bits. Yet I tried and it does not seem to work properly. It rounds to the cents. You may want to try the attached files. Perhaps I am doing something

[web2py:35323] Re: decimal type in web2py

2009-11-13 Thread Jonathan Lundell
On Nov 13, 2009, at 4:36 PM, Massimo Di Pierro wrote: In theory double has 53 bits. Yet I tried and it does not seem to work properly. It rounds to the cents. You may want to try the attached files. Perhaps I am doing something wrong. I'm not advocating floating point; I think it's a

[web2py:35340] Re: decimal type in web2py

2009-11-14 Thread Jonathan Lundell
into this the more I think we should not support it if the database does not support it. Perhaps the string conversion should use a formatted string, with the precision of the database field. Massimo On Nov 13, 9:27 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 13, 2009, at 4:36 PM

[web2py:35975] Re: different password reset process

2009-11-24 Thread Jonathan Lundell
On Nov 24, 2009, at 9:14 PM, Wes James wrote: I've been working on an app that has this type of password reset: 1. click on password reset 2. user types in email address 3. the user gets an email that has a link that takes them back to the web2py site 4. a new password is typed in and

[web2py:36130] doctesting routes.py

2009-11-28 Thread Jonathan Lundell
I've implemented a doctest for routes.py. The idea is to modify the doctest as required to verify that your routes.py is doing what you expect. Massimo has the patch, but in the meantime (he's busy) feedback would be useful. Post it here, or send me a note. You'll need to replace

Re: [web2py:36131] doctesting routes.py

2009-11-28 Thread Jonathan Lundell
On Nov 28, 2009, at 4:54 PM, Jonathan Lundell wrote: I've implemented a doctest for routes.py. The idea is to modify the doctest as required to verify that your routes.py is doing what you expect. Massimo has the patch, but in the meantime (he's busy) feedback would be useful. Post it here

<    7   8   9   10   11   12   13   14   15   16   >