Skip to content

Commit

Permalink
Move postcodeview to core views
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Jun 25, 2024
1 parent a462916 commit cc16b63
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
13 changes: 13 additions & 0 deletions hub/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from django.db import connection
from django.db.utils import OperationalError
from django.http import JsonResponse
from django.shortcuts import render
from django.views import View
from django.views.generic import FormView, TemplateView

import mailchimp_marketing as MailChimp
Expand Down Expand Up @@ -281,3 +283,14 @@ def render_to_response(self, context, **response_kwargs):
},
status=500,
)


class PostcodeView(View):
def get(self, request):

context = {
"page_title": "Postcode to Constituency Tool",
"meta_description": "Add the new 2024 constituencies to your postcode data.",
}

return render(request, "hub/tools/postcode.html", context)
14 changes: 0 additions & 14 deletions hub/views/tools.py

This file was deleted.

4 changes: 2 additions & 2 deletions local_intelligence_hub/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.views.generic.base import RedirectView

from hub.sitemap import hub_sitemap
from hub.views import accounts, area, core, explore, landingpages, tools
from hub.views import accounts, area, core, explore, landingpages

handler404 = core.NotFoundPageView.as_view()

Expand Down Expand Up @@ -57,7 +57,7 @@
area.UnFavouriteDataSetView.as_view(),
name="unfavourite_dataset",
),
path("tools/postcode/", tools.PostcodeView.as_view(), name="postcode_converter"),
path("tools/postcode/", core.PostcodeView.as_view(), name="postcode_converter"),
path("sources/", core.SourcesView.as_view(), name="sources"),
path(
"future-constituencies/",
Expand Down

0 comments on commit cc16b63

Please sign in to comment.