[web2py] removing admin vs cron

2010-03-18 Thread Jonathan Lundell
When I completely remove admin, cron crashes: File /opt/vtc/vpepmanage/web2py/web2py.py, line 20, in module gluon.widget.start(cron=True) File /opt/vtc/vpepmanage/web2py/gluon/widget.py, line 732, in start cron = contrib.cron.hardcron() File

[web2py] administratively adding a user

2010-03-18 Thread Jonathan Lundell
I have an app in which a (prepopulated) administrative user adds other users, and assigned them one of three predefined roles. So is the right thing to do to bypass SQLFORM, use my own Form, and call Auth to do the housekeeping? Likewise updating a user (name/email/password changes, role

Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 7:27 AM, Thadeus Burgess wrote: CSS does not suck, your just doing it wrong! Massimo, I have done this layout that you want many many times in css, without a framework, ez-css makes this even easier. The author of ez-css is refreshingly candid, at least by implication,

Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 8:46 AM, Thadeus Burgess wrote: Its really not hard, and the box model is not that bad, its just confusing and most don't know how to use it properly. That's not a good sign.

Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 11:18 AM, Thadeus Burgess wrote: Maybe the next version of CSS... but as long as IE is around, growth of web standards will always be stunted. Not CSS3, anyway. I'm doubtful anyway, since CSS is so heavily embedded in browsers. I think we're stuck with the basic model.

[web2py] usern...@localhost

2010-03-19 Thread Jonathan Lundell
I think IS_EMAIL should permit @localhost. Anybody disagree? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

Re: [web2py] Re: usern...@localhost

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 4:30 PM, Yarko Tymciurak wrote: On Mar 19, 6:02 pm, Jonathan Lundell jlund...@pobox.com wrote: I think IS_EMAIL should permit @localhost. Anybody disagree? I can see your motivation (development), but do you need that? Would you also allow u...@127.0.0.1? or u

Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-20 Thread Jonathan Lundell
On Mar 20, 2010, at 9:58 AM, Timothy Farrell wrote: Vasile Ermicioi, put in a vote for Rocket to be included in web2py because I'm in the web2py community and there is still plenty of room for Rocket to be optimized (which I noted). I like the idea of built-in servers as plugins (not

Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-22 Thread Jonathan Lundell
. I'm thinking mainly of an overlapped transition. Short or Tall? Caf or Decaf? Sugar? Milk? (steamed?) Cinnamon? For here or To-go? How would you like your web2py today? On 3/20/2010 12:39 PM, Jonathan Lundell wrote: On Mar 20, 2010, at 9:58 AM, Timothy Farrell wrote: Vasile

Re: [web2py] Re: removing admin vs cron

2010-03-22 Thread Jonathan Lundell
On Mar 18, 2010, at 3:40 PM, mdipierro wrote: It is a bug. What's the fix? Massimo On Mar 18, 3:07 pm, Jonathan Lundell jlund...@pobox.com wrote: When I completely remove admin, cron crashes: File /opt/vtc/vpepmanage/web2py/web2py.py, line 20, in module gluon.widget.start(cron

Re: [web2py] Re: removing admin vs cron

2010-03-22 Thread Jonathan Lundell
On Mar 22, 2010, at 7:39 AM, mdipierro wrote: I think this was fixed some time ago. gluon/contrib/cron.py is no longer used in web2py 1.76.5. OK; that system was running 1.76.3. I'll try again. Massimo On Mar 22, 9:30 am, Jonathan Lundell jlund...@pobox.com wrote: On Mar 18, 2010, at 3

[web2py] proposal: change SQLFORM delete checkbox handling

2010-03-22 Thread Jonathan Lundell
At the moment, there's a delete-confirmation checkbox that's turned on when an SQLFORM is 'deletable'. It's a simple checkbox with class='delete', along with this bit of code in web2py_ajax.html: jQuery(input[type='checkbox'].delete).each(function(){jQuery(this).click(function() {

[web2py] proposal: admin-less ticket support

2010-03-22 Thread Jonathan Lundell
If I get rid of the admin application, there's no UI for tickets. They're available in the file system, but that's it. It's not too hard to access tickets through an application, but it requires a little reverse engineering of admin's logic. My proposal is to provide a couple of helper

Re: [web2py] Re: Survey: Functionality of the Drop Boxes widget

2010-03-22 Thread Jonathan Lundell
On Mar 22, 2010, at 10:16 PM, Thadeus Burgess wrote: Just an update: The current functionality is set at zero= for web2py. This survey will only serve as a consulting referendum, it does not mean that the end result will be the same. Current Number of responses: 5 (we really need more!

Re: [web2py] href not being rendered

2010-03-23 Thread Jonathan Lundell
On Mar 23, 2010, at 1:32 AM, annet wrote: In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijf])}} target=_blankView it in your browser/a/p When I send the mail and

