[web2py] Re: /admin/design/MyApp very slow over 12 seconds

2013-03-31 Thread Chris Haubner
to uncover ;) Chris On Saturday, March 30, 2013 3:29:48 AM UTC-4, BlueShadow wrote: Hi, my admin/design is very slow (over 12 seconds) and my app isn't that big. 9Models, 2 Controllers (1 with 33 functions, 1 with 11), 44 views, I don't use the language files but all from the welcome app

[web2py] How to add CSS classes to auth.login custom?

2013-02-27 Thread Chris
Hello, I have a form that looks like this: {{top_login_form = auth.login(next = page_currentPath_get(request))}} {{top_login_form.elements('form')[0]['_class'] = 'login_form'}} {{=top_login_form.custom.begin}} Trouble is, auth.login calls SQLFORM and sets

[web2py] Re: How to add CSS classes to auth.login custom?

2013-02-27 Thread Chris
)) }} {{=top_login_form.custom.begin}} On Wednesday, February 27, 2013 4:25:16 PM UTC-5, Niphlod wrote: your own template instead of the standard one defined in views/default/user.html ? On Wednesday, February 27, 2013 10:20:26 PM UTC+1, Chris wrote: Hello, I

[web2py] Can we add __delitem__ to web2py.gluon.dal.Row?

2013-01-28 Thread Chris
reason, but I'm not sure. Would it be possible to add __delitem__ in, to correspond with __setitem__/__getitem__? Thanks-Chris -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group, send email to web2py+unsubscr

Re: [web2py] Re: Can't get auth_user.first_name from referenced comment author field.

2013-01-06 Thread Chris Johnson
That explains it then. I put in a test comment before creating the first user account. I'll just purge that account. Thanks! On Jan 6, 2013 3:28 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: {{=comment.author.first_name}} is correct but: 1) fails if some records have comment.author

[web2py] Re: Sessions lost when several servers running on diff ports

2013-01-02 Thread Chris
On Thursday, October 22, 2009 3:34:03 AM UTC-4, SergeyPo wrote: Yes I was running two different applications, and that's what wondered me - why different apps (actually two different python web2py processes) affected each other. The issue may be the (internal) application name you are

Re: [web2py] Re: URL structure for multilanguage site

2012-12-14 Thread Chris Steel
Your layout .../en/about ... seems very logical to me. I would go with that. As far as translating longer blocks of text such as a blog entry, why not use a language indicator in your database table for each entry. For example lang == en title == 'My title' blog_entry == my entry then for

Re: [web2py] Re: routest_onerror don't work after deploy

2012-12-13 Thread Chris
On Thursday, December 13, 2012 12:11:06 AM UTC-5, Jonathan Lundell wrote: ... What are we really trying to accomplish here? Ordinarily, static requests a) won't be handled by web2py at all; they'll be intercepted by the server, and b) they'll be references to resources embedded in a

[web2py] Re: Unexpected content in error file name -- can anyone explain? (and possible security concern)

2012-12-09 Thread Chris
1.99.7, running from source on Red Hat EL 6 --

[web2py] Unexpected content in error file name -- can anyone explain? (and possible security concern)

2012-12-06 Thread Chris
Looking at one of my test servers, I've seen some odd names for web2py-generated error files in the app's .../errors directory. The typical error file name looks like: 127.0.0.1.2012-12-06.05-16-30.10bd4bdb-ea6d-4c43-a062-0bec4abb43b2 where the 3 segments are (requester's IP address).(request

[web2py] Re: Problem rewriting URL's non-www to www while using mod_wsgi

2012-12-06 Thread Chris
Tried a few different approaches; the best was http://stackoverflow.com/questions/1100343/apache-redirect-from-non-www-to-www In an Apache config file, e.g. /etc/httpd/conf.d/default.conf for CentOS users -- ## ## with www VirtualHost *:80 ServerName www.something.com ... lots of

[web2py] Re: Bug when rendering nested dictionaries as JSON? -- depends on specific values of keys

2012-12-05 Thread Chris
Thanks, that is a really helpful explanation. --

[web2py] Re: Integrated Development Environment with web2py

2012-12-05 Thread Chris
On Sunday, December 2, 2012 10:20:28 AM UTC-5, dlypka wrote: One GOTCHA I found with WING IDE is that you must delete all .pyc files before running, in order to have it correctly stop on your breakpoints in non-module code, in the case where such .py source has been subsequently modified

[web2py] Re: routest_onerror don't work after deploy

2012-12-02 Thread Chris
On Friday, September 9, 2011 9:17:12 AM UTC-4, kachna wrote: I made some investigation and here is results. 1) routes_onerror do not work with static files. It is cased by lines 488 and 489 in gluon.main if static_file: return

