Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #663 (closed enhancement: wontfix)

Opened 13 years ago

Last modified 12 years ago

different browser launch behaviour between "tg-admin toolbox" and "start-project.py"

Reported by: mtreiber@… Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version:
Severity: normal Keywords:
Cc:

Description

When "tg-admin toolbox" is run, the server starts an firefox automatically opens the toolbox. However, when "python start-project.py" is run only the server starts. Could the capability be added so that start-project automatically open firefox (configured by an option in devcfg.py).

Change History

comment:1 Changed 13 years ago by godoy

  • Status changed from new to closed
  • Resolution set to wontfix

This isn't a good default specially for deploying your application. It might convenient while you're developing the app but not always.

You can stop the toolbox from opening a new browser by passing the "-n" switch:

tg-admin toolbox -n

The code that opens the browser and that can be added to your "start-project.py" is:

    def openbrowser(self):
        import webbrowser
        webbrowser.open("http://localhost:7654")

Simply call "openbrowser" when you want to open it. (Note that you'll have to adapt this to your script and to accept some kind of switch for opening or not a browser... Take a look at line 181 and the following ones at turbogears/command/base.py for more information on how to do that)

I'm marking this as "wontfix" but if you have strong feelings about this you can reopen this ticket.

Note: See TracTickets for help on using tickets.