Re: [web2py] Re: proposal: admin-less ticket support

2010-03-23 Thread Jonathan Lundell
reasons there will be no admin application, and likely no external access to the server. So I need a way for a local sysadmin to collect tickets to send back to the mother ship. On Mar 23, 6:07 am, Jonathan Lundell jlund...@pobox.com wrote: If I get rid of the admin application, there's

Re: [web2py] Re: href not being rendered

2010-03-23 Thread Jonathan Lundell
), then it's being encoded. On Mar 23, 9:16 am, Jonathan Lundell jlund...@pobox.com wrote: On Mar 23, 2010, at 1:32 AM, annet wrote: In a send_mail.html view I have a link which reads like: pHaving trouble viewing this email? a href={{=URL(r=request,c='clublocatormail',f

[web2py] using syslog from a web2py app

2010-03-23 Thread Jonathan Lundell
I'd like to use syslog http://docs.python.org/library/syslog.html from my app. However, it's a .so on my system, so I can't see what it is and how it works, exactly. So my question is: If I open syslog and use it, and don't close it, will it get closed when my controller exits and the object

[web2py] mixing widgets and validators

2010-03-24 Thread Jonathan Lundell
I find myself a little confused on this issue. How do I get a Field to display as a text field, but validate like IS_IN_SET? (I've got a set that's too big for a drop-down.) And how does IS_IN_SET cause a field to become a drop-down box? By virtue of having an options method? -- You received

Re: [web2py] Re: Cleanup sessions

2010-03-27 Thread Jonathan Lundell
On Mar 27, 2010, at 9:15 PM, mdipierro wrote: If you install a new web2py app and, before you start web2py, you run your line below, then start web2py, welcome.w2p will package your cron task. All apps created after that will have it. Though the way it's written, it depends on keeping

Re: [web2py] Re: googling web2py

2010-03-28 Thread Jonathan Lundell
On Mar 28, 2010, at 10:51 AM, mdipierro wrote: It seems to be a two state system (~100K vs ~600K). I wonder what triggers one state vs the other. I do not see a pattern. From the US, a search for web2py gives me 712,000 results, while +web2py or web2py gives 109,000. Unfortunately, Google

Re: [web2py] Re: googling web2py

2010-03-28 Thread Jonathan Lundell
On Mar 28, 2010, at 11:28 AM, Jonathan Lundell wrote: On Mar 28, 2010, at 10:51 AM, mdipierro wrote: It seems to be a two state system (~100K vs ~600K). I wonder what triggers one state vs the other. I do not see a pattern. From the US, a search for web2py gives me 712,000 results, while

Re: [web2py] Re: googling web2py

2010-03-28 Thread Jonathan Lundell
On Mar 28, 2010, at 11:28 AM, Jonathan Lundell wrote: On Mar 28, 2010, at 10:51 AM, mdipierro wrote: It seems to be a two state system (~100K vs ~600K). I wonder what triggers one state vs the other. I do not see a pattern. From the US, a search for web2py gives me 712,000 results, while

Re: [web2py] Re: where is this coming from?

