# Adding hints to a page Hints are small pulsing markers, called beacons, that sit on parts of a page. A visitor opens them in any order, reads what they say and carries on. Unlike a [tour](tours.md), hints do not take over the page: it stays usable while one is open, and a visitor can ignore them all. You declare the hints in Python, next to the view that renders the page, and Driver.js shows them. ## Before you start Include the package's stylesheet and scripts in your base template, and Driver.js's hints script beside them. [Installation](installation.md#include-the-packages-files-in-your-base-template) shows the lines. A page with hints then needs two things: the view puts the hints in the template context under `hints`, and the page's template outputs them with `{{ hints }}`. ## Declare the hints of a page Three classes describe hints, and each mirrors an object of Driver.js: - `Hints` is the page's hints: a name, the list of hints, and the options that apply to all of them. - `Hint` is one hint: the element it is about, a title and a description. - `Beacon` is the marker of a hint. ```python from django.views.generic import TemplateView from page_tours import Beacon, Hint, Hints REPORT_HINTS = Hints( name="reports.quarterly", hints=[ Hint( element="#export", title="Export the report", description="Download this quarter's figures as a spreadsheet.", ), Hint( element="#figures", title="The figures", description="Each row is one month.", beacon=Beacon(side="left", align="center"), ), ], ) class ReportView(TemplateView): template_name = "report.html" extra_context = {"hints": REPORT_HINTS} ``` Place `{{ hints }}` in the page's template, once: ```django {% extends "base.html" %} {% block content %}