#31716: django-admin runserver mostly does not work on Windows
-------------------------------------+-------------------------------------
     Reporter:  Christian Ullrich    |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Management     |                  Version:  3.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:  Windows              |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tom Forbes):

 Replying to [comment:6 Carlton Gibson]:
 > > I think this has about as much chance of being accepted as would
 solving the problem properly by dropping all Windows support...
 >
 > 😀 We can't do that I'm afraid. (I'm just warming to it as it
 happens...)
 >
 > I see Tom has cc-d himself. Let's see if he has any thoughts... ;)

 My autoreloader-sense was tingling! I wonder if this has always been the
 case - the previous implementation was pretty much the same, but I see
 that Werkzeug has a partial workaround in their reloader:
 
https://github.com/pallets/werkzeug/blob/fc999a6262c847ad185ea3ffe0cc6f2e915a867a/src/werkzeug/_reloader.py#L69-L93

 I think we can take inspiration (read: shamelessly copy parts) their
 implementation as it seems to make sense, but I'd be interested to know
 why they don't handle `-script.py` companions.

 Lets be a bit generic here rather than hard-code anything to do with
 `django-admin.py`. If `sys.argv[0]` doesn't exist we check if `-script.py`
 exists, falling back to looking for `.exe` on Windows only. If we cannot
 find it we explode with a reasonable error message (what that is I cannot
 say!).

 I'll work on a patch, and i would appreciate it if someone on Windows
 could test it? :D

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31716#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6bcbded0ca95a48dc05b9fb23a16cab0%40djangoproject.com.

Reply via email to