2010-04-01 Thread Jonathan Lundell
On Apr 1, 2010, at 6:18 AM, mdipierro wrote: applications/admin/cron/crontab The message itself, I mean. It's showing up on my console, and I can't find the source. On Apr 1, 12:37 am, Jonathan Lundell jlund...@pobox.com wrote: Wed Mar 31 16:10:00 2010 hard CRON RUNNING ['/opt/local

[web2py] editarea plugin lacks OS X Intel support

2010-04-01 Thread Jonathan Lundell
...or so I gather from my console log: 3/31/10 10:42:41 PM mdworker[18101] (Warning) Import: /.../web2py/applications/admin/static/edit_area/edit_area_full_with_plugins.gz could not be imported; Only a PPC importer plug-in was found. -- You received this message because you are subscribed

Re: [web2py] Re: where is this coming from?

2010-04-01 Thread Jonathan Lundell
it's coming from the call Service::log(), which calls which calls servicemanager.LogInfoMsg() Try setting a breakpoint there, and see if this stuff shows up in the msg param or log() Cheers, - Yarko On Apr 1, 9:39 am, Jonathan Lundell jlund...@pobox.com wrote: On Apr 1, 2010, at 6:18 AM

[web2py] web2py book and softcron

2010-04-01 Thread Jonathan Lundell
Section 4.17 (cron) mentions hard vs soft cron defaults, but doesn't say how to override them. Section 4.1 (cli) doesn't list --softcron The startup message for soft cron says: 'Using softcron (but this is not very efficient)' In what sense not efficient? I understand that the timing is less

Re: [web2py] Re: web2py book and softcron

2010-04-01 Thread Jonathan Lundell
... Perhaps we could change (or eliminate) the wording. How about simply 'Using softcron'? I'm curious: what is the extra overhead of soft vs hard cron? Just that it does a test on each page access? I'm guessing that's pretty cheap. On Apr 1, 5:40 pm, Jonathan Lundell jlund...@pobox.com

Re: [web2py] Re: web2py book and softcron

2010-04-01 Thread Jonathan Lundell
is invoked, at the end of a request, if we're running in litecron mode, process only the crontab file for the current app, and run the cron tasks more or less as if they were models (that is, exec in environment). On Apr 1, 7:51 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 1, 2010, at 10

Re: [web2py] Re: web2py book and softcron

2010-04-02 Thread Jonathan Lundell
, Jonathan Lundell jlund...@pobox.com wrote: Section 4.17 (cron) mentions hard vs soft cron defaults, but doesn't say how to override them. Section 4.1 (cli) doesn't list --softcron The startup message for soft cron says: 'Using softcron (but this is not very efficient)' In what sense

Re: [web2py] Re: Field validation interaction

2010-04-02 Thread Jonathan Lundell
On Apr 2, 10:32 am, Jonathan Lundell jlund...@pobox.com wrote: I think I've seen an answer to this one, but I can't find it. I've got a form with two Field's, both IS_IPV4(). The validation I'm after is that one or both must be present; the only invalid case is both of them null. How do I

Re: [web2py] Re: where is this coming from?

2010-04-02 Thread Jonathan Lundell
(), datetime.datetime.now())) should it be .warn instead of .info? Maybe, but I think my message must have been from the old cron, because it didn't say WEB2PY. I'm going to abandon cron and do my session expirations from a model. On Apr 1, 11:06 am, Jonathan Lundell jlund...@pobox.com wrote: On Apr 1, 2010

Re: [web2py] Re: web2py book and softcron

2010-04-02 Thread Jonathan Lundell
about trivial tasks, but if you don't need cron functionality for anything but trivial tasks On Apr 2, 4:14 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 2, 2010, at 12:25 PM, AchipA wrote: There was talk about this a few months back, and I even have a dev branch that does

Re: [web2py] Re: Field validation interaction

2010-04-02 Thread Jonathan Lundell
situation where you want to do some combinatorial logic, or external checking: form.accepts( ..., dbio=False)... Good question, Jonathan! :-) - Yarko On Apr 2, 10:32 am, Jonathan Lundell jlund...@pobox.com wrote: I think I've seen an answer to this one, but I can't find it. I've got

Re: [web2py] Re: args problem in 1.76.5

2010-04-04 Thread Jonathan Lundell
On Apr 4, 2010, at 4:37 PM, DenesL wrote: It should be noted that there was some work done towards enabling an alternate setting that would allow the developer access to the unchanged (raw) args but it has not been finished yet. This would allow any character set in args which I believe

Re: [web2py] Re: args problem in 1.76.5

2010-04-05 Thread Jonathan Lundell
that encodes a question mark in args. All I was saying above is that the new logic solves a subset of problems, including spaces in args. It's definitely not a complete solution. On Apr 4, 6:55 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 4, 2010, at 4:37 PM, DenesL wrote

[web2py] new session