[web2py] Re: Bug when rendering nested dictionaries as JSON? -- depends on specific values of keys

2012-12-02 Thread Chris
On Sunday, December 2, 2012 8:41:49 AM UTC-5, Anthony wrote: Also, note that your solution will work specifically when using the generic.json view because that view does not require any of the response._vars values to be added to response._view_environment (because the view processes

[web2py] Re: a few comments on session handling

2012-12-02 Thread Chris
On Tuesday, April 5, 2011 1:08:54 PM UTC-4, VP wrote: My question is: in your locking policy above, what's the purpose of locking at all? If you don't lock during writes (e.g. when updating the counter), two writes might happen simultaneously and cause inconsistent results. There are

[web2py] Bug when rendering nested dictionaries as JSON? -- depends on specific values of keys

2012-12-01 Thread Chris
=dict(status='200 OK')) requesting ...test.json creates an error file in my app/err folder Traceback (most recent call last): File /Users/chris/dev/hsmaster/web2py_v1.99.7/gluon/main.py, line 508, in wsgibase serve_controller(request, response, session) File /Users/chris

[web2py] Re: Why does 'group' field cause web2py to stall?

2012-12-01 Thread Chris
That name is probably a reserved word in the database engine you're using. Every DBMS has a list of words that are off-limits for use as object (table, field, index, function etc.) names. GROUP is a pretty common one because of the GROUP BY operation. Take a look at gluon /

[web2py] Re: Integrated Development Environment with web2py

2012-11-24 Thread Chris
Since my original post, I've found a way to use Wing IDE reliably for remote servers. If anyone has need of this, write back and I will post the details. On Friday, June 8, 2012 11:44:33 AM UTC-4, Chris wrote: Wing is indeed a great tool. I use it for local-machine debugging all the time

Re: [web2py] Re: Has anyone configured web2py on the Basic Amazon Linux AMI?

2012-11-24 Thread Chris
Thanks, that works really well. On Saturday, August 27, 2011 2:55:01 PM UTC-4, nils wrote: Hi Chris, I do this ssh -i key.pem -L 8000:localhost:8000 root@amazon-Ec2-VPS I then run on the amazon instance ./web2py -a password You can then access web2py via http://localhost:8000

[web2py] Problem rewriting URL's non-www to www while using mod_wsgi

2012-10-02 Thread Chris
I have an Apache-WSGI-web2py configuration that is working well. Now I would like to add the behavior that requests on the bare domain (something.com/what/ever) is rewritten to use www (www.something.com/what/ever). In a generic Apache setup, this is easy using a rewrite condition + rewrite

[web2py] Re: Truncated Data on Migration

2012-09-14 Thread Chris
The main problem is that the truncation is done silently. In my case, we were creating new data models with fields like string(1000) and just recently a team member noted the result in the database was varchar(255). It violates the principle of least amazement :) that a directive to create

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

2012-08-28 Thread Chris
database. But changing just the password? Should not change the underlying identity of the database connection or database object definitions. (In my view of the world.) What do you think? Cheers -- Chris --

[web2py] Re: table auth_user already exists

