django-devserver icon indicating copy to clipboard operation
django-devserver copied to clipboard

Make autoreload work under Django >= 1.8

Open delinhabit opened this issue 9 years ago • 0 comments

Currently if you have a syntax error in any of your files the application and you used non-standard runserver arguments (ie. --wsgi-app) it will crash the running server with the following error:

Using WSGI application 'common.wsgi'
usage: manage.py runserver [-h] [--version] [-v {0,1,2,3}]
                           [--settings SETTINGS] [--pythonpath PYTHONPATH]
                           [--traceback] [--no-color] [--ipv6] [--nothreading]
                           [--noreload]
                           [addrport]
manage.py runserver: error: unrecognized arguments: --wsgi-app=common.wsgi

This PR fixes the issue by patching get_commands to always return the runserver command from the devserver package. The patch is only applied to Django>=1.8

delinhabit avatar May 04 '16 23:05 delinhabit