2010-04-05 Thread Jonathan Lundell
I'd have thought that if I log out and then log back in I'd get a new session. But apparently not. Is there a reason to do it one way vs the other? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
On Apr 7, 2010, at 7:14 AM, mdipierro wrote: Some people have reported problems with Jython due to a bug in Java regex. I tried Jython2.5rc2 and it worked for me. Let us know. One or two of the regex patches a while back (URL checking IIRC) was aimed at preventing excessive backtracking under

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
that's causing the problem? On Apr 7, 4:16 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 7, 2010, at 7:14 AM, mdipierro wrote: Some people have reported problems with Jython due to a bug in Java regex. I tried Jython2.5rc2 and it worked for me. Let us know. One or two of the regex

[web2py] submit record row col3

2010-04-07 Thread Jonathan Lundell
OK, I'm feeling too lazy to look this up, and I'm hoping someone will just tell me. How do I inject text into the col3 TD of the submit_record_row of an SQLFORM? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
On Apr 7, 2010, at 12:44 PM, John Cobo wrote: I have not written any regular expressions. So far I am just trying to run the web2py welcome app. The only reg. exp. is what creates the welcome page view. No traceback? Thanks. On 7 Apr 2010 19:29, Jonathan Lundell jlund...@pobox.com

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
in Java (not even Jython) but it officially has WONT-FIX status with Sun. On 4/7/2010 3:34 PM, Jonathan Lundell wrote: On Apr 7, 2010, at 12:44 PM, John Cobo wrote: I have not written any regular expressions. So far I am just trying to run the web2py welcome app. The only reg. exp

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
to update it, since template.py has changed since I sent it last time. A problem is that we don't have a good test case. The unit test doesn't have any embedded newlines, which is what re_strings is all about. Back in a minute. On Apr 7, 7:43 pm, Jonathan Lundell jlund...@pobox.com wrote

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
On Apr 7, 2010, at 6:40 PM, Jonathan Lundell wrote: On Apr 7, 2010, at 6:33 PM, mdipierro wrote: Do you still have the patch. I remember applying one patch from you and rejecting one that I thought would break certain expressions. If you resend it I will double check. You applied

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-07 Thread Jonathan Lundell
On Apr 7, 2010, at 6:48 PM, Jonathan Lundell wrote: On Apr 7, 2010, at 6:40 PM, Jonathan Lundell wrote: On Apr 7, 2010, at 6:33 PM, mdipierro wrote: Do you still have the patch. I remember applying one patch from you and rejecting one that I thought would break certain expressions

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread Jonathan Lundell
On Apr 7, 2010, at 9:55 AM, JC11 wrote: I am getting the dreaded error: RuntimeError: maximum recursion depth exceeded I am using web2py vsn. 1.76.5, jython version 2.5.1 on Windows XP. I have altered the web2py 'welcome' application defaault controller to: return 'Hello World'

[web2py] web2py URLs

