Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed inaccuracy in runserver outpout. #88

Closed
wants to merge 2 commits into from

5 participants

@jpic

Using runserver looks like:

>>> ./manage.py runserver
Validating models...

0 errors found
Django version 1.4, using settings 'test_project.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

The problem is that if the port is already bound, it will look like:

>>> ./manage.py runserver
Validating models...

0 errors found
Django version 1.4, using settings 'test_project.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.

Which misleads the system administrator who may think that runserver
double bound that port.

With this patch, it looks like:

>>> ./manage.py runserver
Validating models...

 0 errors found
 Django version 1.5.dev20120521232858, using settings 'test_project.settings'
 Development server is starting at http://127.0.0.1:8000/
 Quit the server with CONTROL-C.
 Error: That port is already in use.

Which is accurate.

Credit to William Waisse for reporting the issue.

@jpic jpic Fixed inaccuracy in runserver outpout.
Using runserver looks like:

    >>> ./manage.py runserver
    Validating models...

    0 errors found
    Django version 1.4, using settings 'test_project.settings'
    Development server is running at http://127.0.0.1:8000/
    Quit the server with CONTROL-C.

The problem is that if the port is already bound, it will look like:

    >>> ./manage.py runserver
    Validating models...

    0 errors found
    Django version 1.4, using settings 'test_project.settings'
    Development server is running at http://127.0.0.1:8000/
    Quit the server with CONTROL-C.
    Error: That port is already in use.

Which misleads the system administrator who may think that runserver
double bound that port.

With this patch, it looks like:

    >>> ./manage.py runserver
    Validating models...

     0 errors found
     Django version 1.5.dev20120521232858, using settings 'test_project.settings'
     Development server is starting at http://127.0.0.1:8000/
     Quit the server with CONTROL-C.
     Error: That port is already in use.

Which is accurate.

Credit to William Waisse for reporting the issue.
6a4ac00
@jpic

Note that I did not open a ticket for this.

@adrianholovaty
Collaborator

I'm ambivalent about this change, but if we decide to accept it, we'd have to change the docs as well (which this current patch doesn't address).

@dbrgn

+1 for this change, makes sense to me. Updating the docs would be a simple matter of search-replace in grep -rli "Development server is running at" docs/.

@spookylukey
Collaborator

"the system administrator" - you're not using runserver in production, are you?

@jpic

Nope, I asked a system administrator to just give a try a django project of mine.

Thanks for your compassion.

@aaugustin
Owner

I committed a fix in 0412b7d.

@aaugustin aaugustin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 22, 2012
  1. @jpic

    Fixed inaccuracy in runserver outpout.

    jpic authored
    Using runserver looks like:
    
        >>> ./manage.py runserver
        Validating models...
    
        0 errors found
        Django version 1.4, using settings 'test_project.settings'
        Development server is running at http://127.0.0.1:8000/
        Quit the server with CONTROL-C.
    
    The problem is that if the port is already bound, it will look like:
    
        >>> ./manage.py runserver
        Validating models...
    
        0 errors found
        Django version 1.4, using settings 'test_project.settings'
        Development server is running at http://127.0.0.1:8000/
        Quit the server with CONTROL-C.
        Error: That port is already in use.
    
    Which misleads the system administrator who may think that runserver
    double bound that port.
    
    With this patch, it looks like:
    
        >>> ./manage.py runserver
        Validating models...
    
         0 errors found
         Django version 1.5.dev20120521232858, using settings 'test_project.settings'
         Development server is starting at http://127.0.0.1:8000/
         Quit the server with CONTROL-C.
         Error: That port is already in use.
    
    Which is accurate.
    
    Credit to William Waisse for reporting the issue.
Commits on Jun 6, 2012
  1. @jpic

    Reflect 6a4ac00 in docs

    jpic authored
This page is out of date. Refresh to see the latest.
View
2  django/core/management/commands/runserver.py
@@ -91,7 +91,7 @@ def inner_run(self, *args, **options):
self.validate(display_num_errors=True)
self.stdout.write((
"Django version %(version)s, using settings %(settings)r\n"
- "Development server is running at http://%(addr)s:%(port)s/\n"
+ "Development server is starting at http://%(addr)s:%(port)s/\n"
"Quit the server with %(quit_command)s.\n"
) % {
"version": self.get_version(),
View
2  docs/intro/tutorial01.txt
@@ -146,7 +146,7 @@ see the following output on the command line::
0 errors found.
Django version 1.4, using settings 'mysite.settings'
- Development server is running at http://127.0.0.1:8000/
+ Development server is starting at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
You've started the Django development server, a lightweight Web server written
Something went wrong with that request. Please try again.