Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Alec Taylor
On Tue, Jun 26, 2012 at 12:59 AM, Jonathan Lundell wrote: > On Jun 25, 2012, at 7:48 AM, Alec Taylor wrote: >> >> print auth.settings.login_next >> /default/profile > > Is it possible that you have a file controllers/profile.py? >.< That was the case. I thought I'd renamed everything to profile2

Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Jonathan Lundell
On Jun 25, 2012, at 7:48 AM, Alec Taylor wrote: > > print auth.settings.login_next > /default/profile Is it possible that you have a file controllers/profile.py? If you do, the router will not omit 'default' in the above case because it would be ambiguous. > > On Mon, Jun 25, 2012 at 11:37 P

Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Jonathan Lundell
On Jun 25, 2012, at 7:48 AM, Alec Taylor wrote: > > print auth.settings.login_next > /default/profile Would you also print the direct result of a separate URL call, with %s? Thanks. > > On Mon, Jun 25, 2012 at 11:37 PM, Jonathan Lundell wrote: >> On Jun 25, 2012, at 6:07 AM, Jonathan Lundell w

Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Alec Taylor
print auth.settings.login_next /default/profile On Mon, Jun 25, 2012 at 11:37 PM, Jonathan Lundell wrote: > On Jun 25, 2012, at 6:07 AM, Jonathan Lundell wrote: >> >> On Jun 24, 2012, at 11:26 PM, Alec Taylor wrote: >>> >>> Hmm, I'm not sure. >>> >>> I'm running the latest trunk from github: >>>

Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Jonathan Lundell
On Jun 25, 2012, at 6:07 AM, Jonathan Lundell wrote: > > On Jun 24, 2012, at 11:26 PM, Alec Taylor wrote: >> >> Hmm, I'm not sure. >> >> I'm running the latest trunk from github: >> https://github.com/web2py/web2py - If that makes a difference. >> >> Yes, the /profile/ URL is the one giving me

Re: [web2py] How to remove 'default' from all URLs?

2012-06-25 Thread Jonathan Lundell
On Jun 24, 2012, at 11:26 PM, Alec Taylor wrote: > > Hmm, I'm not sure. > > I'm running the latest trunk from github: > https://github.com/web2py/web2py - If that makes a difference. > > Yes, the /profile/ URL is the one giving me trouble. It could be > something on the facebook side, though I'm

Re: [web2py] How to remove 'default' from all URLs?

2012-06-24 Thread Alec Taylor
Hmm, I'm not sure. I'm running the latest trunk from github: https://github.com/web2py/web2py - If that makes a difference. Yes, the /profile/ URL is the one giving me trouble. It could be something on the facebook side, though I'm not sure. On Mon, Jun 25, 2012 at 7:04 AM, Jonathan Lundell wro

Re: [web2py] How to remove 'default' from all URLs?

2012-06-24 Thread Jonathan Lundell
On Jun 24, 2012, at 2:02 PM, Jonathan Lundell wrote: > > On Jun 24, 2012, at 1:38 PM, Jonathan Lundell wrote: >> >> On Jun 24, 2012, at 9:30 AM, Alec Taylor wrote: >>> >>> To be as clear as possible, here is a gist containing all the files I >>> changed (for a test-case) since creating this "sim

Re: [web2py] How to remove 'default' from all URLs?

2012-06-24 Thread Jonathan Lundell
On Jun 24, 2012, at 1:38 PM, Jonathan Lundell wrote: > > On Jun 24, 2012, at 9:30 AM, Alec Taylor wrote: >> >> To be as clear as possible, here is a gist containing all the files I >> changed (for a test-case) since creating this "simple new project": >> >> https://gist.github.com/61a6b9f8e71f70

Re: [web2py] How to remove 'default' from all URLs?

