Re: [web2py] Re: routing problem on www.bioinformatics.org

2012-11-06 Thread Jonathan Lundell
13:05:13 UTC-6, Jonathan Lundell wrote: On 6 Nov 2012, at 10:55 AM, Maurice Ling mauri...@gmail.com wrote: Hi everyone Latest development on this issue... 1. http://www.bioinformatics.org/refgene gives me an Invalid request 2. http://www.bioinformatics.org/refgene/admin says that Admin

Re: [web2py] Re: routing problem on www.bioinformatics.org

2012-11-06 Thread Jonathan Lundell
13:20:17 UTC-6, Jonathan Lundell wrote: On 6 Nov 2012, at 11:10 AM, Maurice Ling mauri...@gmail.com wrote: As advised by lyn2py, the current router.py is the same as router.example.py and routes.py is the same as routes.example.py web2py ignores router.py. Copy router.example.py to routes.py. --

Re: [web2py] Re: routing problem on www.bioinformatics.org

2012-11-06 Thread Jonathan Lundell
On 6 Nov 2012, at 12:01 PM, J.W. Bizzaro jwbizz...@gmail.com wrote: I'm helping Maurice with this. We're running Apache on Linux with mod_wsgi. This is a shared host environment where each hosted website is under the user's public_html directory. Normally, we run symlinks from the docroot

Re: [web2py] Re: Formatter and values=None problem

2012-10-27 Thread Jonathan Lundell
On 27 Oct 2012, at 10:08 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: There are two issues here. One is that validators were originally intended for form input and form input never submit None. They submit '' or missing value but never None. I agree with you that you may want to

Re: [web2py] Re: downloading a synthetic csv

2012-10-26 Thread Jonathan Lundell
, was my plan). On Friday, October 26, 2012 1:13:17 AM UTC+2, Jonathan Lundell wrote: I want to build a dataset (list of lists) in response to a user request and cause a csv of that dataset to be downloaded. I have a working but ugly implementation that uses @service.csv. If I access

Re: [web2py] downloading a synthetic csv

2012-10-26 Thread Jonathan Lundell
On 26 Oct 2012, at 6:40 AM, Jonathan Lundell jlund...@pobox.com wrote: On 26 Oct 2012, at 2:46 AM, Niphlod niph...@gmail.com wrote: do you serve a StringIO instance ? for 2. you may try response.stream(yourcsvinstance, filename='foo.csv', attachment=True) I don't; I'm just returning a list

[web2py] downloading a synthetic csv

2012-10-25 Thread Jonathan Lundell
I want to build a dataset (list of lists) in response to a user request and cause a csv of that dataset to be downloaded. I have a working but ugly implementation that uses @service.csv. If I access the URL http://domain.com/app/default/call/csv/foo ...it works OK and downloads a file named

Re: [web2py] web2py.com is down

2012-10-24 Thread Jonathan Lundell
On 24 Oct 2012, at 8:47 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Here everything fine! http://www.downforeveryoneorjustme.com/web2py.com Richard On Wed, Oct 24, 2012 at 11:40 AM, Alan alan.lock...@gmail.com wrote: seems really slow to respond at the moment. happy to

Re: [web2py] Help With Dropbox idea

2012-10-22 Thread Jonathan Lundell
On 22 Oct 2012, at 4:48 AM, Hassan Alnatour halna...@gardeniatelco.com wrote: I want to make function that makes a csv file from my database and push it to a dropbox folder , any ideas on that ? At the very least create the csv file in a tmp directory and then move it atomically to your

Re: [web2py] routes.py and anchor links

2012-10-22 Thread Jonathan Lundell
On 22 Oct 2012, at 9:28 AM, David Sorrentino sorrentino...@gmail.com wrote: I have got some doubts about the use of anchor links and the URL rewriting by means of routes.py. This is my routes.py: routes_out = ( ('/myapp/default/$f', '/$f') ) So /myapp/default/just_a_page is

Re: [web2py] Re: URL requests always aiming to default controller...

2012-10-17 Thread Jonathan Lundell
On 17 Oct 2012, at 2:07 AM, apinho jaapi...@sapo.pt wrote: I'm using Version 1.99.7 (2012-03-04 22:12:08) stable If I try, from the example app : https://myserver/examples/session-examples/counter I get : Invalid request This is weird. Meanwhile, as you told me that

Re: [web2py] URL requests always aiming to default controller...

2012-10-16 Thread Jonathan Lundell
On 16 Oct 2012, at 2:27 AM, apinho jaapi...@sapo.pt wrote: Using web2py, straight out of the box, no routes.py or such : When i request : https://myserver/myapp/mycontroller/myfunction having /models/models.py : ... default_application = 'myapp' ... and

