Anyone know if it's possible to create irregular controller names in
Turbogears. Or aliases.
I'm basically wanting to emulate a legacy interface with my app, which
means that I need to support a URL of the form
http://mysite.com/opt_out.php?email=address&pass=secret
Can I do this somehow?
Thanks,
Stuart
You can define a "default" method in your Root controller. Something
like:
class Root(RootController):
class default(self, *args, **kw):
args = list(args)
try:
atom = args.pop(0)
except KeyError:
raise cherrypy.NotFound
if atom == "opt_out.php":
return self.aliased_method(*args, **kw)
raise cherrypy.NotFound
HTH,
Alberto