#663: different browser launch behaviour between "tg-admin toolbox" and "start-
project.py"
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: anonymous
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: TurboGears | Version:
Severity: normal | Resolution: wontfix
Keywords: |
--------------------------------+-------------------------------------------
Changes (by godoy):
* status: new => closed
* resolution: => wontfix
Comment:
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.
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/663>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---