Hello Sam,
On 10 août 2015, at 11:34, Sam Cooke <[email protected]> wrote:
> I've thrown together a rough proof of concept[2] for runserver that uses
> watchdog to watch for changes/additions/deletions to python files recursively
> in the same directory as manage.py and restarts the server accordingly. It
> could easily be extended to handle translations.
Interesting proof of concept!
I had in mind a more invasive approach. To remove almost all supporting code
from Django, I’d like the implementation to look like:
(somewhere in the runserver command, with an hypothetical watchrun utility)
if autoreload:
cmd = sys.argv + ["--noreload"]
os.execlp("watchrun", "--include=*.py,*.mo", "--", *cmd)
Of course the actual implementation would have to be a bit smarter with the
include / exclude patterns in order to allow customization.
This would make the reloading tool required if you want runserver to autoreload.
--
Aymeric.
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/B6C92264-4D7E-411A-BD15-0F03D9C31F89%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.