Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread David Warnock
> > All I do to handle sub-domains is check to see if the sub-domain matches a > user sub-domain. For example: > > user = > db(db.auth_user.sub_domain==request.env.http_host.split('.')[0]).select().first() > or '' > That is almost exactly what I want. It is not routing in the sense of going to a d

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread David Warnock
Thanks that is great news. Dave -- Dave Warnock: http://42.blogs.warnock.me.uk Cycling Blog: http://42bikes.warnock.me.uk

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Jonathan Lundell
On Mar 22, 2011, at 3:53 PM, David Warnock wrote: > Is there any support for subdomains in either routing system? I couldn't see > any. > > I am thinking of what I think 37signals use > > http://clienta.myapp.com/users // list of all users for client A > http://clientb.myapp.com/users/

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread pbreit
All I do to handle sub-domains is check to see if the sub-domain matches a user sub-domain. For example: user = db(db.auth_user.sub_domain==request.env.http_host.split('.')[0]).select().first() or ''

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread David Warnock
Hi, Just looking again at the book. Is there any support for subdomains in either routing system? I couldn't see any. I am thinking of what I think 37signals use http://clienta.myapp.com/users // list of all users for client A http://clientb.myapp.com/users/dave // form for user dav

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Jonathan Lundell
On Mar 22, 2011, at 1:57 PM, Anthony wrote: > Thanks for the feedback. I think the new parameter-based system is probably > preferred in general because it's easier, but there are things it cannot do > that can only be done with the pattern-based system, so we probably need to > maintain good e

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread pbreit
I guess I was wondering if the two approaches could be consolidated into one file but perhaps that might be dangerous.

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Anthony
Thanks for the feedback. I think the new parameter-based system is probably preferred in general because it's easier, but there are things it cannot do that can only be done with the pattern-based system, so we probably need to maintain good examples for both. But perhaps we could at least inclu

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Keith Pettit
Thanks that helps me understand a bit better. Being a newbie I'd suggest just having the one example. When looking I didn't really know what the files were or that they are competing methods to do the same thing. Even if the naming is better like you suggest, it would still make me wonder

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Anthony
On Tuesday, March 22, 2011 2:27:52 PM UTC-4, Keith Pettit wrote: > > That worked. Thank you for the help. > > Just a note, in my default install of web2py there was a > router.example.py -AND- > routes.example.py > > In the examples there router.example.py had exactly what you suggested so

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Jonathan Lundell
On Mar 22, 2011, at 11:30 AM, Ross Peoples wrote: > I'm not quite sure what the deal is with that. I think one of the two files > is from the old routers file and just never got cleaned up. They're both available. The regex router (routes.example.py) is still available, and it can do things tha

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Keith Pettit
One other note. For both apache and web2py's built in webserver I had to restart them for the change to take effect. Just thought I'd mention that in case someone wonders why there change isn't showing. -Keith On Tue, Mar 22, 2011 at 1:30 PM, Ross Peoples wrote: > I'm not quite sure what the d

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Ross Peoples
I'm not quite sure what the deal is with that. I think one of the two files is from the old routers file and just never got cleaned up. On Mar 22, 2011, at 2:27 PM, Keith Pettit wrote: > That worked. Thank you for the help. > > Just a note, in my default install of web2py there was a > rout

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread pbreit
I presume those files will be consolidated at some point?

Re: [web2py] Re: web2py default application suggestion

2011-03-22 Thread Keith Pettit
That worked. Thank you for the help. Just a note, in my default install of web2py there was a router.example.py -AND- routes.example.py In the examples there router.example.py had exactly what you suggested so I tried that and renamed it to router.py which didn't work. I created a new file like