Thank you all for your replies. Problem solved!
Kind regards,
Annet
The "hashbang" ("#!") is for a very specific purpose where your whole page
is coded in JavaScript. It was sort of popularized by Twitter who is
actually now abandoning it. I'm not sure why you would want to use it.
If you have your routes set up with a default app and default controller,
you co
>
> ... in router.example.py? In my case default_application = 'init',
> default_controller = 'default' and default_function = 'index' What do you
> mean by 'and specify the list of available functions in the default router'
> . My application contains 15 controllers and almost 100 functions,
Hi Anthony,
I read the relevant part of the book:
http://www.web2py.com/books/default/chapter/29/4?search=url+rewrite#Parameter-based-system
and had a look at router.example.py file, I am not sure I completely
understand the solution you provided me with.
If you use the parameter-based rewrit
If you use the parameter-based rewrite system to set a default app,
controller, and function and specify the list of available functions in the
default router, then in http://yourdomain.com/code/shortname, code and
shortname will be interpreted as request.args[1:2], with the request being
route
Hi Anthony,
Thanks for your reply. I considered a similar solution, but stranded on the
idea that the code replacing the '...' in the url are in place of the
application name. Isn't that right?
I thought of catching the code in place of the '...' in the routes.py file
in the web2py base folde
I guess you could make the ... any legal controller name, and then either
use web2py URL rewrite to catch it and route to a particular function to do
what you want, or in a model, do something like:
if request.controller = [your 2-3 letter code]:
shortname = request.function
[code to det
Hi Anthony,
Thanks for your explanation of the hashbang url.
-- However, the result will be returned as an Ajax response, so it won't
replace the entire page with the new page -- is that what you're trying to
do?
Not exactly. For instance I have a user with the shortname janvermeer, when
so
>
> What I would like is to redirect mydomain.com/#!/ to a router
> function which:
>
That's a hashbang URL. Note, in a URL including a "#", nothing after the
"#" is actually sent to the server. So, you have to capture the click on
the client side via Javascript, and then send an Ajax request
9 matches
Mail list logo