Thanks Jonathan! Your answer worked! I've reloaded routes all the time, but I forgot it this time. :(
On Tuesday, July 24, 2012 12:05:04 AM UTC+8, Jonathan Lundell wrote: > > On 23 Jul 2012, at 8:56 AM, lyn2py wrote: > > Massimo is right. > > I updated the routes.py (now both files are exactly the same) and now a > different problem. > > This is my routes.py file: > > routers = dict( > BASE = dict( > default_controller = 'default', > default_function = 'index' > ), > myapp = dict( > default_controller = 'default', > default_function = 'home' > ) > ) > > > Note: I only have 1 controller (default.py), and the function (discussion) > is in that controller > > On the local server, > the URL > http > <http://127.0.0.1:8000/myapp/discussion/3/test-discussion>:<http://127.0.0.1:8000/myapp/discussion/3/test-discussion> > //127.0.0.1:8000/myapp/discussion/3/test-discussion<http://127.0.0.1:8000/myapp/discussion/3/test-discussion> > can access the webpage, no problem. > > On the production server, > http <http://productionurl.com/myapp/default/discussion/3/test-discussion> > : <http://productionurl.com/myapp/default/discussion/3/test-discussion> > //productionurl.com/myapp/<http://productionurl.com/myapp/default/discussion/3/test-discussion> > *default<http://productionurl.com/myapp/default/discussion/3/test-discussion> > */discussion/3/test-discussion<http://productionurl.com/myapp/default/discussion/3/test-discussion> > Note that on the production server, it requires "default" to access the > webpage, otherwise (if without the "default" in the URL), the error is > invalid controller (discussion/3) > > What should I do? Thanks. > > > At first glance it looks like your routes are not being activated on the > production system for some reason. If you recently changed routes.py, did > you restart the server, or reload the routes? > > Where does http://productionurl.com/myapp/ get routed to? index or home? > > Finally, double-check that there's no discussion.py in your > myapp/controllers directory. > --