Re: [web2py] URL requests always aiming to default controller...

2012-10-16 Thread Jonathan Lundell
(or if there is, it's not what's causing your problem). Which version of web2py are you using? You might check whether the other standard apps work OK in this respect. On Tuesday, October 16, 2012 4:12:16 PM UTC+1, Jonathan Lundell wrote: On 16 Oct 2012, at 2:27 AM, apinho jaap...@sapo.pt wrote: Using

Re: [web2py] APP-specific routers

2012-10-03 Thread Jonathan Lundell
On 2 Oct 2012, at 9:24 PM, lyn2py lyn...@gmail.com wrote: The new (or maybe not so new, by now) app-specific routers is an excellent idea. I love it. Can I get some help regarding the use of it? The following code is in my routes.py file, but it doesn't seem to work: routers = {

Re: [web2py] APP-specific routers

2012-10-03 Thread Jonathan Lundell
in possible_languages if lang != 'default'], default_controller = 'default', #I added this default_function = 'index', #and this ) } On Wednesday, October 3, 2012 11:22:50 PM UTC+8, Jonathan Lundell wrote: On 2 Oct 2012, at 9:24 PM, lyn2py lyn

Re: [web2py] Reload routes command line?

2012-10-02 Thread Jonathan Lundell
On 2 Oct 2012, at 11:53 AM, Bruno Rocha rochacbr...@gmail.com wrote: This is what admin does, but this have to be executed within the environent. You can have a controller to execute this: def reload_routes(): Reload routes.py import gluon.rewrite

Re: [web2py] Reload routes command line?

2012-10-02 Thread Jonathan Lundell
On 2 Oct 2012, at 3:42 PM, Bruno Rocha rochacbr...@gmail.com wrote: You could do that from the command line, too, with a python script. I understood that it need to run under the current running environment right? if I have a server running (apache) and I open a web2py console I will have

Re: [web2py] Re: symmetric key encryption using PyCrypto

2012-10-02 Thread Jonathan Lundell
On 2 Oct 2012, at 8:51 PM, Dave dave.st...@gmail.com wrote: Sorry... there was supposed to be a 2 as well... i was making a numbered list. These days my brain is not functioning as well as I would like given my health. My utility class does in fact use PyCrypto. What I was saying is

Re: [web2py] Invalid Syntax Error with HTML Helper attributes

2012-09-23 Thread Jonathan Lundell
On 23 Sep 2012, at 7:45 AM, Michael Wolfe michael.joseph.wo...@gmail.com wrote: I'm receiving an invalid syntax error when running from Windows. I do not receive the error when running the same code from my Webfaction account on CentOS. The error appears to be related to compiling of the

Re: [web2py] URGENT - web2py server crashes

2012-09-19 Thread Jonathan Lundell
On 19 Sep 2012, at 5:29 PM, weheh richard_gor...@verizon.net wrote: I'm getting a web2py crash. Here's the trace at the web2py 1.99.7 (2012-03-04 22:12:08) stable console: DEBUG: connect attempt 1, connection error: Traceback (most recent call last): File C:\web2py\gluon\dal.py, line

Re: [web2py] URGENT - web2py server crashes

2012-09-19 Thread Jonathan Lundell
On 19 Sep 2012, at 6:27 PM, weheh richard_gor...@verizon.net wrote: Definitely some kind of running out of memory issue. Now, I'm getting this: Can you run the server without cron? It's probably not *that* significant that newcron shows up in the traceback, but turning it off (if you can) might

Re: [web2py] URGENT - web2py server crashes

2012-09-19 Thread Jonathan Lundell
On 19 Sep 2012, at 7:19 PM, weheh richard_gor...@verizon.net wrote: How to disable cron? I've read other threads on this, but can't find the right incantation. How are you running cron now? What mode? If you're using Rocket (as it looks like), you can use -N to disable cron. --

Re: [web2py] Re: 1 Test with web2py 2

2012-09-14 Thread Jonathan Lundell
On 14 Sep 2012, at 4:22 PM, howesc how...@umich.edu wrote: i would argue in that case that there is a bug if login is prevented because the password is too short.once a user creates a password it should remain valid until they change it. we should only check password length on