2012-06-24 Thread Jonathan Lundell
On Jun 24, 2012, at 9:30 AM, Alec Taylor wrote: > > To be as clear as possible, here is a gist containing all the files I > changed (for a test-case) since creating this "simple new project": > > https://gist.github.com/61a6b9f8e71f706e4255 I installed that app under 1.99.7 (I had to disable sig

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 11:57 AM, Alec Taylor wrote: > In my models/db.py I have this line: > > auth.settings.login_next = URL(f='profile') You might want to explicitly set the controller on that line, unless you have only one controller. As a practical matter it may not be an issue, since it's qui

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
In my models/db.py I have this line: auth.settings.login_next = URL(f='profile') The profile function is defined in controllers/default.py On Sat, Jun 23, 2012 at 4:46 AM, Jonathan Lundell wrote: > On Jun 22, 2012, at 11:00 AM, Alec Taylor wrote: >> >> (just tried that, didn't work) - Looking f

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 11:00 AM, Alec Taylor wrote: > > (just tried that, didn't work) - Looking forward to when you get the > chance to pass it through unit-tests :) OK, I tried it and it seemed to work OK. Here's my test case: router = dict( BASE = dict( default_

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
(just tried that, didn't work) - Looking forward to when you get the chance to pass it through unit-tests :) On Sat, Jun 23, 2012 at 3:06 AM, Jonathan Lundell wrote: > On Jun 22, 2012, at 10:02 AM, Alec Taylor wrote: >> >> I got a syntax error on your last code modification (pointing out the >> =

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 10:02 AM, Alec Taylor wrote: > > I got a syntax error on your last code modification (pointing out the > = on social=). My dumb mistake; you need a comma after the BASE dict: routers = dict( BASE=dict( default_application='social', ), social=dict( functions

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
I got a syntax error on your last code modification (pointing out the = on social=). And yes, I have restarted the server. (I even rebooted my machine [for an unrelated reason]) Still being directed to http://brian.com/default/profile#_=_ rather than http://brian.com/profile On Sat, Jun 23, 2012

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 7:29 AM, Alec Taylor wrote: > > I modified the route.py as you suggested: > > routers = dict( >BASE=dict( >default_application='social', >functions = ['index', 'profile', 'user'], >) > ) > > Yet the URL continues to present at: http://brian.com/default

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
(brian.com is an entry in my /etc/hosts pointing to 127.0.0.1 as a workaround for localhost with Facebook OAuth2) On Sat, Jun 23, 2012 at 12:29 AM, Alec Taylor wrote: > I modified the route.py as you suggested: > > routers = dict( >    BASE=dict( >        default_application='social', >        fu

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
I modified the route.py as you suggested: routers = dict( BASE=dict( default_application='social', functions = ['index', 'profile', 'user'], ) ) Yet the URL continues to present at: http://brian.com/default/profile#_=_ On Sat, Jun 23, 2012 at 12:15 AM, Jonathan Lundell w

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 7:06 AM, Alec Taylor wrote: > Just tried that, it's still prepending the URL with "default". > > E.g.: http://localhost/default/profile rather than http://localhost/profile If you want the router to omit the default controller when you specify a non-default function, then you

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
Just tried that, it's still prepending the URL with "default". E.g.: http://localhost/default/profile rather than http://localhost/profile On Fri, Jun 22, 2012 at 10:57 PM, Jonathan Lundell wrote: > On Jun 22, 2012, at 3:08 AM, Alec Taylor wrote: >> >> My web2py\routes.py: >> >> routers = dict(

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 3:08 AM, Alec Taylor wrote: > > My web2py\routes.py: > > routers = dict( BASE=dict( default_application='social', > default_controller='default', default_function='index' ) ) > myapps = ['social'] > routes_in = [ > ('/admin/$anything', '/admin/$anything'), > ] > for app in my

[web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
My web2py\routes.py: routers = dict( BASE=dict( default_application='social', default_controller='default', default_function='index' ) ) myapps = ['social'] routes_in = [ ('/admin/$anything', '/admin/$anything'), ] for app in myapps: routes_in += [ ('/%s/static/$anything' % app, '/%s/static/