[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-29 Thread 98ujko9
I use the stock Rocket server that comes with web2py and I restart it after changing the routes.py. I must say that I don't fully understand the big picture of how the apps the compiler and the operating system cooperate. One time I uploaded a site to GAE with two separate apps but the tables

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-29 Thread Anthony
Using the same routes, I cannot replicate the generated URLs you observe. Make sure you reload routes (via admin) or restart the web server. Also, do you really need a separate init app and notes app? Especially the init app -- what is it doing? If it just provides a single home page, that

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
I removed routes_in and routes_out. The routes.py file in the site's root looks like so: routers = dict( # base router BASE=dict( default_application='init', ), stock=dict( default_function='index', functions=dict(

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread Anthony
First, get rid of routes_in/routes_out -- they will not work in conjunction with "router". Regarding "default" in the URL -- how are you generating the URL. You can always add default_controller="default", but that should not be necessary, as "default" is the default value for

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
Big thank you! This works. One little detail emerged though. Now that I replaced the pattern router.py (having my line in routes_out as above) in my site root with the parameter rewrite method my URL shows 'default': https://192.168.1.25:8000/stock

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread Anthony
On Monday, August 28, 2017 at 10:05:27 AM UTC-4, 98uj...@gmail.com wrote: > > No, the name 'index' withing 'showcase' is idle. > Then just use the parameter-based rewrite system with a configuration like this: routers = dict( stock=dict( default_function='index',

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
No, the name 'index' withing 'showcase' is idle. On Monday, August 28, 2017 at 9:56:13 AM UTC-4, Anthony wrote: > > Do you have a /showcase/index function? > > On Monday, August 28, 2017 at 2:03:40 AM UTC-4, 98u...@gmail.com > wrote: >> >> I chose pattern-based rewrite because I don't know

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread Anthony
Do you have a /showcase/index function? On Monday, August 28, 2017 at 2:03:40 AM UTC-4, 98uj...@gmail.com wrote: > > I chose pattern-based rewrite because I don't know better. I am temporary > part time web coder relying on web2py book 100% with understanding at about > 60%. Being a mature

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-28 Thread 98ujko9
I chose pattern-based rewrite because I don't know better. I am temporary part time web coder relying on web2py book 100% with understanding at about 60%. Being a mature person I am fond of eloquence in life as well as in URL's however complexity has its price. I sense from what you are

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread 98ujko9
I chose pattern-based rewrite because I don't know better. Please know that I am only temporary part time web coder relying on web2py book 100% with understanding at about 60%. Being a mature person I am fond of eloquence in life as well as in URL's however complexity has its price. I sense

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread Anthony
Got it. Next, provide more detail regarding your current code/setup. Is there any particular reason you need to be using the pattern-based rewrite system? If so, you'll just need to create a regex that matches the route in question, or create a regex that matches all the other possible

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread 98ujko9
I could make "asset" function the default for the "showcase" controller however I am not sure how as I am already using renamed routes.patterns.example.py in the root of the website (multiple apps) to rewrite one URL (works nicely): routes_out = ( ('/stock/default/index','/stock'),# <== my

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread Anthony
On Saturday, August 26, 2017 at 4:05:59 PM UTC-4, 98uj...@gmail.com wrote: > > How can I rewrite the URL (to drop asset): > > https://192.168.1.25:8000/stock/showcase/asset/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1 > to look like: > >

[web2py] Re: how to rewrite an URL to drop a function name showing in the address bar

2017-08-27 Thread Alfonso Serra
A solution would be to use routes.py in there you can place something like routes_in = [ ('/stock/showcase/$anything', '/stock/showcase/index/$anything') ] and use the index function to do whatever you like with the view. You redirect everything through the index function so you wont be able to