[web2py] Re: How to get rid if the /init/default/ in the URL?

2019-09-26 Thread Maurice Waka
I think this is what I wanted. routers = dict( BASE=dict( default_application='myapp', default_controller='default', default_function='index', functions=dict( default=['list', 'of', 'functions', 'in', 'default.py'], foo=['list', 'of',

Re: [web2py] Re: How to get rid if the /init/default/ in the URL?

2019-09-03 Thread Lovedie JC
Ok. I meant hide them. Regards On Tue, 3 Sep 2019, 10:06 Dave S wrote: > > > On Saturday, August 31, 2019 at 4:58:49 AM UTC-7, Maurice Waka wrote: >> >> Hi >> This is a very good discussion. >> I followed it and it worked for me. >> However, I have multiple controllers with different views, How

[web2py] Re: How to get rid if the /init/default/ in the URL?

2019-09-03 Thread Dave S
On Saturday, August 31, 2019 at 4:58:49 AM UTC-7, Maurice Waka wrote: > > Hi > This is a very good discussion. > I followed it and it worked for me. > However, I have multiple controllers with different views, How can I make > it (HIDE ALL CONTROLLER NAMES) for all pages. > Say what? How do

[web2py] Re: How to get rid if the /init/default/ in the URL?

2019-08-31 Thread Maurice Waka
Hi This is a very good discussion. I followed it and it worked for me. However, I have multiple controllers with different views, How can I make it (HIDE ALL CONTROLLER NAMES) for all pages. So far it only works for default/index Kind regards On Friday, November 3, 2017 at 2:31:00 PM UTC+3,

[web2py] Re: How to get rid if the /init/default/ in the URL?

2018-06-22 Thread Alexander
You can solve this probem by adding the sitemap.xml and the robots.txt to the routes.examply.py in /home/your_app_name/application/init/routes.example.py routes_in=( ('.*:/favicon.ico','/init/static/favicon.ico'), ('.*:/robots.txt','/init/static/robots.txt'),

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-03 Thread Anthony
On Thursday, November 2, 2017 at 9:47:35 PM UTC-4, Joe wrote: > > Yes, this is how the structure should look like, but it seems > pythonanywhere doesn't allow me to setup the structure this way. > > If I try to use this path to install a new app: > /home/username/web2py/applications > > > I get

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-02 Thread Joe
Yes, this is how the structure should look like, but it seems pythonanywhere doesn't allow me to setup the structure this way. If I try to use this path to install a new app: /home/username/web2py/applications I get this pythonanywhere error msg during the process: Enter the path for a new

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-02 Thread Anthony
On Thursday, November 2, 2017 at 5:54:41 AM UTC-4, Joe wrote: > > In pythonanywhere you have to create a folder first before you install the > app. > So you mean, it should be* /web2py/applications/my_app_directory/init* > No -- the folder structure is: /web2py /applications /init

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-02 Thread Joe
In pythonanywhere you have to create a folder first before you install the app. So you mean, it should be* /web2py/applications/my_app_directory/init* On Thursday, November 2, 2017 at 10:05:13 AM UTC+8, Anthony wrote: > > In any case, can you advise me on how to fix this problem? My directory

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-01 Thread Anthony
> > Btw, on the web2py.com website I see a similar problem. When you first go > to the web2py site you land on this URL: http://web2py.com/ then after > you visit an other page and then go back to the index page, the URL changes > to this:http://web2py.com/init/default/index > It's possible

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-01 Thread Anthony
> > In any case, can you advise me on how to fix this problem? My directory > structure is clearly wrong: > /home/username/web2py/applications/my_app_directory/applications/init > > Can you please post how the correct structure should look like on > pythonanywhere? > It should just be the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-11-01 Thread Joe
Hi Anthony, It seems my problem is the directory structure setup on pythonanywhere. But, I just followed the pythonanywhere system of installing web2py apps, I didn't actually create the directory structure myself. Btw, on the web2py.com website I see a similar problem. When you first go to

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-24 Thread Joe
Hi Dave, Thanks for your reply. No, I am not using this directory structure for source control reasons. I guess, I was a little bit confused when I initially set up the account. So, this is a mess. What would be the easiest way to fix this? I wonder if I have to start from scratch with the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-23 Thread Dave S
On Monday, October 23, 2017 at 8:00:29 PM UTC-7, Joe wrote: > > Hi Anthony, > > My file structure on pythonanywhere looks like this: > > > /home/username/web2py/applications/my_app_directory/applications/init > > *init* being the app name. > > > The book doesn't mention using extra levels of

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-23 Thread Joe
Hi Anthony, My file structure on pythonanywhere looks like this: /home/username/web2py/applications/my_app_directory/applications/init *init* being the app name. In the web2py directory, I have a routes.py file which contains this code: routers = dict( BASE = dict(

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-15 Thread Anthony
On Friday, October 13, 2017 at 7:22:42 PM UTC-4, Joe wrote: > > Hi Dave, I have reloaded the apps in web2py if that's what you mean. I > can't restart web2py, I can only reload the apps, I guess. > Is there an other way on pythonanywhere? I mean, restarting web2py instead > of reloading the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-15 Thread Anthony
On Friday, October 13, 2017 at 5:12:13 AM UTC-4, Joe wrote: > > Thanks very much Anthony for all your help with this one. I copied the > exact code you posted but nothing changed. > > I wonder if this has to do with having multiple apps in the web2py > directory. > No, the above example also

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-14 Thread Dave S
On Friday, October 13, 2017 at 4:22:42 PM UTC-7, Joe wrote: > > Hi Dave, I have reloaded the apps in web2py if that's what you mean. I > can't restart web2py, I can only reload the apps, I guess. > Is there an other way on pythonanywhere? I mean, restarting web2py instead > of reloading the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-13 Thread Joe
Hi Dave, I have reloaded the apps in web2py if that's what you mean. I can't restart web2py, I can only reload the apps, I guess. Is there an other way on pythonanywhere? I mean, restarting web2py instead of reloading the apps? *Re: robots.txt* If I put robots.txt in my static folder the URL

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-13 Thread Dave S
On Friday, October 13, 2017 at 2:12:13 AM UTC-7, Joe wrote: > > Thanks very much Anthony for all your help with this one. I copied the > exact code you posted but nothing changed. > Did you restart web2py? The routes file isn't normally reloaded while the server is running. > > I wonder if

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-10-13 Thread Joe
Thanks very much Anthony for all your help with this one. I copied the exact code you posted but nothing changed. I wonder if this has to do with having multiple apps in the web2py directory. I just can't fix this issue no matter what I do. Btw, even if I was to manage somehow to get rid off

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-18 Thread Anthony
FYI, here is a Pythonanywhere app with routing working as expected (the app is named "init"): https://w2ptest.pythonanywhere.com/ Below are the exact contents of the /web2py/routes.py file for the above installation: routers = dict( BASE = dict( default_application='init' ),

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-18 Thread Anthony
On Monday, September 18, 2017 at 9:30:26 AM UTC-4, Joe wrote: > > Thanks Anthony, when you say "*specify the functions in the default > controller* ", what do you mean exactly? I just want to make sure I > understand you correctly. > See

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-18 Thread Joe
Thanks Anthony, when you say "*specify the functions in the default controller* ", what do you mean exactly? I just want to make sure I understand you correctly. When I go to http://mydomain.com I don't have the *init/default/ *in the URL. But, when I click to go to

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Anthony
First, you can just put all the router code in /web2py/routes.py -- no need for anything specific in the app folder. Second, you need to specify the functions in the default controller if you want /default/index to be gone when there are any request.args. How are your URLs being generated?

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Joe
Yes, I reloaded the app. Nothing happens, it doesn't change the URL. I tried several different ways to change the routes.py. In the current situation in the *web2py* folder I have this in the* routes.py* file: routers = dict( BASE = dict(default_application='init'), ) Then, in the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-17 Thread Anthony
Did you reload routes or restart the server? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-16 Thread Joe
Hello Anthony, Thanks very much for your reply. Yes, I tried this in the routes,py file in the web2py folder on Pythonanywhere and tried several other ways from the link you posted but nothing changed in the URL. I think even this should work too, but it doesn't: routers = dict( BASE =

[web2py] Re: How to get rid if the /init/default/ in the URL?

2017-09-15 Thread Anthony
See http://web2py.com/books/default/chapter/29/04/the-core#Parameter-based-system. In routes.py, something like: routers = dict( BASE = dict( default_application='init', default_controller='default', default_function='index' ), init = dict(