On Mar 30, 2012, at 1:58 AM, Simon Bushell wrote:
> Many thanks Jonathan. That did the trick.
Glad to hear it. Now that you've tested it, some color commentary for router
users.
> routers = dict(
> BASE = dict(
> default_application = 'shortener',
> ),
BASE might better be name
Many thanks Jonathan. That did the trick.
Thank you to everyone who helped out
S
On Friday, March 30, 2012 3:01:58 AM UTC+1, Anthony wrote:
>
> Thanks for the correction. I guess my version allows you to eliminate the
> app, controller, and function, but doesn't allow anything else in the u
Thanks for the correction. I guess my version allows you to eliminate the
app, controller, and function, but doesn't allow anything else in the url
in that case.
Anthony
On Thursday, March 29, 2012 8:34:19 PM UTC-4, Jonathan Lundell wrote:
>
> On Mar 29, 2012, at 11:33 AM, Simon Bushell wrote:
On Mar 29, 2012, at 11:33 AM, Simon Bushell wrote:
> This is a neat solution Anthony (actually, it was my original idea for
> solving this). however I seem to be getting the same error: invalid function
> (default/tcgata).
>
> Forgive me, is this code in the root-level routes.py? or a routes.py
Hmm, this is bizarre. I was aware of the reloading routes and it is still
not working. I even made a blank 'shortener' scaffold app and added the
routes.py from above at root level.
http://127.0.0.1/jujuju gives the same errors as above.
I'll muck about a bit more and see whats going wrong. I
>
> This is a neat solution Anthony (actually, it was my original idea for
> solving this). however I seem to be getting the same error: *invalid
> function (default/tcgata)*.
>
> Forgive me, is this code in the root-level routes.py? or a routes.py in *
> applications/shortener*?
>
> Should an
This is a neat solution Anthony (actually, it was my original idea for
solving this). however I seem to be getting the same error: *invalid
function (default/tcgata)*.
Forgive me, is this code in the root-level routes.py? or a routes.py in *
applications/shortener*?
Should anything else be in
Good point, Anthony. I forgot they are evaluated in order. So you can
declare them explicitly before the generic pattern and achieve the
same result. For bonus points, OP, you should make it RESTful like I
did with mine and then heavily leverage the default layout :) Mine's
currently up at the supe
>
> routes_in = (
> (r'^/?$', r'/app_name/default/index'),
> (r'^/(?P[^/]*)/?$', r'/app_name/default/index/\g'),
>
> )
>
>
> in your root-level routes.py The drawback is that you will lose access to
> all other apps (including admin) but that can
Having recently completed my own personal URL shortener app on web2py, the
trick was using pattern based routes at the root level. Actually, even for
a fairly complex work-related app we had to use the root-level routes.py as
well. Specially with an URL shortener, you want to have the URL as sma
10 matches
Mail list logo