We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update rendering of Agency index page
## Background

In tandem with #366, this ticket moves the bulk of the contextual information from the application index to the agency index.

We need more flexibility on this page than the current viewmodel / page template allows for.

![image](https://user-images.githubusercontent.com/1783439/160712671-c67eee3c-7aef-4bba-bf95-c317699b7de3.png)

## Tasks

* [x] Create/update text entries in English and Spanish for each paragraph, title, etc.
* [x] Can we embed the **bold** font style in the translation?
* [x] Create text entries for a pre-button label / subhead
* [x] Create a new template `core/agency_index.html` to use for this page
* [x] In the view use the new template

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `benefits/core/views.py`
Content:
```
1 """
2 The core application: view definition for the root of the webapp.
3 """
4 from django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError
5 from django.template import loader
6 from django.template.response import TemplateResponse
7 from django.urls import reverse
8 from django.utils.translation import gettext as _
9 
10 from . import middleware, models, session, viewmodels
11 
12 
13 def PageTemplateResponse(request, page_vm):
14     """Helper returns a TemplateResponse using the common page template."""
15     return TemplateResponse(request, "core/page.html", page_vm.context_dict())
16 
17 
18 def _index_content_title():
19     """Helper returns the content title for the common index page."""
20     return _("core.pages.index.content_title")
21 
22 
23 def _index_paragraphs():
24     """Helper returns the content paragraphs for the common index page."""
25     return [_("core.pages.index.p[0]"), _("core.pages.index.p[1]"), _("core.pages.index.p[2]")]
26 
27 
28 def _index_url():
29     """Helper computes the index url path."""
30     return reverse("core:index")
31 
32 
33 @middleware.pageview_decorator
34 def index(request):
35     """View handler for the main entry page."""
36     session.reset(request)
37 
38     # generate a button to the landing page for each active agency
39     agencies = models.TransitAgency.all_active()
40     buttons = [viewmodels.Button.outline_primary(text=a.short_name, url=a.index_url) for a in agencies]
41     buttons[0].classes.append("mt-3")
42     buttons[0].label = _("core.pages.index.chooseprovider")
43 
44     page = viewmodels.Page(
45         content_title=_index_content_title(),
46         paragraphs=_index_paragraphs(),
47         buttons=buttons,
48         classes="home",
49     )
50 
51     return PageTemplateResponse(request, page)
52 
53 
54 @middleware.pageview_decorator
55 def agency_index(request, agency):
56     """View handler for an agency entry page."""
57     session.reset(request)
58     session.update(request, agency=agency, origin=agency.index_url)
59 
60     page = viewmodels.Page(
61         content_title=_index_content_title(),
62         paragraphs=_index_paragraphs(),
63         button=viewmodels.Button.primary(text=_("core.pages.index.continue"), url=reverse("eligibility:index")),
64         classes="home",
65     )
66 
67     return PageTemplateResponse(request, page)
68 
69 
70 @middleware.pageview_decorator
71 def help(request):
72     """View handler for the help page."""
73     if session.active_agency(request):
74         agency = session.agency(request)
75         buttons = viewmodels.Button.agency_contact_links(agency)
76     else:
77         buttons = [btn for a in models.TransitAgency.all_active() for btn in viewmodels.Button.agency_contact_links(a)]
78 
79     buttons.append(viewmodels.Button.home(request, _("core.buttons.back")))
80 
81     page = viewmodels.Page(
82         title=_("core.buttons.help"),
83         content_title=_("core.buttons.help"),
84         buttons=buttons,
85         classes="text-lg-center",
86         noimage=True,
87     )
88 
89     return TemplateResponse(request, "core/help.html", page.context_dict())
90 
91 
92 @middleware.pageview_decorator
93 def bad_request(request, exception, template_name="400.html"):
94     """View handler for HTTP 400 Bad Request responses."""
95     if session.active_agency(request):
96         session.update(request, origin=session.agency(request).index_url)
97     else:
98         session.update(request, origin=_index_url())
99 
100     home = viewmodels.Button.home(request)
101     page = viewmodels.ErrorPage.error(button=home)
102     t = loader.get_template(template_name)
103 
104     return HttpResponseBadRequest(t.render(page.context_dict()))
105 
106 
107 @middleware.pageview_decorator
108 def csrf_failure(request, reason):
109     """
110     View handler for CSRF_FAILURE_VIEW with custom data.
111     """
112     if session.active_agency(request):
113         session.update(request, origin=session.agency(request).index_url)
114     else:
115         session.update(request, origin=_index_url())
116 
117     home = viewmodels.Button.home(request)
118     page = viewmodels.ErrorPage.not_found(button=home, path=request.path)
119     t = loader.get_template("400.html")
120 
121     return HttpResponseNotFound(t.render(page.context_dict()))
122 
123 
124 @middleware.pageview_decorator
125 def page_not_found(request, exception, template_name="404.html"):
126     """View handler for HTTP 404 Not Found responses."""
127     if session.active_agency(request):
128         session.update(request, origin=session.agency(request).index_url)
129     else:
130         session.update(request, origin=_index_url())
131 
132     home = viewmodels.Button.home(request)
133     page = viewmodels.ErrorPage.not_found(button=home, path=request.path)
134     t = loader.get_template(template_name)
135 
136     return HttpResponseNotFound(t.render(page.context_dict()))
137 
138 
139 @middleware.pageview_decorator
140 def server_error(request, template_name="500.html"):
141     """View handler for HTTP 500 Server Error responses."""
142     if session.active_agency(request):
143         session.update(request, origin=session.agency(request).index_url)
144     else:
145         session.update(request, origin=_index_url())
146 
147     home = viewmodels.Button.home(request)
148     page = viewmodels.ErrorPage.error(button=home)
149     t = loader.get_template(template_name)
150 
151     return HttpResponseServerError(t.render(page.context_dict()))
152
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/benefits/core/views.py b/benefits/core/views.py
--- a/benefits/core/views.py
+++ b/benefits/core/views.py
@@ -57,14 +57,19 @@
     session.reset(request)
     session.update(request, agency=agency, origin=agency.index_url)
 
+    button = viewmodels.Button.primary(text=_("core.pages.index.continue"), url=reverse("eligibility:index"))
+    button.label = _("core.pages.agency_index.button.label")
+
     page = viewmodels.Page(
-        content_title=_index_content_title(),
-        paragraphs=_index_paragraphs(),
-        button=viewmodels.Button.primary(text=_("core.pages.index.continue"), url=reverse("eligibility:index")),
+        content_title=_("core.pages.agency_index.content_title"),
+        button=button,
         classes="home",
     )
 
-    return PageTemplateResponse(request, page)
+    help_page = reverse("core:help")
+    context_dict = {**page.context_dict(), **{"info_link": f"{help_page}#about"}}
+
+    return TemplateResponse(request, "core/agency_index.html", context_dict)
 
 
 @middleware.pageview_decorator

{"golden_diff": "diff --git a/benefits/core/views.py b/benefits/core/views.py\n--- a/benefits/core/views.py\n+++ b/benefits/core/views.py\n@@ -57,14 +57,19 @@\n     session.reset(request)\n     session.update(request, agency=agency, origin=agency.index_url)\n \n+    button = viewmodels.Button.primary(text=_(\"core.pages.index.continue\"), url=reverse(\"eligibility:index\"))\n+    button.label = _(\"core.pages.agency_index.button.label\")\n+\n     page = viewmodels.Page(\n-        content_title=_index_content_title(),\n-        paragraphs=_index_paragraphs(),\n-        button=viewmodels.Button.primary(text=_(\"core.pages.index.continue\"), url=reverse(\"eligibility:index\")),\n+        content_title=_(\"core.pages.agency_index.content_title\"),\n+        button=button,\n         classes=\"home\",\n     )\n \n-    return PageTemplateResponse(request, page)\n+    help_page = reverse(\"core:help\")\n+    context_dict = {**page.context_dict(), **{\"info_link\": f\"{help_page}#about\"}}\n+\n+    return TemplateResponse(request, \"core/agency_index.html\", context_dict)\n \n \n @middleware.pageview_decorator\n", "issue": "Update rendering of Agency index page\n## Background\r\n\r\nIn tandem with #366, this ticket moves the bulk of the contextual information from the application index to the agency index.\r\n\r\nWe need more flexibility on this page than the current viewmodel / page template allows for.\r\n\r\n![image](https://user-images.githubusercontent.com/1783439/160712671-c67eee3c-7aef-4bba-bf95-c317699b7de3.png)\r\n\r\n## Tasks\r\n\r\n* [x] Create/update text entries in English and Spanish for each paragraph, title, etc.\r\n* [x] Can we embed the **bold** font style in the translation?\r\n* [x] Create text entries for a pre-button label / subhead\r\n* [x] Create a new template `core/agency_index.html` to use for this page\r\n* [x] In the view use the new template\n", "before_files": [{"content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.template import loader\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\n\nfrom . import middleware, models, session, viewmodels\n\n\ndef PageTemplateResponse(request, page_vm):\n    \"\"\"Helper returns a TemplateResponse using the common page template.\"\"\"\n    return TemplateResponse(request, \"core/page.html\", page_vm.context_dict())\n\n\ndef _index_content_title():\n    \"\"\"Helper returns the content title for the common index page.\"\"\"\n    return _(\"core.pages.index.content_title\")\n\n\ndef _index_paragraphs():\n    \"\"\"Helper returns the content paragraphs for the common index page.\"\"\"\n    return [_(\"core.pages.index.p[0]\"), _(\"core.pages.index.p[1]\"), _(\"core.pages.index.p[2]\")]\n\n\ndef _index_url():\n    \"\"\"Helper computes the index url path.\"\"\"\n    return reverse(\"core:index\")\n\n\n@middleware.pageview_decorator\ndef index(request):\n    \"\"\"View handler for the main entry page.\"\"\"\n    session.reset(request)\n\n    # generate a button to the landing page for each active agency\n    agencies = models.TransitAgency.all_active()\n    buttons = [viewmodels.Button.outline_primary(text=a.short_name, url=a.index_url) for a in agencies]\n    buttons[0].classes.append(\"mt-3\")\n    buttons[0].label = _(\"core.pages.index.chooseprovider\")\n\n    page = viewmodels.Page(\n        content_title=_index_content_title(),\n        paragraphs=_index_paragraphs(),\n        buttons=buttons,\n        classes=\"home\",\n    )\n\n    return PageTemplateResponse(request, page)\n\n\n@middleware.pageview_decorator\ndef agency_index(request, agency):\n    \"\"\"View handler for an agency entry page.\"\"\"\n    session.reset(request)\n    session.update(request, agency=agency, origin=agency.index_url)\n\n    page = viewmodels.Page(\n        content_title=_index_content_title(),\n        paragraphs=_index_paragraphs(),\n        button=viewmodels.Button.primary(text=_(\"core.pages.index.continue\"), url=reverse(\"eligibility:index\")),\n        classes=\"home\",\n    )\n\n    return PageTemplateResponse(request, page)\n\n\n@middleware.pageview_decorator\ndef help(request):\n    \"\"\"View handler for the help page.\"\"\"\n    if session.active_agency(request):\n        agency = session.agency(request)\n        buttons = viewmodels.Button.agency_contact_links(agency)\n    else:\n        buttons = [btn for a in models.TransitAgency.all_active() for btn in viewmodels.Button.agency_contact_links(a)]\n\n    buttons.append(viewmodels.Button.home(request, _(\"core.buttons.back\")))\n\n    page = viewmodels.Page(\n        title=_(\"core.buttons.help\"),\n        content_title=_(\"core.buttons.help\"),\n        buttons=buttons,\n        classes=\"text-lg-center\",\n        noimage=True,\n    )\n\n    return TemplateResponse(request, \"core/help.html\", page.context_dict())\n\n\n@middleware.pageview_decorator\ndef bad_request(request, exception, template_name=\"400.html\"):\n    \"\"\"View handler for HTTP 400 Bad Request responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.error(button=home)\n    t = loader.get_template(template_name)\n\n    return HttpResponseBadRequest(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef csrf_failure(request, reason):\n    \"\"\"\n    View handler for CSRF_FAILURE_VIEW with custom data.\n    \"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.not_found(button=home, path=request.path)\n    t = loader.get_template(\"400.html\")\n\n    return HttpResponseNotFound(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef page_not_found(request, exception, template_name=\"404.html\"):\n    \"\"\"View handler for HTTP 404 Not Found responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.not_found(button=home, path=request.path)\n    t = loader.get_template(template_name)\n\n    return HttpResponseNotFound(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef server_error(request, template_name=\"500.html\"):\n    \"\"\"View handler for HTTP 500 Server Error responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.error(button=home)\n    t = loader.get_template(template_name)\n\n    return HttpResponseServerError(t.render(page.context_dict()))\n", "path": "benefits/core/views.py"}], "after_files": [{"content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.template import loader\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\n\nfrom . import middleware, models, session, viewmodels\n\n\ndef PageTemplateResponse(request, page_vm):\n    \"\"\"Helper returns a TemplateResponse using the common page template.\"\"\"\n    return TemplateResponse(request, \"core/page.html\", page_vm.context_dict())\n\n\ndef _index_content_title():\n    \"\"\"Helper returns the content title for the common index page.\"\"\"\n    return _(\"core.pages.index.content_title\")\n\n\ndef _index_paragraphs():\n    \"\"\"Helper returns the content paragraphs for the common index page.\"\"\"\n    return [_(\"core.pages.index.p[0]\"), _(\"core.pages.index.p[1]\"), _(\"core.pages.index.p[2]\")]\n\n\ndef _index_url():\n    \"\"\"Helper computes the index url path.\"\"\"\n    return reverse(\"core:index\")\n\n\n@middleware.pageview_decorator\ndef index(request):\n    \"\"\"View handler for the main entry page.\"\"\"\n    session.reset(request)\n\n    # generate a button to the landing page for each active agency\n    agencies = models.TransitAgency.all_active()\n    buttons = [viewmodels.Button.outline_primary(text=a.short_name, url=a.index_url) for a in agencies]\n    buttons[0].classes.append(\"mt-3\")\n    buttons[0].label = _(\"core.pages.index.chooseprovider\")\n\n    page = viewmodels.Page(\n        content_title=_index_content_title(),\n        paragraphs=_index_paragraphs(),\n        buttons=buttons,\n        classes=\"home\",\n    )\n\n    return PageTemplateResponse(request, page)\n\n\n@middleware.pageview_decorator\ndef agency_index(request, agency):\n    \"\"\"View handler for an agency entry page.\"\"\"\n    session.reset(request)\n    session.update(request, agency=agency, origin=agency.index_url)\n\n    button = viewmodels.Button.primary(text=_(\"core.pages.index.continue\"), url=reverse(\"eligibility:index\"))\n    button.label = _(\"core.pages.agency_index.button.label\")\n\n    page = viewmodels.Page(\n        content_title=_(\"core.pages.agency_index.content_title\"),\n        button=button,\n        classes=\"home\",\n    )\n\n    help_page = reverse(\"core:help\")\n    context_dict = {**page.context_dict(), **{\"info_link\": f\"{help_page}#about\"}}\n\n    return TemplateResponse(request, \"core/agency_index.html\", context_dict)\n\n\n@middleware.pageview_decorator\ndef help(request):\n    \"\"\"View handler for the help page.\"\"\"\n    if session.active_agency(request):\n        agency = session.agency(request)\n        buttons = viewmodels.Button.agency_contact_links(agency)\n    else:\n        buttons = [btn for a in models.TransitAgency.all_active() for btn in viewmodels.Button.agency_contact_links(a)]\n\n    buttons.append(viewmodels.Button.home(request, _(\"core.buttons.back\")))\n\n    page = viewmodels.Page(\n        title=_(\"core.buttons.help\"),\n        content_title=_(\"core.buttons.help\"),\n        buttons=buttons,\n        classes=\"text-lg-center\",\n        noimage=True,\n    )\n\n    return TemplateResponse(request, \"core/help.html\", page.context_dict())\n\n\n@middleware.pageview_decorator\ndef bad_request(request, exception, template_name=\"400.html\"):\n    \"\"\"View handler for HTTP 400 Bad Request responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.error(button=home)\n    t = loader.get_template(template_name)\n\n    return HttpResponseBadRequest(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef csrf_failure(request, reason):\n    \"\"\"\n    View handler for CSRF_FAILURE_VIEW with custom data.\n    \"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.not_found(button=home, path=request.path)\n    t = loader.get_template(\"400.html\")\n\n    return HttpResponseNotFound(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef page_not_found(request, exception, template_name=\"404.html\"):\n    \"\"\"View handler for HTTP 404 Not Found responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.not_found(button=home, path=request.path)\n    t = loader.get_template(template_name)\n\n    return HttpResponseNotFound(t.render(page.context_dict()))\n\n\n@middleware.pageview_decorator\ndef server_error(request, template_name=\"500.html\"):\n    \"\"\"View handler for HTTP 500 Server Error responses.\"\"\"\n    if session.active_agency(request):\n        session.update(request, origin=session.agency(request).index_url)\n    else:\n        session.update(request, origin=_index_url())\n\n    home = viewmodels.Button.home(request)\n    page = viewmodels.ErrorPage.error(button=home)\n    t = loader.get_template(template_name)\n\n    return HttpResponseServerError(t.render(page.context_dict()))\n", "path": "benefits/core/views.py"}]}