Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#113 closed defect (fixed)

auto-reload broken in standalone WSGI server

Reported by: Jason Huggins Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords: auto reload
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Auto reload is broken in the new standalone server (http://www.djangoproject.com/weblog/2005/jul/18/local_server/)... Let's bring auto reload back.

The code for this borrow's from Peter Hunt and the CherryPy project (www.cherrypy.org), which in turn borrows from Ian Bicking's Paste (http://pythonpaste.org/)

We'll need to check on Paste and CherryPy's licenses to make sure this is all kosher.

Attachments (5)

autoreload.py (1.7 KB) - added by Jason Huggins 10 years ago.
This should stored in django/utils. This has only been tested with Python 2.4.1
server.py (1.4 KB) - added by Jason Huggins 10 years ago.
This should be stored in <yourapp>/scripts/ (see inline comments in the .py file for more info)
start.bat (32 bytes) - added by Jason Huggins 10 years ago.
A simple script for Windows to launch the django server. Should be stored in <yourapp>/scripts/
diff_output.txt (2.4 KB) - added by Jason Huggins 10 years ago.
Here's the new patch…
management.py (20.3 KB) - added by Jason Huggins 10 years ago.
Here's the new copy of management.py... (so you can more easily do a file compare if you want)

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by Jason Huggins

This should stored in django/utils. This has only been tested with Python 2.4.1

Changed 10 years ago by Jason Huggins

This should be stored in <yourapp>/scripts/ (see inline comments in the .py file for more info)

Changed 10 years ago by Jason Huggins

A simple script for Windows to launch the django server. Should be stored in <yourapp>/scripts/

comment:1 Changed 10 years ago by rmunn@…

Django is BSD-licensed. CherryPy is also BSD-licensed: http://www.cherrypy.org/wiki/CherryPyLicense. And Paste is under the PSF license, a BSD/MIT-style license: http://svn.pythonpaste.org/Paste/trunk/docs/Paste.txt. IANAL, but it sure looks to me like all the code-borrowing is perfectly kosher.

comment:2 Changed 10 years ago by Jason Huggins

Uploading the new patch for management.py, based on adrian's refactorings to django-admin

Changed 10 years ago by Jason Huggins

Here's the new patch...

Changed 10 years ago by Jason Huggins

Here's the new copy of management.py... (so you can more easily do a file compare if you want)

comment:3 Changed 10 years ago by Jason Huggins

Because of the new addition of the patch to management.py, feel free to delete server.py and start.bat from this ticket.

comment:4 Changed 10 years ago by adrian

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

(In [266]) Added auto-reload to standalone server! Fixes #113. Thanks very much to Jason Huggins for the patch.

comment:5 Changed 10 years ago by adrian

Fixed in [266]. Thanks a lot, Jason!

Note: See TracTickets for help on using tickets.
Back to Top