2012-07-26 Thread Chris
I've found what seems a simple way to let multiple apps share a DB and create the same table definitions without conflict. Chris, you may find this useful and also I'd love to hear from the true experts if there are problems with this approach. (It works for me but maybe there are other

[web2py] Re: Working with custom form

2012-07-13 Thread Chris
Any further suggestion to what causes the error I'm seeing? Thanks!

[web2py] Re: Working with custom form

2012-07-13 Thread Chris
I really need to see the models where you set IS_STRONG. Somehow the value passed to the validator is not a string so the validator chokes. This can be fixed in IS_STRONG.__call__ by setting value = str(value) but I would like to understand why it is happening. Sure, this is the

[web2py] Re: Working with custom form

2012-07-09 Thread Chris
which web2py version? Do you have a custom auth_user table? Looks like something wrong with the list of validators for a field containing the IS_UPPER validator. This is on 1.99.7 stable. I do have two extra field to the auth_user table, and use a custom name instead of 'auth_user', but

[web2py] Re: Working with custom form

2012-07-08 Thread Chris
No, because the layout already includes a head section. The content of the view gets inserted in the layout.html file at the point of the {{include}}, which presumably is not in the head. The layout also include a body section, does this mean that in my custom view I shouldn't have

[web2py] Re: Working with custom form

2012-07-08 Thread Chris
Right, you don't need a body tag in the view either. In layout.html, there should be an {{include}} -- that gets replaced with the entire contents of the view that extends the layout. Cool. But is there way to configure the body tag of a specific view page that extends the 'layout.html'?

[web2py] Re: Working with custom form

2012-07-08 Thread Chris
Now I have the custom page (e.g. register) appears correctly, however, when I submit the form nothing happens - the form just clears itself with no error msg or anything. My 'register' action in controller is: def register(): return dict(form=auth.register()) My 'layout.html' is as

[web2py] Re: Working with custom form

2012-07-07 Thread Chris
{{=form.custom.begin}} #in between the opening and closing tags put in your normal html code and make sure the element names corresponds to the column names as defined in your database. web2py will handle the rest automatically. This is the most flexible way while still making use of

[web2py] Working with custom form

2012-07-03 Thread Chris
I've just started with web2py, so this might be obvious but I struggle to see how it works: I have a controller action which returns a form: def register(): return dict(form=auth.register()) I also have a view 'register.html' for this action, which is *self-contained * as it does NOT use

[web2py] Re: Is this a bug? Restrictions in model file names

2012-07-02 Thread Chris
You're right, this is true throughout web2py. On Wednesday, January 18, 2012 7:28:50 AM UTC-5, Chris wrote: Just had a little surprise -- feels like a bug to me but let's hear from the experts. Having read in the web2py book that models are executed in name-sort order, I changed

[web2py] Re: Strange value for HTTP_HOST when using ssh tunneling

2012-07-02 Thread Chris
Opened as issue #820 on 25-May-2012, see http://code.google.com/p/web2py/issues/detail?id=820 On Wednesday, May 23, 2012 10:03:04 PM UTC-4, Chris wrote: This seems like a problem in web2py or mod_wsgi -- or else I am confused. Would appreciate any pointers from the experts. I'm running

[web2py] web2py folder structure and security

2012-06-15 Thread Chris
We have had very good experiences with web2py. And now we are moving into a more locked-down production environment. This raises some new questions about security. I would like to make a suggestion. If this suggestion seems valuable then I would work with others to implement it. However an

[web2py] Re: Integrated Development Environment with web2py

2012-06-08 Thread Chris
Wing is indeed a great tool. I use it for local-machine debugging all the time and it has been a godsend. Question -- has anyone had luck setting up Wing for remote debugging of web2py processes on a different machine? I have been able to remotely debug simple Python scripts, but when I put

[web2py] Re: Errors creating/reading tickets

2012-06-07 Thread Chris
Following up on some of the clues others have suggested -- I have this problem when running web2py version 1.99.7 on Red Hat Enterprise 6.2 (very similar to CentOS) and mod_wsgi with Apache. Happy to provide copies of the error tickets if that would help with troubleshooting -- ? On

[web2py] Re: String EOF error

2012-06-06 Thread Chris
I have had a similar issue. Is there a resolution? On Wednesday, April 25, 2012 5:29:09 PM UTC-4, Bruce Wade wrote: Hi I randomly get a EOFError this doesn't always happen and I have no idea what is causing it. Traceback (most recent call last): File

[web2py] Welcome app / AddToAny integration question

2012-05-30 Thread Chris May
More of a curiosity on my part, but why does web2py promote AddToAny (by automatically including it with every new application)? Sure, it's easy enough to remove, but why is it in there in the first place?

[web2py] Strange value for HTTP_HOST when using ssh tunneling

2012-05-23 Thread Chris
This seems like a problem in web2py or mod_wsgi -- or else I am confused. Would appreciate any pointers from the experts. I'm running web2py 1.99.7 on a Red Hat (RHEL 6) server using Apache 2.2.15 and mod_wsgi 3.3. This is all running on a small virtual server at Amazon Web Services. Since

Re: [web2py] Configuring web2py with nginx - domain error (gaierror: [Errno -2] Name or service not known)

2012-05-16 Thread Chris
+= [socket.gethostname()] #socket.gethostbyname(http_host)] It looks like that line is just to check for the request is coming from the externally facing IP. Could that perhaps be wrapped in a try-catch block and the results cached? Thanks, Chris On Tuesday

[web2py] web2py book references: return invalid functions

2012-05-15 Thread Chris May
a link in markmin, and is triggering the creating of these invalid links. Is someone available to help? Chris May

[web2py] Dynamic Subdomain Routing

2012-05-05 Thread chris
Hi all, i'm trying to choose between frameworks for my new project and i'm liking what I see with web2py but currently flask is the only one i can find that will do what i need with routing / subdomains. basically, i'm trying to use the subdomain as the keyword I will run a database qurey on.

[web2py] Re: WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking still showing up

2012-04-20 Thread Chris
). On Monday, December 19, 2011 4:46:48 PM UTC-5, Chris wrote: (The first one is from Python started independently, the second from Eclipse and the running instance of my app.)

