diff --git a/camp_fin/templates/base.html b/camp_fin/templates/base.html
index 940348c..1fc68da 100644
--- a/camp_fin/templates/base.html
+++ b/camp_fin/templates/base.html
@@ -106,7 +106,10 @@
diff --git a/camp_fin/urls.py b/camp_fin/urls.py
index b9536f5..a919758 100644
--- a/camp_fin/urls.py
+++ b/camp_fin/urls.py
@@ -13,12 +13,15 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
+
from django.contrib import admin
from django.urls import include, path
+from django.views.generic import RedirectView
from rest_framework import routers
from camp_fin.views import (
AboutView,
+ CampaignFinanceDownloadView,
CandidateDetail,
CandidateList,
CommitteeDetail,
@@ -27,13 +30,13 @@
ContributionDownloadViewSet,
ContributionViewSet,
DonationsView,
- DownloadView,
ExpenditureDetail,
ExpenditureDownloadViewSet,
ExpenditureViewSet,
FinancialDisclosuresView,
IndexView,
LoanViewSet,
+ LobbyistDownloadView,
LobbyistsView,
OrganizationDetail,
OrganizationList,
@@ -107,7 +110,20 @@
CommitteeDetail.as_view(),
name="committee-detail",
),
- path("downloads/", DownloadView.as_view(), name="downloads"),
+ path(
+ "camp-fin-downloads/",
+ CampaignFinanceDownloadView.as_view(),
+ name="camp-fin-downloads",
+ ),
+ path(
+ "lobbyist-downloads/", LobbyistDownloadView.as_view(), name="lobbyist-downloads"
+ ),
+ # Redirect requests to the old downloads page to campaign finance downloads
+ path(
+ "downloads/",
+ RedirectView.as_view(permanent=True, url="/camp-fin-downloads/"),
+ name="downloads",
+ ),
path("organizations/", OrganizationList.as_view(), name="organization-list"),
path(
r"organizations//",
diff --git a/camp_fin/views.py b/camp_fin/views.py
index b18ef03..3b61afa 100644
--- a/camp_fin/views.py
+++ b/camp_fin/views.py
@@ -129,9 +129,9 @@ def get_context_data(self, **kwargs):
return context
-class DownloadView(PagesMixin):
- template_name = "downloads.html"
- page_path = "/downloads/"
+class CampaignFinanceDownloadView(PagesMixin):
+ template_name = "camp_fin_downloads.html"
+ page_path = "/camp-fin-downloads/"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
@@ -155,6 +155,26 @@ def get_context_data(self, **kwargs):
return context
+class LobbyistDownloadView(PagesMixin):
+ template_name = "lobbyist_downloads.html"
+ page_path = "/lobbyist-downloads/"
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+
+ seo = {}
+ seo.update(settings.SITE_META)
+
+ seo["title"] = "Data downloads"
+ seo[
+ "site_desc"
+ ] = "Download campaign finance data from New Mexico In Depth’s Money Trail NM"
+
+ context["seo"] = seo
+
+ return context
+
+
class LobbyistContextMixin(object):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
diff --git a/pages/templates/downloads.html b/pages/templates/camp_fin_downloads.html
similarity index 74%
rename from pages/templates/downloads.html
rename to pages/templates/camp_fin_downloads.html
index cdee42e..0dc1f8c 100644
--- a/pages/templates/downloads.html
+++ b/pages/templates/camp_fin_downloads.html
@@ -67,46 +67,6 @@
-
-
-
-
-
-
-
diff --git a/pages/templates/lobbyist_downloads.html b/pages/templates/lobbyist_downloads.html
new file mode 100644
index 0000000..de73328
--- /dev/null
+++ b/pages/templates/lobbyist_downloads.html
@@ -0,0 +1,57 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block title %}Data downloads{% endblock %}
+
+{% block full_content %}
+
+
+
+
Lobbyist data downloads
+
+ {{ page.text|safe }}
+
+
+
+
+
+
+
+
+
+
+
+{% endblock %}