prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Remove all paragraph content from the viewmodel in `core:index`
  From https://github.com/cal-itp/benefits/issues/366
  <img width="832" alt="image" src="https://user-images.githubusercontent.com/3673236/163299119-7b8c7696-05b5-4ade-9bc2-c5b784707a66.png">
  
  
  
  --- 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     button = viewmodels.Button.primary(text=_("core.pages.index.continue"), url=reverse("eligibility:index"))
  61     button.label = _("core.pages.agency_index.button.label")
  62 
  63     page = viewmodels.Page(
  64         content_title=_("core.pages.agency_index.content_title"),
  65         button=button,
  66         classes="home",
  67     )
  68 
  69     help_page = reverse("core:help")
  70     context_dict = {**page.context_dict(), **{"info_link": f"{help_page}#about"}}
  71 
  72     return TemplateResponse(request, "core/agency_index.html", context_dict)
  73 
  74 
  75 @middleware.pageview_decorator
  76 def help(request):
  77     """View handler for the help page."""
  78     if session.active_agency(request):
  79         agency = session.agency(request)
  80         buttons = viewmodels.Button.agency_contact_links(agency)
  81     else:
  82         buttons = [btn for a in models.TransitAgency.all_active() for btn in viewmodels.Button.agency_contact_links(a)]
  83 
  84     buttons.append(viewmodels.Button.home(request, _("core.buttons.back")))
  85 
  86     page = viewmodels.Page(
  87         title=_("core.buttons.help"),
  88         content_title=_("core.buttons.help"),
  89         buttons=buttons,
  90         classes="text-lg-center",
  91         noimage=True,
  92     )
  93 
  94     return TemplateResponse(request, "core/help.html", page.context_dict())
  95 
  96 
  97 @middleware.pageview_decorator
  98 def bad_request(request, exception, template_name="400.html"):
  99     """View handler for HTTP 400 Bad Request responses."""
  100     if session.active_agency(request):
  101         session.update(request, origin=session.agency(request).index_url)
  102     else:
  103         session.update(request, origin=_index_url())
  104 
  105     home = viewmodels.Button.home(request)
  106     page = viewmodels.ErrorPage.error(button=home)
  107     t = loader.get_template(template_name)
  108 
  109     return HttpResponseBadRequest(t.render(page.context_dict()))
  110 
  111 
  112 @middleware.pageview_decorator
  113 def csrf_failure(request, reason):
  114     """
  115     View handler for CSRF_FAILURE_VIEW with custom data.
  116     """
  117     if session.active_agency(request):
  118         session.update(request, origin=session.agency(request).index_url)
  119     else:
  120         session.update(request, origin=_index_url())
  121 
  122     home = viewmodels.Button.home(request)
  123     page = viewmodels.ErrorPage.not_found(button=home, path=request.path)
  124     t = loader.get_template("400.html")
  125 
  126     return HttpResponseNotFound(t.render(page.context_dict()))
  127 
  128 
  129 @middleware.pageview_decorator
  130 def page_not_found(request, exception, template_name="404.html"):
  131     """View handler for HTTP 404 Not Found responses."""
  132     if session.active_agency(request):
  133         session.update(request, origin=session.agency(request).index_url)
  134     else:
  135         session.update(request, origin=_index_url())
  136 
  137     home = viewmodels.Button.home(request)
  138     page = viewmodels.ErrorPage.not_found(button=home, path=request.path)
  139     t = loader.get_template(template_name)
  140 
  141     return HttpResponseNotFound(t.render(page.context_dict()))
  142 
  143 
  144 @middleware.pageview_decorator
  145 def server_error(request, template_name="500.html"):
  146     """View handler for HTTP 500 Server Error responses."""
  147     if session.active_agency(request):
  148         session.update(request, origin=session.agency(request).index_url)
  149     else:
  150         session.update(request, origin=_index_url())
  151 
  152     home = viewmodels.Button.home(request)
  153     page = viewmodels.ErrorPage.error(button=home)
  154     t = loader.get_template(template_name)
  155 
  156     return HttpResponseServerError(t.render(page.context_dict()))
  157
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/benefits/core/views.py b/benefits/core/views.py
  --- a/benefits/core/views.py
  +++ b/benefits/core/views.py
  @@ -20,11 +20,6 @@
       return _("core.pages.index.content_title")
   
   
  -def _index_paragraphs():
  -    """Helper returns the content paragraphs for the common index page."""
  -    return [_("core.pages.index.p[0]"), _("core.pages.index.p[1]"), _("core.pages.index.p[2]")]
  -
  -
   def _index_url():
       """Helper computes the index url path."""
       return reverse("core:index")
  @@ -43,7 +38,6 @@
   
       page = viewmodels.Page(
           content_title=_index_content_title(),
  -        paragraphs=_index_paragraphs(),
           buttons=buttons,
           classes="home",
       )
  
verification_info: {"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@@ -20,11 +20,6 @@\n     return _(\"core.pages.index.content_title\")\n \n \n-def _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-\n def _index_url():\n     \"\"\"Helper computes the index url path.\"\"\"\n     return reverse(\"core:index\")\n@@ -43,7 +38,6 @@\n \n     page = viewmodels.Page(\n         content_title=_index_content_title(),\n-        paragraphs=_index_paragraphs(),\n         buttons=buttons,\n         classes=\"home\",\n     )\n", "issue": "Remove all paragraph content from the viewmodel in `core:index`\nFrom https://github.com/cal-itp/benefits/issues/366\r\n<img width=\"832\" alt=\"image\" src=\"https://user-images.githubusercontent.com/3673236/163299119-7b8c7696-05b5-4ade-9bc2-c5b784707a66.png\">\r\n\r\n\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    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"}], "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_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        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"}]}