Skip to main content

Django runserver replacement that reuses its listening socket on reload

Project description

This is a drop-in replacement for Django’s runserver command for the impatient.

Django’s development server restarts itself whenever it detects a change in any loaded module, which is great. What’s not so great is that during the restart, there is a window of time where, if you’re like me, you’d be hitting Ctrl+R key repeatedly on the browser only to be greeted with ECONNREFUSED because the server is not ready.

Django-pserver solves this problem by reusing the listening socket when it restarts, so you can just hit refresh once and wait (retaining your sanity.)

Usage

To use it, simply add pserver to your INSTALLED_APPS, and run manage.py runserver as usual.

TODO

I’ve tested this on Django 1.2.4 and 1.3, but it could well work with other versions.

Tested on OS X only, but should work on any UNIX variant. It will probably break horribly on Windows.

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-pserver-0.2.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file django-pserver-0.2.tar.gz.

File metadata

File hashes

Hashes for django-pserver-0.2.tar.gz
Algorithm Hash digest
SHA256 e4dff54ab220b861cc61ff78e1df44b6945563000e2a16cb621b30525b5cff06
MD5 b3072ef38b79c4d706f759c29aa1f7a9
BLAKE2b-256 b2a51741b5e90ee3cd86f01d7d37f9f769255610d57f0483a4e0429cbdf70ab1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page