Re: [web2py] Re: Database design

2012-04-19 Thread Chris Rowson
Of course, silly me. Couldn't see the trees for the forest :-) Thank you Anthony. Chris On Thu, Apr 19, 2012 at 1:20 AM, Anthony abasta...@gmail.com wrote: db.property.property_type.writable = False Anthony On Wednesday, April 18, 2012 4:32:02 PM UTC-4, leftcase wrote: I've put

Re: [web2py] Re: Database design

2012-04-18 Thread Chris Rowson
Thanks for confirming this for me, this did seem to be the most sensible way to approach the problem :-) Chris On Wed, Apr 18, 2012 at 1:04 AM, simon simo...@gmail.com wrote: You can do this with a single form. At the top of the controller set readable=false, writable=false for the fields

Re: [web2py] Re: Database design

2012-04-18 Thread Chris Rowson
appears on the form. Any ideas why? Thank you, Chris On Wed, Apr 18, 2012 at 3:43 PM, Chris Rowson christopherrow...@gmail.comwrote: Thanks for confirming this for me, this did seem to be the most sensible way to approach the problem :-) Chris On Wed, Apr 18, 2012 at 1:04 AM, simon simo

[web2py] Database design

2012-04-17 Thread Chris Rowson
in advance, Chris

Re: [web2py] Re: Multiselect form and many-to-many relationship

2012-04-15 Thread Chris Rowson
Heh, no worries. :-) I wonder, just out of interest, is there any great performance difference between searching for records containing region.id 'x' (as below) rather than returning all rows with region.id 'x' from a junction table? Chris On Sat, Apr 14, 2012 at 11:34 PM, villas villa

[web2py] Multiselect form and many-to-many relationship

2012-04-14 Thread Chris Rowson
for a house. I wondered if anyone could give me any examples? Thanks in advance! Chris