Re: [web2py] [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-09-11 Thread Jonathan Lundell
On 10 Sep 2012, at 11:32 PM, pbreit pbreitenb...@gmail.com wrote: Well...for starters, web2py, fabric and pil are 2.7. So, yes, I think it is an absolutely, insanely user-hostile decision. The python ecosystem is not even close to ready to move to 3. And from what I can tell, 3 offers

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
On 10 Sep 2012, at 9:02 AM, Marek Mollin rog...@gmail.com wrote: So i have cut down the router to bare minimum, just to check this admin issue. I now have: routers = dict( BASE = dict( domains = { 'myapp.com' : 'myapp1', 'test.myapp.com' : 'myapp2', }

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
:12 UTC+2 użytkownik Jonathan Lundell napisał: On 10 Sep 2012, at 9:02 AM, Marek Mollin rog...@gmail.com wrote: So i have cut down the router to bare minimum, just to check this admin issue. I now have: routers = dict( BASE = dict( domains = { 'myapp.com' : 'myapp1

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
21:15:50 UTC+2 użytkownik Jonathan Lundell napisał: On 11 Sep 2012, at 12:04 PM, Marek Mollin rog...@gmail.com wrote: We be rollin ;] It works perfectly so far. Both admin and appadmin. Relocating admin doesnt work but its no big deal I guess. What happens when you relocate admin? --

Re: [web2py] Spaces in URL for static files

2012-09-11 Thread Jonathan Lundell
On 11 Sep 2012, at 2:54 PM, jc j-cl...@lineone.net wrote: I have a file app/static/docs/Report 2008 12.pdf i.e. it is in a subdir of static and the filename has spaces. I use URL('static', 'docs', 'Report 2008 12.pdf') to generate the link. When I click the link the browser address bar

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Jonathan Lundell
: So if I skip the admin.app.com line domain I will get: test.app.com/admin app.com/admin all working fine? W dniu niedziela, 9 września 2012 22:01:12 UTC+2 użytkownik Jonathan Lundell napisał: On 9 Sep 2012, at 12:42 PM, Marek Mollin rog...@gmail.com wrote: Hello, I ran into small

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Jonathan Lundell
, everything is fine. Admin is accessible. That is, unfortunately, the expected behavior. I've asked the other developers to comment on a couple of proposed fixes. W dniu poniedziałek, 10 września 2012 15:15:40 UTC+2 użytkownik Jonathan Lundell napisał: On 10 Sep 2012, at 2:17 AM, Marek Mollin

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-09 Thread Jonathan Lundell
On 9 Sep 2012, at 12:42 PM, Marek Mollin rog...@gmail.com wrote: Hello, I ran into small problem. I have web2py 2.08 running nginx + postgres. I configured routes using parametric system. In routes.py I defined domains and assigned admin to seperate domain. By domain i mean actually

Re: [web2py] redirect with method POST

2012-09-07 Thread Jonathan Lundell
On 7 Sep 2012, at 3:56 AM, Pradeeshnarayan pradeeshnara...@gmail.com wrote: In my web2py application after a form submit, I want to redirect to another page with some POST variables. I couldn't find any option to set then method. My main idea is to avoid those values from users. I would

Re: [web2py] Re: What is the proper way to use external cron with web2py?

2012-09-07 Thread Jonathan Lundell
But I see web2py has some flags and I am not sure should I use them or not. Does it matter? -J, --cronjob identify cron-initiated command -C, --crontrigger a cron run manually; usually invoked from a system crontab Do they change

Re: [web2py] Re: What is the proper way to use external cron with web2py?

2012-09-07 Thread Jonathan Lundell
On 7 Sep 2012, at 8:06 AM, Jose C houdinihoun...@gmail.com wrote: Using system/external cron, you should use the -J flag. Jonathan, could you elaborate on what the `J` flag is supposed to do? I've just run external cron tests both with and without that flag and can't see any visible

Re: [web2py] Re: What is the proper way to use external cron with web2py?

2012-09-07 Thread Jonathan Lundell
On 7 Sep 2012, at 8:33 AM, Jose C houdinihoun...@gmail.com wrote: Mainly, it avoids some unnecessary overhead, and automatically sets some other useful flags (like -N). And in the trunk (so wait for 2.0.8), it sets nobanner and nogui. Also, it overrides requires_https. (I don't actually

Re: [web2py] CentOS Web2py IOError - Permission denied

2012-09-05 Thread Jonathan Lundell
On 4 Sep 2012, at 9:22 PM, webtest ert...@gmail.com wrote: I am running web2py on Centos and used the fedora shell script to do the installation. It did set all my folder/files as apache:apache, did the selinux configuration and such. I have the welcome and examples applications loaded.

Re: [web2py] Arrays and json

2012-09-04 Thread Jonathan Lundell
On 4 Sep 2012, at 7:04 AM, Hassan Alnatour halna...@gardeniatelco.com wrote: I am trying to use a data table called jtable , it uses arrays and return it as json .. now i have the php code for it : //Get records from database $result = mysql_query(SELECT * FROM people;); //Add all

Re: [web2py] Re: 2.0.6 on GAE - Routing issues and ticket unrecoverable

2012-09-03 Thread Jonathan Lundell
On 2 Sep 2012, at 9:48 PM, Udi Milo udim...@gmail.com wrote: I've reinstalled the distribution and now I do get a ticket when I fabricate an error, but when I go to: http://127.0.0.1:8080/admin/default/ticket/welcome/127.0.0.1.2012-09-03.04-35-34.686f53b3-db23-4cf7-82bb-0af5c0eee05d I

Re: [web2py] Re: Scaling Web2py

2012-09-03 Thread Jonathan Lundell
On 3 Sep 2012, at 7:42 AM, David Marko dma...@tiscali.cz wrote: Great!! The first set of questions ... some are maybe too private, you see ... API for iOS ### does it mean that you dont use views, just endering data to JSON, and data representation is done in iOS app? 30-40 request per

Re: [web2py] type 'exceptions.AttributeError' 'Auth' object has no attribute 'use_username'

2012-08-30 Thread Jonathan Lundell
On 30 Aug 2012, at 1:24 AM, Annet anneve...@googlemail.com wrote: In web2py 2.0.2 in an application in which I commented out: # auth.define_tables(username=False, signature=False) I defined a new table, after saving db.py, when I click the database administration button I get the

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-30 Thread Jonathan Lundell
On 30 Aug 2012, at 1:59 AM, peter peterchutchin...@gmail.com wrote: I got inside gluon. The conversion is done within regex_uri I have found that http://127.0.0.1:8002/gallery becomes 127.0.0.1:http://127.0.0.1:get /gallery just before the conversion http://localhost:8002/gallery

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On 29 Aug 2012, at 6:46 AM, peter peterchutchin...@gmail.com wrote: Okay, I get it now, routes_app does not select the application, only where to get the substitute routes.py. The book is right with hindsight, but did not lead me to the right understanding. Maybe it should be clearer that it

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On 29 Aug 2012, at 8:13 AM, peter peterchutchin...@gmail.com wrote: I am not sure what docs you are referring to Jonathan. The book gives an example: The general syntax for routes is more complex than the simple examples we have seen so far. Here is a more general and representative example:

Re: [web2py] Re: routes.py and patterns with routes_app

2012-08-29 Thread Jonathan Lundell
On Wednesday, 29 August 2012 16:21:12 UTC+1, Jonathan Lundell wrote: A little below that is the general structure of the incoming pattern. '[remote address]:[protocol]://[host]:[method] [path]' In the long run, what are you really trying to accomplish with your routes? On Wednesday

Re: [web2py] Re: Mercurial not found

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 9:40 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Which web2py version? which python version? Note that that particular message implies that 'from mercurial import ui, hg, cmdutil' yielded an ImportError. Try the import from python directly. On Tuesday, 28

Re: [web2py] Changing DB passwords, and database/*.table files

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 10:17 AM, Chris ch...@spitfireinnovation.com wrote: Background: web2py keeps track of database definitions using files in each app's ./databases directory. The basic concept is, for each table definition a pickle file is created storing attributes defined in web2py / not

Re: [web2py] Avoiding loading models for the public portion of a site

2012-08-28 Thread Jonathan Lundell
On 28 Aug 2012, at 6:52 PM, Yarin ykess...@gmail.com wrote: A basic architecture question: We're putting together a typical web app where non-logged in users reach a public-facing basic 'brochure' site, and then log in to reach the 'real' application. With such a setup, it makes no sense

Re: [web2py] short url's and 404

2012-08-27 Thread Jonathan Lundell
On 27 Aug 2012, at 7:30 AM, jc j-cl...@lineone.net wrote: I want to shorten url's and use hyphens in my paths. I also want to get a 404 if the user tries an invalid url. I have played with routes.py but the effect I get is shorter url's (good), hyphens in url's translated to underscores in

Re: [web2py] Re: SEO Friendly URLs and Page Titles

2012-08-27 Thread Jonathan Lundell
On 27 Aug 2012, at 4:56 PM, SeamusSeamus morrisjamespatr...@gmail.com wrote: nevermind I fixed it. Not sure why, but if it was named 'equipment' the controller showed up...any other name it doesnt. I just renamed Because you also have an application named 'equipment', so some URLs are

Re: [web2py] Field.Lazy attaching unbound Class method

2012-08-25 Thread Jonathan Lundell
On 25 Aug 2012, at 8:33 AM, Marek Mollin rog...@gmail.com wrote: Hello, I have a problem with a construct like that: db.define_table('test', Field('name'), ) class Test(object): def get(row): return row.name def get_hello(row, greeting): return '%s %s' %

Re: [web2py] Major speed improvement need testers

2012-08-25 Thread Jonathan Lundell
On 23 Aug 2012, at 7:25 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: So now in trunk you can do: db = DAL(lazy_tables=True) db.define_table('person',Field('name'),Field('age','integer'), on_define=lambda table: [

Re: [web2py] Error when assigning form.vars

2012-08-25 Thread Jonathan Lundell
On 25 Aug 2012, at 12:27 PM, SeamusSeamus morrisjamespatr...@gmail.com wrote: When I do this: form=SQLFORM.factory( Field('your_email',requires=IS_EMAIL()), Field('your_phone'), Field('subject'), Field('question', 'text', requires=IS_NOT_EMPTY()))

Re: [web2py] Re: Google group again

2012-08-24 Thread Jonathan Lundell
On 24 Aug 2012, at 5:40 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Who are you? You can see things that only managers of the group should be able see. And Anthony is a member. Some people must be seeing the old Groups interface, which had that information. It used to be that you

Re: [web2py] Major speed improvement need testers

2012-08-23 Thread Jonathan Lundell
On 23 Aug 2012, at 7:48 AM, Anthony abasta...@gmail.com wrote: db = DAL(lazy_tables=True) db.define_table('person',Field('name'),Field('age','integer'), on_define=lambda table: [ table.name.set_attributes(requires=IS_NOT_EMPTY(),default=''),

Re: [web2py] Major speed improvement need testers

2012-08-23 Thread Jonathan Lundell
On 23 Aug 2012, at 8:39 AM, Anthony abasta...@gmail.com wrote: Couple of things (including questions). 1. attributes defined in the Field() spec are lazy already, right? I guess not so much lazy, but for the most part all that happens is they get added as attributes to the Field's self.

Re: [web2py] Major speed improvement need testers

2012-08-23 Thread Jonathan Lundell
at it more closely later. Let's label it experimental for now. BTW. Auth is now fully lazy, when DAL(lazy_tables=True), and therefore should be faster. Needs testing and benchmarking. massimo On Thursday, 23 August 2012 10:45:42 UTC-5, Jonathan Lundell wrote: On 23 Aug 2012, at 8:39 AM

Re: [web2py] Re: Google group again

2012-08-23 Thread Jonathan Lundell
On 23 Aug 2012, at 7:37 PM, Anthony abasta...@gmail.com wrote: I'm not sure it's possible any more. That's my impression. On Thursday, August 23, 2012 10:11:36 PM UTC-4, Massimo Di Pierro wrote: Does anybody know how to check how many members and how many posts are in this group? --

Re: [web2py] Re: Major speed improvement need testers

2012-08-22 Thread Jonathan Lundell
On 22 Aug 2012, at 10:15 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Some more info the issue page claims this issue is fixed in pyhton 2.7.3 but my tests and Michele's test revealed it is not in fact fixed. Looks like it's in 2.7.4:

Re: [web2py] Is only first argument available for ordering factor with GAE?

2012-08-20 Thread Jonathan Lundell
On 20 Aug 2012, at 7:20 AM, JungHyun Kim kjungh...@gmail.com wrote: I have question about order by option with GAE. This code works well on my local (not GAE test server), but has problem on google app engine. (even on the GAE local test server) I filtered messages which has end_time after

Re: [web2py] Major speed improvement need testers

2012-08-20 Thread Jonathan Lundell
On 18 Aug 2012, at 1:46 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: As Bruno says. Something like this will completely nullify the benefit of lazy tables. Field(..., readable=True) is OK but db.table.field.readable=True is BAD because will force db.table to be instantiated.

Re: [web2py] Major speed improvement need testers

2012-08-20 Thread Jonathan Lundell
is referenced, it's important that the caller not include mutable objects in args and change them (in relevant ways) between the define_table call and the instantiation. On Monday, 20 August 2012 11:51:27 UTC-5, Jonathan Lundell wrote: On 18 Aug 2012, at 1:46 PM, Massimo Di Pierro massimo@gmail.com

Re: [web2py] Re: routes.py changed but user still called from default

2012-08-20 Thread Jonathan Lundell
On 20 Aug 2012, at 3:51 PM, Anthony abasta...@gmail.com wrote: Do you have a default.py controller with a user() function? Does the problem go away if you remove routes.py altogether? Anyway, instead of the routes you have (which is legacy functionality), you're better off using the

Re: [web2py] Major speed improvement need testers

2012-08-20 Thread Jonathan Lundell
it, for whatever reason, but lazily. On Monday, 20 August 2012 16:36:22 UTC-5, Jonathan Lundell wrote: On 20 Aug 2012, at 10:32 AM, Massimo Di Pierro massimo@gmail.com wrote: can you show a proof of concept? Not exactly a proof, but a concept. At the very end of lazy_define_table

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-17 Thread Jonathan Lundell
On 17 Aug 2012, at 7:18 AM, Rob_McC mrmccorm...@gmail.com wrote: Still trying to make my username example, google-like. Google prohibits a very small set of bad words. I have a BADWORDS working outside of the validation, but when I insert in validation, I get error. Any help would be

Re: [web2py] Source compile error - local vs. remote - frustrating

2012-08-17 Thread Jonathan Lundell
On 17 Aug 2012, at 7:41 AM, wdtatenh wdt...@comcast.net wrote: My site is hosted on webfaction. The web2py src code is the same on local remote - both have the latest web2py src. Compiled my site locally, uploaded to my remote site and I get raise SystemError, 'compiled code is

Re: [web2py] map_hyphens and pattern-based routes

2012-08-16 Thread Jonathan Lundell
On 16 Aug 2012, at 10:33 AM, Neil yager.n...@gmail.com wrote: I'm using a pattern-based routes.py file. How can I enable map_hyphens functionality? Do I have to come up with a regex for my routes_in and routes_out, yes or is there a way to mix pattern-based and parameter-based systems? no

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Jonathan Lundell
On 15 Aug 2012, at 8:39 AM, Anthony abasta...@gmail.com wrote: In that case, you'd want: BADWORDS = re.compile(r'ass|jerk|otherbadword|etc') or if you already have a list or want to use the list in other places: badlist = ['ass', 'jerk', 'etc'] BADWORDS = re.compile(r'|'.join(badlist))

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Jonathan Lundell
On 15 Aug 2012, at 10:02 AM, Anthony abasta...@gmail.com wrote: You'd also want to add word boundaries r'\b' to the RE, to avoid false positives on eg 'assert'. Though he said he explicitly did not want to do that. Ah, well. --

Re: [web2py] Re: Book clarification regarding verify_email reset_password

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 5:35 AM, Anthony abasta...@gmail.com wrote: auth,messages.verify_email = ('Here I put my very long html code' 'I can write texts ' 'I can put a tutorial '

Re: [web2py] Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 8:11 AM, Rob_McC mrmccorm...@gmail.com wrote: Hey Jon: Q: BTW, are you deliberately forbidding upper-case letters? A: . Yes, just like Google does, usernames are lowercase, although if your gmail username is johnsmith you can log in with JohnSmith,

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 8:47 AM, Anthony abasta...@gmail.com wrote: Note, you shouldn't need: db.auth_user.password.requires.insert(0,IS_LENGTH(minsize=8)) given that you specify min_length in the CRYPT validator. You might consider the IS_STRONG validator as well. It's maybe worth pointing

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 9:19 AM, Rob_McC mrmccorm...@gmail.com wrote: validators on login is that they leak password constraints to an attacker. (Of course, the registration form can be used to extract this information as well, but still...) - I think I understand, when you say leak--

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-14 Thread Jonathan Lundell
On 14 Aug 2012, at 9:33 AM, Anthony abasta...@gmail.com wrote: It's maybe worth pointing out that these validators should be imposed only when registering or changing a password, not during login. The problem with having password validators on login is that they leak password constraints to

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Jonathan Lundell
In any case, while tuples are immutable, they can be concatenated and replaced. Just don't use insert or append. On Aug 13, 2012, at 8:19 AM, Anthony abasta...@gmail.com wrote: Just looked at the 1.99.7 code, and it is a tuple there -- but it has been changed to a list in trunk, so should

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-13 Thread Jonathan Lundell
Change '/applications/' to os.sep + 'applications' + os.sep On Aug 13, 2012, at 10:40 AM, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: The contents of thread.folder: C:\Users\alexei\Dev\web2py\web2py.googlecode.com\applications\vocabilis\databases On Mon, Aug 13, 2012 at 11:11

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-13 Thread Jonathan Lundell
On 13 Aug 2012, at 1:28 PM, Rob_McC mrmccorm...@gmail.com wrote: Just tried with web2py 2.0 release. It worked . auth.define_tables(username=True) db.auth_user.username.requires.insert(0,IS_MATCH([a-z].*)) So, thanks everyone, this certainly answered my first post about the error. I'll

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-11 Thread Jonathan Lundell
On 11 Aug 2012, at 8:51 PM, Rob_McC mrmccorm...@gmail.com wrote: I never got this to work, as I mentioned above auth.define_tables(username=True) db.auth_user.username.requires.insert(0,IS_MATCH([a-z].*)) I get this error: Ticket ID

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-10 Thread Jonathan Lundell
On 10 Aug 2012, at 8:42 AM, Rob_McC mrmccorm...@gmail.com wrote: To make is same as google user name policy: They allow periods, but NOT as a first letter - I added to your RegEx I'm almost got it, I want to use exactly what Google uses, (see image attached) - I bet this could be on RegEx,

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-10 Thread Jonathan Lundell
On 10 Aug 2012, at 8:42 AM, Rob_McC mrmccorm...@gmail.com wrote: I'm almost got it, I want to use exactly what Google uses, (see image attached) - I bet this could be on RegEx, but won't have separate messages then. Do you really want separate messages? It's annoying to try different names

Re: [web2py] Redirect to requested function

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 3:10 AM, Annet anneve...@googlemail.com wrote: My application is completely nodeID driven, so all front end function run the following test: if not len(request.args) or request.args(0)!=session.id: redirect(URL('addressbook','router',args=request.args(0))) If you

Re: [web2py] Re: Appengine CPU cycles

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 7:59 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: It is likely Django uses simplejson binary while web2py (for portability) only ships with simplejson in pure python. This may be another performance loss if you use json a lot. We need to fix this at the web2py

Re: [web2py] Routing problem

2012-08-08 Thread Jonathan Lundell
On 8 Aug 2012, at 2:13 PM, Paulo Junqueira da Costa paulo.junque...@gmail.com wrote: I just uploaded my first app do production under apache and following the manual, I wrote a routes.py as follows: routers = dict( BASE = dict( default_application = 'vendasexpress',

Re: [web2py] URL strategy for single application

2012-08-07 Thread Jonathan Lundell
be reflected until the new routes are reloaded, one way or another. This can be a cause for confusion when you're developing your routes, so keep it in mind. Thanks, Daniel On Thursday, August 2, 2012 9:47:24 PM UTC+2, Jonathan Lundell wrote: On 2 Aug 2012, at 12:34 PM, Bruno Rocha rochacbr

Re: [web2py] Re: Configuring Nginx to serve static content directly

2012-08-06 Thread Jonathan Lundell
it automatically. 2012. augusztus 6., hétfő 4:20:24 UTC+2 időpontban Jonathan Lundell a következőt írta: On 5 Aug 2012, at 7:10 PM, pbreit pbreitenb...@gmail.com wrote: Shouldn't it be: root /home/www-data/web2py/applications/myapp/; No, he was saying it works OK without a language

Re: [web2py] Re: Configuring Nginx to serve static content directly

2012-08-06 Thread Jonathan Lundell
6., hétfő 4:20:24 UTC+2 időpontban Jonathan Lundell a következőt írta: On 5 Aug 2012, at 7:10 PM, pbreit pbreitenb...@gmail.com wrote: Shouldn't it be: root /home/www-data/web2py/applications/myapp/; No, he was saying it works OK without a language specified. Setting map_static

Re: [web2py] updating web2py src on live site and web2py shutdown/restart

2012-08-06 Thread Jonathan Lundell
On 6 Aug 2012, at 9:37 AM, wdtatenh wdt...@comcast.net wrote: I'm about to update the src code on a live site hosted by webfaction. I'm assuming that web2py server must be stopped and restarted. Web2py is running from the original installation script and has never had to be shutdown

Re: [web2py] Configuring Nginx to serve static content directly

2012-08-05 Thread Jonathan Lundell
On 5 Aug 2012, at 4:42 PM, Athelionas athelio...@gmail.com wrote: Hi, I'm trying to setup Nginx to handle all my static contents bypassing uwsgi and thus web2py. Everything works fine as long as I don't specify a language in the URL. If I do then I end up with broken links to static files.

Re: [web2py] Re: Configuring Nginx to serve static content directly

2012-08-05 Thread Jonathan Lundell
On 5 Aug 2012, at 7:10 PM, pbreit pbreitenb...@gmail.com wrote: Shouldn't it be: root /home/www-data/web2py/applications/myapp/; No, he was saying it works OK without a language specified. Setting map_static=False (which is the default) means that static URLs have a full URL, including

Re: [web2py] Copyright with current year in footer - automatic updating - suggestion.

2012-08-04 Thread Jonathan Lundell
On 4 Aug 2012, at 7:48 AM, Rob_McC mrmccorm...@gmail.com wrote: Still new to python and web2py - sure enjoying it, I wonder if this is a good idea? Using © seems like a good idea, just on i18n grounds. Where did you see #169; preferred? Sounds like advice for really old browsers (using IE4,

Re: [web2py] Copyright with current year in footer - automatic updating - suggestion.

2012-08-04 Thread Jonathan Lundell
On 4 Aug 2012, at 9:04 AM, Rob_McC mrmccorm...@gmail.com wrote: Thanks for insight... Q: Where did you see #169; preferred? Ref: http://www.copyrightauthority.com/copyright-symbol/ However,... always use the number code instead of the symbol code #169; (after examining the site,

Re: [web2py] Re: is_impersonating() as boolean in menu

2012-08-03 Thread Jonathan Lundell
On 3 Aug 2012, at 4:50 AM, Martin Weissenboeck mweis...@gmail.com wrote: Sorry, my tests were wrong. Please forget my last mail. I think I have mixed two versions on my computer. I have tested it again and now is_imperonating works as expected. Thank you! That's good. I've been trying to

Re: [web2py] Re: LEFT JOIN query issues

2012-08-03 Thread Jonathan Lundell
On 3 Aug 2012, at 5:08 AM, Larry G. Wapnitsky la...@kvetsch.com wrote: grrr ...there's always something in a programming language! I blame SQL... Thanks, Limedrop On 8/2/2012 5:43 PM, Limedrop wrote: This gets me every now and then... In python it should be == rather than =

Re: [web2py] Re: web2py still unable to create application on WebFaction

2012-08-03 Thread Jonathan Lundell
On 3 Aug 2012, at 7:13 AM, Alan Etkin spame...@gmail.com wrote: On Thursday, June 7, 2012 6:35:19 PM UTC-7, JoeCodeswell wrote: Hi Noel, I had this problem occur AGAIN, TODAY on WebFaction, when I upgraded to Version 1.99.7 (2012-03-04 22:12:08) stable, Running on Apache/2.2.17 (Unix)

Re: [web2py] if statement with multiple conditions in view

2012-08-03 Thread Jonathan Lundell
On 3 Aug 2012, at 4:34 PM, adohertyd adoher...@hotmail.com wrote: Just wondering if anyone has a solution to this. I have an if statement in a view: {{if conditionA == True:}} {{for obj in ListA:}} li{{=obj}}/li {{pass}} {{pass}} This works fine. Now, if I add another condition to

Re: [web2py] if statement with multiple conditions in view

2012-08-03 Thread Jonathan Lundell
, Jonathan Lundell wrote: On 3 Aug 2012, at 4:34 PM, adohertyd wrote: Just wondering if anyone has a solution to this. I have an if statement in a view: {{if conditionA == True:}} {{for obj in ListA:}} li{{=obj}}/li {{pass}} {{pass}} This works fine. Now, if I add another condition

Re: [web2py] if statement with multiple conditions in view

2012-08-03 Thread Jonathan Lundell
==Yes}} returns output. The problem is definitely the multiple condition Please try: if conditionB == Yes and perhaps: if True and True (just to make the test case dirt-simple) On Saturday, 4 August 2012 00:47:19 UTC+1, Jonathan Lundell wrote: On 3 Aug 2012, at 4:45 PM, adohertyd wrote

Re: [web2py] run code only if you are a worker

2012-08-03 Thread Jonathan Lundell
On 3 Aug 2012, at 5:23 PM, Vincenzo Ampolo vincenzo.amp...@gmail.com wrote: On 08/03/2012 02:53 PM, Anthony wrote: There's also request.global_settings.cronjob. Cool but where do I've request available? It's not at import time but i've a request object in web2py.py -M -S milo So when

Re: [web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 6:32 AM, peter peterchutchin...@gmail.com wrote: I did not just discard it, I spent a day working through the issues. I have a virtual box that I have installed Centos 5.8 on. I start with a clean install and apply the script. With the changes I spoke of in my previous

Re: [web2py] Re: Can't run web2py because of socket.gethostbyname problem

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 7:26 AM, Mobility f...@mobility-br.com wrote: Did anyone succeed installing Web2py in Mountain Lion Server with mod_wsgi? I have it installed and working in Lion but I cannot make it work in Mountain Lion. What does hostname(1) give you? You might try re-setting the

Re: [web2py] SSL/https nginx slow static content (images)

2012-08-02 Thread Jonathan Lundell
On 2 Aug 2012, at 10:02 AM, Marek Mollin rog...@gmail.com wrote: Anyone have any ideas why the same website over ssl is loading much slower. I mean mostly images and static content. I am aware of small overhead on first request with ssl and handshakes, but images and other static files load

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