1 from django.dispatch import Signal
4 #: Sent whenever an Entity subclass has been "prepared" -- that is, after the processing necessary to make :mod:`.AttributeProxyField`\ s work has been completed. This will fire after :obj:`django.db.models.signals.class_prepared`.
6 #: Arguments that are sent with this signal:
10 entity_class_prepared = Signal(providing_args=['class'])
12 #: Sent when a :class:`~philo.models.nodes.View` instance is about to render. This allows you, for example, to modify the ``extra_context`` dictionary used in rendering.
14 #: Arguments that are sent with this signal:
17 #: The :class:`~philo.models.nodes.View` instance
20 #: The :class:`HttpRequest` instance which the :class:`~philo.models.nodes.View` is rendering in response to.
23 #: A dictionary which will be passed into :meth:`~philo.models.nodes.View.actually_render_to_response`.
24 view_about_to_render = Signal(providing_args=['request', 'extra_context'])
26 #: Sent when a view instance has finished rendering.
28 #: Arguments that are sent with this signal:
31 #: The :class:`~philo.models.nodes.View` instance
34 #: The :class:`HttpResponse` instance which :class:`~philo.models.nodes.View` view has rendered to.
35 view_finished_rendering = Signal(providing_args=['response'])
37 #: Sent when a :class:`~philo.models.pages.Page` instance is about to render as a string. If the :class:`~philo.models.pages.Page` is rendering as a response, this signal is sent after :obj:`view_about_to_render` and serves a similar function. However, there are situations where a :class:`~philo.models.pages.Page` may be rendered as a string without being rendered as a response afterwards.
39 #: Arguments that are sent with this signal:
42 #: The :class:`~philo.models.pages.Page` instance
45 #: The :class:`HttpRequest` instance which the :class:`~philo.models.pages.Page` is rendering in response to (if any).
48 #: A dictionary which will be passed into the :class:`Template` context.
49 page_about_to_render_to_string = Signal(providing_args=['request', 'extra_context'])
51 #: Sent when a :class:`~philo.models.pages.Page` instance has just finished rendering as a string. If the :class:`~philo.models.pages.Page` is rendering as a response, this signal is sent before :obj:`view_finished_rendering` and serves a similar function. However, there are situations where a :class:`~philo.models.pages.Page` may be rendered as a string without being rendered as a response afterwards.
53 #: Arguments that are sent with this signal:
56 #: The :class:`~philo.models.pages.Page` instance
59 #: The string which the :class:`~philo.models.pages.Page` has rendered to.
60 page_finished_rendering_to_string = Signal(providing_args=['string'])