Re: [web2py] Re: Multiselect form and many-to-many relationship

2012-04-14 Thread Chris Rowson
' for instance? I'm not an experienced user of development frameworks like this. Is it usually this difficult to accomplish this kind of thing? Seems to me it would be a pretty common requirement? Thanks in advance, :-) Chris On Sat, Apr 14, 2012 at 8:52 PM, villas villa...@gmail.com wrote: I

Re: [web2py] Re: Multiselect form and many-to-many relationship

2012-04-14 Thread Chris Rowson
Thank you again David, I shall give it a go. Chris On Sat, Apr 14, 2012 at 10:29 PM, villas villa...@gmail.com wrote: Yes, it would store the ids of the regions between vertical bars, something like this: |4|7|23|. So say you are looking for the house-types in China (which is id = 7

[web2py] Re: How to get pound sign in url or work around it?

2012-03-22 Thread Chris May
I might have missed something. Are you trying to move the viewport to the element with the id after the hash? If so, would you be able to use: document.location.hash = tabs=2; Does that work? On Wednesday, March 21, 2012 5:39:08 PM UTC-4, Cliff wrote: Thanks, Jonathan. I appreciate the

[web2py] Re: web2py site and disabling browser right clicks

2012-03-09 Thread Chris May
I agree with Wikus. Just by having a web site out in the public means just that. Don't publish anything that you wouldn't want printed in newspapers or announced to your grandmother. :) You may be different, but every one who has asked me to prevent users to view source code did not care

[web2py] Re: web2py site and disabling browser right clicks

2012-03-09 Thread Chris May
I'm sorry, Rahul. I may have misunderstood the reason behind your post, as I have heard similar requests in my time as a front-end developer. However, seeing that the site in your signature does potentially show sensitive information, the best thing I can recommend is to not send any more

[web2py] Re: What's the best way to throttle a web2py thread?

2012-03-06 Thread Chris
Interesting. I like the analogy in that StackOverflow post. I've been watching David's video from his previous talk on the GIL. It seems like unless a thread gives up the GIL somehow, it would be hard to have a long-running thread on one request without hanging up other threads. Using a separate

[web2py] Re: What's the best way to throttle a web2py thread?

2012-03-02 Thread Chris
Thanks for the suggestions, as well as helping with my somewhat ambiguous question :). I'll try time.sleep, and moving to tornado, as a belt-and-suspenders kind of approach. I am using rocket and didn't realize the GIL was an issue. Chris On Mar 2, 7:37 pm, Ricardo Pedroso rmdpedr...@gmail.com

Re: [web2py] Re: Photo Gallery

2012-02-24 Thread Chris Hawkes
Sent from my Samsung smartphone on ATT Anthony abasta...@gmail.com wrote: Lightbox is a client-side Javascript library and doesn't really have anything to do with web2py -- as long as you set it up properly, it should work with web2py (or any backend framework). If you show some code,

Re: [web2py] Re: Photo Gallery

2012-02-24 Thread Chris Hawkes
Noobmusic.com uses lightbox with Google app engine. You probably need to show us the entire page you are trying to get to work. Your problem is probably something to do with class names or JavaScript includes. Sent from my Samsung smartphone on ATT Anthony abasta...@gmail.com wrote:

[web2py] Re: I would like to learn Web2py but where do I start?

2012-02-23 Thread Chris May
One caveat: While I agree that w3schools is a helpful resource (as I use it as a regular reference), their examples do not promote best practices, most notably absent is unobtrusive JavaScript. I had to *unlearn much *of what I read on there. For more information and better resources, include

[web2py] Re: Server side validation with ajax but without form

2012-02-02 Thread Chris
Is there an equivalent of of validate_and_update for update_record?

[web2py] [OT] e-mail delivery strategies

2012-01-31 Thread Chris May
This is off-topic, but since a fair number of web2py users send e-mail from their applications, I thought this post from 37Signals might prove helpful to some. There were nearly 16 million e-mails sent from 37Signals' eight web applications in the last seven days. About 99.3% of them were

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

