Hi Doug,
You can add your "something" controller to your root controller like
this:
from something import SomethingController #import your controller
class RootController(BaseController):
...
#other controllers here
something = SomethingController() #<-- makes your controller
appear
...
# and then methods
Then you should be able to see the index method of SomethingController
at http://mysite.com/something
Other methods of the something controller can be reached with
something like this:
http://mysite.com/something/other_method
Antti
On 15 marras, 00:23, writeson <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've installed Turbogears 1.9.7 in a virtualenv on our Linux
> development machine and have been experimenting with it. One thing I'm
> stumped about is adding a new controller. When I do this:
>
> paster controller something
>
> It creates a new controller called something.py in my controllers
> directory. But after that I'm confused. When I try to navigate
> tohttp://mysite.com/somethingI get a 404 error. I've done some googling
> around and everything I see confuses me more. The hits talk about
> adding a map... item to config/routes.py, but I have no routes.py in
> my project. They also talk about doing something similar (and a lot
> more) in config/environment.py. Can anyone direct me to the right
> thing to do to make new controllers active in a TG2 project?
>
> Thanks!
> Doug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---