Discussion:
Cannot Get Trivial routes.py Working
Art Zemon
2011-01-23 17:19:44 UTC
Permalink
Help! I feel like a dolt. I have a trivial routes.py installed in
DOCROOT/web2py/routes.py:

#!/usr/bin/python
default_application = 'gotosigns'
default_controller = 'default'
default_function = 'invalid'

If I visit https://web2py.hens-teeth.net/ , I end up at
https://web2py.hens-teeth.net/welcome/default/index instead of at
.../gotosigns/default/invalid

What am I doing wrong???
How do you debug routes.py?

Thanks,
-- Art Z.
Kenneth Lundström
2011-01-23 17:37:51 UTC
Permalink
As it was my first error IŽll pass it on to you. What version of web2py
are you using. If not trunk then the new router does not work as it is
in beta still.

Otherwise willŽll have till wait for more wiser guys.


Kenneth
Post by Art Zemon
Help! I feel like a dolt. I have a trivial routes.py installed in
#!/usr/bin/python
default_application = 'gotosigns'
default_controller = 'default'
default_function = 'invalid'
If I visit https://web2py.hens-teeth.net/ , I end up at
https://web2py.hens-teeth.net/welcome/default/index instead of at
.../gotosigns/default/invalid
What am I doing wrong???
How do you debug routes.py?
Thanks,
-- Art Z.
Jonathan Lundell
2011-01-23 17:39:17 UTC
Permalink
This is an older feature. Should work.
As it was my first error IÂŽll pass it on to you. What version of web2py are you using. If not trunk then the new router does not work as it is in beta still.
Otherwise willÂŽll have till wait for more wiser guys.
Kenneth
Post by Art Zemon
#!/usr/bin/python
default_application = 'gotosigns'
default_controller = 'default'
default_function = 'invalid'
If I visit https://web2py.hens-teeth.net/ , I end up at https://web2py.hens-teeth.net/welcome/default/index instead of at .../gotosigns/default/invalid
What am I doing wrong???
How do you debug routes.py?
Thanks,
-- Art Z.
Jonathan Lundell
2011-01-23 17:38:02 UTC
Permalink
Did you restart web2py?

A quick test is to insert a Python syntax error to make sure the file is being processed.
Post by Art Zemon
#!/usr/bin/python
default_application = 'gotosigns'
default_controller = 'default'
default_function = 'invalid'
If I visit https://web2py.hens-teeth.net/ , I end up at https://web2py.hens-teeth.net/welcome/default/index instead of at .../gotosigns/default/invalid
What am I doing wrong???
How do you debug routes.py?
Thanks,
-- Art Z.
Art Zemon
2011-01-23 17:50:25 UTC
Permalink
Post by Jonathan Lundell
Did you restart web2py?
Jonathan,

That was it, THANK YOU! A quick Apache restart cured my ills. I didn't
realize that, when running web2py behind WSGI, the routes.py file was
only read once.

-- Art Z.
--
Art Zemon, President
Hen's Teeth Network <http://www.hens-teeth.net/>
The source of reliable, secure e-commerce web hosting
<http://www.hens-teeth.net/html/hosting/ecommerce_hosting.php>
Phone: (866)HENS-NET or (636)447-3030 ext. 200
Loading...