2012-01-23 Thread Chris May
This might be too late for your application, but I just saw this review of 12 MVC frameworks. http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/ Quoted from the page: Specifically, the following four features are very important to me: UI Bindings - I’m not just

[web2py] Re: Need help with drag-n-drop using jQuery

2012-01-20 Thread Chris May
Hello, Frank, Welcome to web2py! I am also relatively new to web application development. I threw your code into a new application, and I get very fast responses, usually in a fraction of a second. I don't know exactly why I have a dramatic difference in speed, but I do notice one thing that

[web2py] Is this a bug? Restrictions in model file names

2012-01-18 Thread Chris
Just had a little surprise -- feels like a bug to me but let's hear from the experts. Having read in the web2py book that models are executed in name-sort order, I changed the names of my model files to have more explicit ordering -- from db.py and appconfig.py to 100-db.py and 000- appconfig.py.

[web2py] Re: Python / web2py or.... the learning path?

2012-01-17 Thread Chris May
There are indeed a *lot* of PHP tutorials and articles out there. Most of them are of little value in general, or even misleading readers into bad practices (as referenced by Christian Heilmann in a recent post on Smashing

Re: [web2py] Re: New Site for web2py poweredby

2012-01-14 Thread Chris Hawkes
It looks a ton better, good job! On Sat, Jan 14, 2012 at 12:21 PM, Andrew Evans andrew.rusty...@gmail.comwrote: Hello I think I finished the styling :-) its not perfect I am sure :-P I think the green at the top of the thread could be replaced (if only I could find where in the style sheet

Re: [web2py] Re: controller question

2012-01-14 Thread Chris Hawkes
I broke the controllers into much smaller sizes. My site does not seem to be too much of a memory hog at this time. I will probably try to find ways of making it more efficient in the near future, but have tons of other stuff to do in the meantime. On Fri, Jan 13, 2012 at 4:45 PM, howesc

Re: [web2py] Re: Is it me or what?

2012-01-13 Thread Chris Hawkes
Thanks for all the comments and suggestions. There will be a major content fix over the weekend. I will fix many dead links and I am adding an additional 200 bands or so. I am also adding more dynamic content over the next couple of weeks. Sent from my Samsung smartphone on ATT Likit

[web2py] Controller file size question

2012-01-12 Thread Chris Hawkes
What is the largest advisable file size limit for a controller file using Google appengine? Sent from my Samsung smartphone on ATT

Re: [web2py] Need a instruction for Rating Plugin

2012-01-12 Thread Chris Hawkes
I did take a look at that myself. I find it much harder to figure out how to apply a plugin to my design then to just do it all over myself specific to my design. If you are beginner it will be a nightmare. You should prabably make your own with simple form variables using jquery and CSS to

[web2py] sessions2trash.py global name 'db' is not defined

2012-01-11 Thread Chris
Hello, (this may be a repost, having some technical trouble) I was trying to run sessions2trash and getting the following error: # python web2py.py -S init -R scripts/sessions2trash.py web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.99.2 (2011-09-26 06:55:33)

[web2py] sessions2trash.py global name 'db' is not defined

2012-01-11 Thread Chris
Hello, I am getting an error when I run the following script in my web2py directory: # python web2py.py -S init -R scripts/sessions2trash.py web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.99.2 (2011-09-26 06:55:33) stable Database drivers available: SQLite3,

[web2py] Re: sessions2trash.py global name 'db' is not defined

2012-01-11 Thread Chris
That did it, not sure why I missed it. Thanks much. On Jan 11, 3:23 pm, Jonathan Lundell jlund...@pobox.com wrote: On Jan 11, 2012, at 11:49 AM, Chris wrote: I am getting an error when I run the following script in my web2py directory: # python web2py.py -S init -R scripts

[web2py] Re: WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking still showing up

2011-12-19 Thread Chris
Here's what I've got: Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. import win32con win32con module 'win32con' from 'C:\Python26\lib\site-packages\win32\lib\win32con.pyc' The mystery gets

[web2py] Re: WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking still showing up

2011-12-19 Thread Chris
(The first one is from Python started independently, the second from Eclipse and the running instance of my app.)

[web2py] Re: haml and sass

2011-12-19 Thread Chris May
Curious. I've surprisingly not heard of haml. What would you say are the benefits over web2py's built-in HTML helpers? SASS could be quite helpful for us front-end guys, and I notice there are a couple of python modules out there. My opinion is that I don't know if it would need to be included

[web2py] Re: Backbonejs in web2py

2011-12-14 Thread Chris May
Nice example! I love how snappy the site navigation is. That is one benefit I expected from using backbone, with the potential for so much less data being transferred for view changes over normal page refreshes.

[web2py] WARNING:web2py.cron:WEB2PY CRON: Disabled because no file locking still showing up

2011-12-14 Thread Chris
\win32 C:\Python26\Lib\site-packages\win32\lib C:\Python26\Lib\site-packages\pythonwin Any ideas? Thanks! Chris

[web2py] Re: Massimo

2011-12-08 Thread Chris May
I second that! We are truly blessed to have so many great, patient and available contributors to the code and the community! Anthony, do you have the book memorized yet? :D

Re: [web2py] Re: Google Groups problem

2011-12-06 Thread Chris May
Thanks for the reminder for feedback! There were several times that Google Groups was telling me that x number of posts were updated, but showed all as read. I noticed that just before I read this post, they just pushed out an update to the Groups software. Hopefully that'll fix it.

[web2py] Configuring web2py with nginx - domain error (gaierror: [Errno -2] Name or service not known)

2011-12-05 Thread Chris
I'm using web2py with nginx, and I've experienced the following error on redeploying my app: socket.gethostbynamesocket.gethostbyname(http_host) File /var/ web2py/cow/gluon/main.py, line 396, in wsgibase socket.gethostbyname(http_host)] gaierror: [Errno -2] Name or service not

