divio/django-cms — pull request #1494 by ojii (2012-10-26 11:20:24+00:00)
Title: Added signal which is fired when server needs restart

I want to merge back some functionality we developed over at djeese.com into mainline django CMS.

As we all know, adding, removing or changing apphook pages requires a
server restart. Until now, the maintainer/content-editors of a site
had to do and detect this manually.

I propose we add a signal ``cms.signals.urls_need_reloading`` which
fires when the CMS detects the server needs a restart.

This signal is just sent by the django CMS. The core itself does nothing
when this signal is sent. However it allows developers to write custom
listeners to that signal that take an appropriate action in their
envirnment.

For some common use cases, there might even be generic implementations
(outside djagno-cms core) which solve this issue (eg killing os.getppid
in single-server gunicorn systems).