Context processors ================== Custom template context processors registered in ``TEMPLATES["OPTIONS"]["context_processors"]`` in :doc:`/architecture/settings`. They expose a handful of values to every server-rendered template. meta ---- Surfaces application metadata. Currently only ``last_price_update`` -- the datetime of the most recent share / coin price refresh. Rendered as the tooltip on the application name in the top bar. .. autofunction:: richy.core.context_processors.meta settings -------- A curated subset of Django settings made available to templates as the ``settings`` dict: ``CHART_COLORS``, ``VERSION``, ``MAX_PRECISION``, ``COINS_MAX_PRECISION``. Templates do **not** have unrestricted access to Django settings -- only these. .. autofunction:: richy.core.context_processors.settings search_form ----------- Exposes a fresh :class:`~richy.core.forms.SearchForm` instance under the name ``search_form`` so the top-bar / sidebar search renders on every page without each view having to pass it explicitly. .. autofunction:: richy.core.context_processors.search_form all_symbols ----------- Exposes the full list of :class:`~richy.core.models.Item` symbols under the name ``all_symbols`` -- consumed by the search-bar autocomplete. .. note:: Currently runs an uncached query on every request. The source carries a ``TODO`` to cache and invalidate on item add / remove. .. autofunction:: richy.core.context_processors.all_symbols