[web2py] Re: ttf and fonts

2011-12-02 Thread Chris May
It looks like you're going about it fairly well, but I also had issues with particular truetype fonts. Those issues went away after I changed which truetype font I used. This is the code that works for me: @font-face { font-family: myFont; src:

Re: [web2py] newbie question

2011-11-19 Thread Chris Hawkes
sorry guys i hit enter to soon, disregard this question On Sat, Nov 19, 2011 at 6:33 PM, chawk chrshawke...@gmail.com wrote: db.define_table('discussion', Field('comment', 'text')) def comment(): form = SQLFORM(db.discussion, _class='test1') if form.process().accepted:

[web2py] Using the same form in multiple pages

2011-11-14 Thread Chris
Hello, I'd like to make a login form and have it be accessible in multiple pages, without having to rewrite the same code in every single controller action: login_form = auth.login() if login_form.accepts(... Is this possible? Thanks, Chris

[web2py] Re: Using the same form in multiple pages

2011-11-14 Thread Chris
to do login_form.accepts(). So, just use auth.login() wherever you need it. Anthony On Monday, November 14, 2011 3:58:52 PM UTC-5, Chris wrote: Hello, I'd like to make a login form and have it be accessible in multiple pages, without having to rewrite the same code in every single

[web2py] Re: Using the same form in multiple pages

2011-11-14 Thread Chris
In / {{=top_login_form2.custom.end}} On Nov 14, 4:24 pm, Chris zuzfrexkg...@spammotel.com wrote: Cool, thanks guys. I do have decorators on certain login-only pages, but I want a page that's visible to both members and guests. The idea is to have a login form that shows up only under

[web2py] Re: Using the same form in multiple pages