2010-04-08 Thread Jonathan Lundell
(Context: I've been working on URL parsing.) One of the difficulties that parsing web2py URLs presents is that the boundary between /a/c/f and args isn't explicit, along with the fact that pieces of /a/c/f can be implied (in particular when routes.py is being used). RFC2396 (1998) introduced

Re: [web2py] Re: web2py URLs

2010-04-08 Thread Jonathan Lundell
, 11:25 am, Jonathan Lundell jlund...@pobox.com wrote: (Context: I've been working on URL parsing.) One of the difficulties that parsing web2py URLs presents is that the boundary between /a/c/f and args isn't explicit, along with the fact that pieces of /a/c/f can be implied (in particular

Re: [web2py] Re: How to install and run web2py on Jython ?

2010-04-08 Thread Jonathan Lundell
On Apr 8, 2010, at 9:53 AM, John Cobo wrote: Jonathan, Your new template.py solves the problem ! Super. Thanks a lot. John C. Thanks for testing it. Massimo, if you decide to incorporate the patch, I'd like to add some comments to it. Even though I wrote the new pattern a few months

Re: [web2py] Re: web2py URLs

2010-04-09 Thread Jonathan Lundell
to routes_in on both with ; and without ;. This is because my blog is indexed on google, and I want my old links to still work If I moved over to the ; method. -Thadeus On Thu, Apr 8, 2010 at 11:56 AM, Jonathan Lundell jlund...@pobox.com wrote: On Apr 8, 2010, at 9:37 AM, Thadeus Burgess

Re: [web2py] Re: web2py URLs

2010-04-09 Thread Jonathan Lundell
;. This is because my blog is indexed on google, and I want my old links to still work If I moved over to the ; method. -Thadeus On Thu, Apr 8, 2010 at 11:56 AM, Jonathan Lundell jlund...@pobox.com wrote: On Apr 8, 2010, at 9:37 AM, Thadeus Burgess wrote: How will we be able to configure to use one

Re: [web2py] Re: web2py URLs

2010-04-09 Thread Jonathan Lundell
On Apr 9, 2010, at 8:25 AM, Thadeus Burgess wrote: Just as long as its a variable we have to flag on, and web2py continues to work like it always has :) That's the plan. -Thadeus On Fri, Apr 9, 2010 at 10:17 AM, Jonathan Lundell jlund...@pobox.com wrote: On Apr 9, 2010, at 6:16

Re: [web2py] html5

2010-04-12 Thread Jonathan Lundell
On Apr 12, 2010, at 9:59 AM, mdipierro wrote: should we replace in welcome !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd with !DOCTYPE html pros? cons? HTML5 is still a draft, not a standard. Validation tools

Re: [web2py] Re: html5

2010-04-12 Thread Jonathan Lundell
://www.google.com On Apr 12, 12:10 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 12, 2010, at 9:59 AM, mdipierro wrote: should we replace in welcome !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd with !DOCTYPE html

Re: [web2py] model files can not end with a comment

2010-04-12 Thread Jonathan Lundell
On Apr 12, 2010, at 11:52 AM, DenesL wrote: In 1.76.3, and probably others, model files can not end with a comment line: Traceback (most recent call last): File D:\web2py\hg\gluon\restricted.py, line 171, in restricted ccode = compile(code.replace('\r\n', '\n'), layer, 'exec') File

Re: [web2py] Re: model files can not end with a comment

2010-04-12 Thread Jonathan Lundell
On Apr 12, 2010, at 12:39 PM, Jonathan Lundell wrote: On Apr 12, 2010, at 12:17 PM, Yarko Tymciurak wrote: On Apr 12, 2:15 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 12, 2010, at 11:52 AM, DenesL wrote: In 1.76.3, and probably others, model files can not end with a comment

Re: [web2py] Re: model files can not end with a comment

2010-04-12 Thread Jonathan Lundell
On Apr 12, 2010, at 4:25 PM, Yarko Tymciurak wrote: Ok - not sure why I was not able to reproduce before: I put a breakpoint on line 179 of restricted, and sure enough code, when it had no ending newline, would cause an error. This seems like it is a bug with the builtin, compile() ...

Re: [web2py] Re: model files can not end with a comment

2010-04-13 Thread Jonathan Lundell
that was. I do not see a problem with stripping and adding a \n. Massimo On Apr 12, 10:33 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Apr 12, 6:36 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 12, 2010, at 4:25 PM, Yarko Tymciurak wrote: Ok - not sure why I was not able

Re: [web2py] request.vars convenience

2010-04-15 Thread Jonathan Lundell
On Apr 15, 2010, at 3:05 AM, Mladen Milankovic wrote: q = request.vars.get('q', None) You can put anything instead of None. It's like a default value. Or just q = request.vars.get('q'), since None is the default. This is standard dictionary behavior in Python. It and setdefault are

Re: [web2py] Re: r1812 breaks winservice.py

2010-04-15 Thread Jonathan Lundell
On Apr 15, 2010, at 6:50 AM, mdipierro wrote: I think it is not fixed. Please check. Thanks. Or now fixed, as the case may be. On Apr 15, 3:13 am, Fran francisb...@googlemail.com wrote: In Bzr revision 1813 onwards, Web2Py no longer works as a Win32 service: Traceback (most recent call

[web2py] error compiling app

2010-04-16 Thread Jonathan Lundell
I have several questions regarding app compiles, but the first one is this: Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Traceback (most recent call last): File /Users/jlundell/VTC/vpeps-web2py/web2py/gluon/restricted.py, line 173, in restricted exec

[web2py] compiling apps and reporting errors

2010-04-16 Thread Jonathan Lundell
In admin/default, we have: def compile_app(): c = app_compile(request.args[0], request) if c: session.flash = T('application compiled') else: import traceback tb = traceback.format_exc() session.flash = DIV(T('Cannot compile: there are errors in your

Re: [web2py] error compiling app

2010-04-16 Thread Jonathan Lundell
On Apr 16, 2010, at 2:11 PM, Jonathan Lundell wrote: I have several questions regarding app compiles, but the first one is this: Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Traceback (most recent call last): File /Users/jlundell

[web2py] compiling an app externally

2010-04-16 Thread Jonathan Lundell
Can I invoke the compile-app functionality from the command line (non-interactively) in order to compile an app as part of an external make? -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Re: [web2py] Re: error compiling app

2010-04-16 Thread Jonathan Lundell
}}, what? Can I do: {{layout = request.layout}} {{extend layout}} ? Note that {{extend request.layout}} works fine in normal operation. It only breaks when I try to compile the app, because request isn't defined for the eval(). On Apr 16, 5:24 pm, Jonathan Lundell jlund...@pobox.com wrote

Re: [web2py] Re: compiling apps and reporting errors

2010-04-17 Thread Jonathan Lundell
to the logic, I'd return None instead of False in the normal case, for aesthetic reasons. Massimo On Apr 16, 4:15 pm, Jonathan Lundell jlund...@pobox.com wrote: In admin/default, we have: def compile_app(): c = app_compile(request.args[0], request) if c: session.flash = T

Re: [web2py] Re: error compiling app

2010-04-17 Thread Jonathan Lundell
a little more explicit? Otherwise it's a little confusing for code that works normally to crash a compile. Massimo On Apr 16, 8:09 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 16, 2010, at 5:13 PM, mdipierro wrote: Not quite. {{extend name}} without quote is supported by name has

Re: [web2py] what do you make of this?

2010-04-18 Thread Jonathan Lundell
On Apr 18, 2010, at 5:07 PM, mdipierro wrote: http://twitter.com/idlecool/status/12408675362 You never know, but it seems doubtful, especially since the pdf came from Keynote. Bitdefender has had problems with false positives in the past. -- Subscription settings:

Re: [web2py] what do you make of this?

2010-04-18 Thread Jonathan Lundell
On Apr 18, 2010, at 5:07 PM, mdipierro wrote: http://twitter.com/idlecool/status/12408675362 Speaking of viruses in PDFs, I hope that everyone on this list using Acrobat or Adobe Reader knows to disable JavaScript. It's of little to no use in PDFs (except for some interactive forms, I think),

Re: [web2py] creating links to '#blah'

2010-04-19 Thread Jonathan Lundell
On Apr 19, 2010, at 5:38 AM, G. Clifford Williams wrote: I'm trying to figure out how to get links created in web2py that point to an anchor name here is the code I'm using: {{=DIV(SPAN(gripe.created_on, _class='gripe-date'), A(SPAN(SPAN('Comments:'),

[web2py] a bug of sorts in app installation

2010-04-19 Thread Jonathan Lundell
I've been trying to install an app through admin, and it's been failing. (Problem #1: there's no feedback at all when this happens, just a message that the install failed; I had to run a debugger to find out why.) It turned out that fix_newlines was raising an exception because it was trying

[web2py] another compilation question

2010-04-19 Thread Jonathan Lundell
When I compile an app, and the install it, it appears that controllers show up twice: once in controllers/ as one .pyc per controller file, and again in compiled/, this time once per function. What's going on, and how are these files used? Also, the manual says: Because views can extend and

Re: [web2py] Re: another compilation question

2010-04-19 Thread Jonathan Lundell
, 'compiled/') Should the '/' really be part of the call? It sort of defeats the purpose of os.path.join. On Apr 19, 4:54 pm, Jonathan Lundell jlund...@pobox.com wrote: When I compile an app, and the install it, it appears that controllers show up twice: once in controllers/ as one .pyc per

Re: [web2py] Re: another compilation question

2010-04-19 Thread Jonathan Lundell
On Apr 19, 2010, at 5:05 PM, mdipierro wrote: Why does the compiled version include the .pyc files in controllers/ (outside of compiled/)? It doesn't seem like those get used, at least not by run_controller_in. I think you refer to line 298 of compileapp.py. I do not recall why it is

Re: [web2py] Re: another compilation question

2010-04-19 Thread Jonathan Lundell
On Apr 19, 2010, at 6:16 PM, mdipierro wrote: I tried remove it and I an error in listdir. Odd, since listdir starts out with: if path[-1:] != '/': path = path + '/' Which one did you remove that caused the error? Massimo On Apr 19, 7:22 pm, Jonathan Lundell jlund

[web2py] Re: a bug of sorts in app installation

2010-04-19 Thread Jonathan Lundell
As a halfway fix, how about the patch below? On Apr 19, 2010, at 2:48 PM, Jonathan Lundell wrote: I've been trying to install an app through admin, and it's been failing. (Problem #1: there's no feedback at all when this happens, just a message that the install failed; I had to run

Re: [web2py] Re: Auto Creating Users/Groups/Roles

2010-04-21 Thread Jonathan Lundell
On Apr 21, 2010, at 7:09 PM, mdipierro wrote: NO. You cannot use password=IS_CRYPT()(passwd)[0]) You must use password=db.auth_user.password.requires[0](passwd)[0]) the reason is that IS_CRYPT() by default uses MD5 while if you pass a key IS_CRYPT(key='sha521:blabla') is uses better

Re: [web2py] Re: Auto Creating Users/Groups/Roles

2010-04-22 Thread Jonathan Lundell
On Apr 22, 2010, at 7:55 AM, Patrick wrote: On Apr 21, 10:09 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 21, 2010, at 7:09 PM, mdipierro wrote: NO. You cannot use password=IS_CRYPT()(passwd)[0]) You must use password=db.auth_user.password.requires[0](passwd)[0

Re: [web2py] Re: Auto Creating Users/Groups/Roles

2010-04-22 Thread Jonathan Lundell
On Apr 22, 2010, at 9:32 AM, Patrick wrote: I'm sorry your solution *does* work, I misread it in the reply, the formatting got off and I was treating it like a separate variable. So it works! When you first start web2py the user gets created (and every time the user gets deleted as well. I'll

Re: [web2py] IS_INT_IN_RANGE

2010-04-22 Thread Jonathan Lundell
On Apr 22, 2010, at 4:28 PM, dave wrote: When using validator IS_INT_IN_RANGE(1900,2100) and a value of 2100 is entered an error message of 'enter an integer between 1900 and 2099' is displayed. A value of 1900 is accepted. It's using the Python notion of a range,

Re: [web2py] is there or hot to create an 'IS_ALPHA' validator

2010-04-22 Thread Jonathan Lundell
On Apr 22, 2010, at 4:56 PM, dave wrote: I'm interested in only there letters 'a..z' and 'A..z'. I'm sure its easy with regx, but I'm looking to see how such would be defined it it was native to web2y. I'm a database/batch guy, but this framework makes it look like I know what I'm doing

Re: [web2py] Re: routes question

2010-04-25 Thread Jonathan Lundell
On Apr 25, 2010, at 8:51 AM, Vasile Ermicioi wrote: worked, thank you! need something like this routes_in = ( ('(.*):https?://(.*)site1\.com:(.*)/(.*)', '/site1/$4), ('(.*):https?://(.*)site2\.com:(.*)/(.*)', '/site2/$4'), ) At the very least, you might want something like this:

Re: [web2py] Re: SEO

2010-04-26 Thread Jonathan Lundell
On Apr 26, 2010, at 9:01 AM, mdmcginn wrote: To add to what Massimo said, make sure each page has a unique title and meta-description. Search engines don't like websites where every page appears to be identical. Also, don't count on them reading Javascript. When you view the source of the

Re: [web2py] Re: r=request problem.

2010-04-26 Thread Jonathan Lundell
On Apr 26, 2010, at 9:41 AM, annet wrote: Now I understand the problem. When I rewrite the _href: {{=A('View it in your browser', _href=http://127.0.0.1:8000; + URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijfcontactpersoon.bedrijf_id,item.contactpersoon.id]),

[web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
Our engineering folks have started looking at the new release, with attention to Rocket, and have reported a couple of problems. 1) when https is enabled, but a connection is attempted to http, CherryPy (?) will return a message indicating this server operates on https only. The new version,

Re: [web2py] Re: Rocket issues

2010-04-28 Thread Jonathan Lundell
function is the first time the app tries to talk to the outside world (unsuccessfully, it appears). On Apr 28, 8:56 am, Jonathan Lundell jlund...@pobox.com wrote: Our engineering folks have started looking at the new release, with attention to Rocket, and have reported a couple of problems

Re: [web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 6:56 AM, Jonathan Lundell wrote: 2) if a localhost managed server is configured using the same port as [web2py], but http protocol, atttempting to connect to that URL will cause [web2py] to become unresponsive to all requests until it is restarted. With the same

Re: [web2py] request with args

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 9:30 AM, annet wrote: In one of my functions I redirect the user to another function. I would like to notify the user that he has been redirect by setting a flash message, the problem is the args in the url. This is the function: if

Re: [web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 8:48 AM, Jonathan Lundell wrote: On Apr 28, 2010, at 6:56 AM, Jonathan Lundell wrote: 2) if a localhost managed server is configured using the same port as [web2py], but http protocol, atttempting to connect to that URL will cause [web2py] to become unresponsive to all

Re: [web2py] Re: zoolander

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 7:00 PM, mr.freeze wrote: Interesting. This would be an easy way to make your CSS dynamic. web2py views are an easy way to make your CSS dynamic.

Re: [web2py] Rocket issues

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 5:58 AM, Timothy Farrell wrote: It sounds to me like these two issues are really one. Basically, Rocket is not sending an HTTP response when in HTTPS mode. It closes the socket but (for some reason) Python doesn't close it immediately. This causes a client to hang

Re: [web2py] Re: Application logging

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 7:22 AM, mdipierro wrote: It may go in tools. What do other people think? Logging is important enough for that, yes. WRT Keith's comment below: Python logging offers a rich collection of logging mechanisms, one of which is syslog, which in turn offers a rich collection of

Re: [web2py] restart web2py command line

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 10:30 AM, Avik Basu wrote: Is there a way to restart web2py from the command line in a linux environment? I adapted one of the startup scripts in scripts/ (I think I started with the Fedora one) to make a shell script that I use from the command line. It'd be easy enough

Re: [web2py] Rocket issues

2010-04-29 Thread Jonathan Lundell
think so. Probably not. The risk is that in some circumstances there's a DoS vulnerability (I think?); otherwise the offending case isn't actually useful and won't be missed. -tim On 4/29/2010 9:07 AM, Jonathan Lundell wrote: On Apr 29, 2010, at 5:58 AM, Timothy Farrell wrote

Re: [web2py] Proposed patch for SQLTABLE

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 1:43 PM, Thadeus Burgess wrote: There is also a bug in appadmin that when you sort you get the list sorted, but if you browse the next 100 records, the sorting reverses itself. Do you think this would fix that bug as well? Perhaps what you want to do is to append orderby=c

Re: [web2py] Login without using email id

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 1:49 PM, DJ wrote: I would like to set the auth method to use any username ('tom') instead of forcing an email id ('t...@something.com'). How can I do this? In the latest version, call define_tables(username=True). In earlier versions you have to create the user table

Re: [web2py] Re: Proposed patch for SQLTABLE

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 2:14 PM, Yarko Tymciurak wrote: I am confused... or missing something... On Apr 29, 3:35 pm, Philip philip.el...@gmail.com wrote: I'm not sure the patch submittal process, nor am I confident that my solution is the best way to solve the issue, but I'd like to propose a

Re: [web2py] Re: Proposed patch for SQLTABLE

2010-04-29 Thread Jonathan Lundell
not looking at the code). -Philip On Apr 29, 4:49 pm, Jonathan Lundell jlund...@pobox.com wrote: On Apr 29, 2010, at 1:43 PM, Thadeus Burgess wrote: There is also a bug in appadmin that when you sort you get the list sorted, but if you browse the next 100 records, the sorting reverses itself. Do

Re: [web2py] Re: Proposed patch for SQLTABLE

2010-04-29 Thread Jonathan Lundell
On Apr 29, 2010, at 4:50 PM, Yarko Tymciurak wrote: I think this is about data containment. RIght now, there is coupling. That this bug took long to find suggests its at the periphery of the problem space (if it were smack-in-the-middle, lots of people would have already complained).

Re: [web2py] Disabling few functions for certain users

2010-04-30 Thread Jonathan Lundell
On Apr 30, 2010, at 7:22 AM, Thadeus Burgess wrote: You need to store the preferences in the database, what seems to be happening is you are setting the disabled actions, but its being lost on the next request. So along with your auth_user table you probably need to add a couple boolean

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