2011-11-14 Thread Chris
()) View: {{=login_form # show it here}} ... {{=login_form # show it somewhere else}} Anthony On Monday, November 14, 2011 4:29:24 PM UTC-5, Chris wrote: After doing some more digging, it appears that each time you call auth.login(), you generate a new formkey. The first formkey

[web2py] changing default redirect after failed login attempt.

2011-11-10 Thread Chris Steel
other way? Thanks -- Chris

[web2py] customized the id field in sqlite

2011-10-27 Thread Chris
I a noob to web2py; so much so I'm not sure if I'm asking the right question! I'm trying to change the default behavior of the id field in my table. Instead of an auto-increment of 1, 2, 3, etc...I need it to auto-increment 11-01, 11-02, 11-03, etc. Even better it would be nice

[web2py] Check to establish whether or not a record exists

2011-10-10 Thread Chris Rowson
whether or not a record exists seems to work, the check to see whether or not the 'nearest' field within the record is populated doesn't seem to work. Can anyone tell me what I'm doing wrong please? Thank you, Chris

Re: [web2py] Re: Check to establish whether or not a record exists

2011-10-10 Thread Chris Rowson
Thank you Massimo :-) Chris On Mon, Oct 10, 2011 at 2:55 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: row = db.postcode_cache(postcode=postcode) if not row: db.postcode_cache.insert(postcode=postcode,nearset=nearest) elif not row.nearest: row.update_record(nearset=nearest) else

[web2py] To DAL or not to DAL, that is the question!

2011-10-08 Thread Chris Rowson
on doing that, but is there any particular reason I shouldn't just use db.executesql to perform my selects (because I find it easier)? I also understand that raw SQL queries are database specific but I don't mind, as I don't intend to move databases. Chris

Re: [web2py] Re: DAL - Selects

2011-10-08 Thread Chris Rowson
still learning all this stuff :-D Chris On Sun, Oct 2, 2011 at 7:38 AM, Chris Rowson christopherrow...@gmail.com wrote: Thanks Peter, I'll give that a try. Chris On Sep 30, 2011 8:01 PM, Peter Etchells peter.a.etche...@gmail.com wrote: results=db(db.data.belongs([p[1] for p in postcodes

Re: [web2py] Re: DAL - Selects

2011-10-08 Thread Chris Rowson
=~db.data.download) return dict(table=rows, message=postcodelist) On Sat, Oct 8, 2011 at 3:53 PM, Chris Rowson christopherrow...@gmail.com wrote: I finally used...    postcodelist=[]    closepostcodes=ukpostcodes.closest_postcodes(session.postcode, str(session.distance))    for p

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-08 Thread Chris Rowson
Thanks Massimo, I'm very new at this and found the DAL a bit intimidating. I'm beginning to get the hang of it now though so I'm sticking with it. I think I was trying to overthink it before when in actual fact, the more I try and get my head around it, the more sense it makes. Chris On Sat

[web2py] Re: Web2py/modj/tomcat

2011-10-06 Thread Chris Clark
the servlet's name to the path but I couldn't get it to work. Any ideas? Are you using snakefight to generate config files for modjy or creating by hand? Chris

[web2py] Re: Encryption/Decryption Modules

2011-10-04 Thread Chris Clark
://code.google.com/p/pytombo/source/browse/trunk/src/pytombo/chi_io.py if you want to take a look and see how to use either depending on availability. If you are on Linux, e.g. Ubuntu easy_install or apt-get should be an easy way to install the required dependencies. Chris

[web2py] Re: anyone using jython with web2py on production

2011-10-03 Thread Chris Clark
at the moment. Chris (note my email address has changed, the domain name is now Actian not Ingres) On Oct 3, 1:18 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: My experience is that it relays on the java regular expression parser instead of the python one and that result in difference

Re: [web2py] Re: DAL - Selects

2011-10-02 Thread Chris Rowson
Thanks Peter, I'll give that a try. Chris On Sep 30, 2011 8:01 PM, Peter Etchells peter.a.etche...@gmail.com wrote: results=db(db.data.belongs([p[1] for p in postcodes).select()

<    1   2   3   4   5   >