Skip to content

Commit

Permalink
Removed comment and fixed urls.py indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JusticeV452 committed May 14, 2024
1 parent af9e074 commit 130c59f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 45 deletions.
87 changes: 43 additions & 44 deletions backend/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,52 +20,51 @@
from app import views, api_views

urlpatterns = [
# Django admin page
path('admin/', admin.site.urls),
# Django admin page
path('admin/', admin.site.urls),

################################################################################
# View Pages
################################################################################
path('', views.index),
path('competitiveness/', views.competitiveness),
path('campaign-finance/top-10-donors-piechart/', views.PieChart),
path('campaign-finance/top-10-donors-barchart/', views.BarChart),
path('campaign-finance/donor-party-sankey/', views.FinanceSankey),
path('castemap/', views.LoknitiCasteMap),
################################################################################
# View Pages
################################################################################
path('', views.index),
path('competitiveness/', views.competitiveness),
path('campaign-finance/top-10-donors-piechart/', views.PieChart),
path('campaign-finance/top-10-donors-barchart/', views.BarChart),
path('campaign-finance/donor-party-sankey/', views.FinanceSankey),
path('castemap/', views.LoknitiCasteMap),


################################################################################
# API endpoints
################################################################################
path('api/1951-1962elections/', api_views.all_elections),
path('api/1962-2019seats/', api_views.all_seats),
path('api/ls-elections/', api_views.all_ls_elections),
path('api/ls-elections/<int:year>/', api_views.get_ls_election_year),
path('api/ls-elections/<int:year>/<str:state>/<int:constituency_no>/',
api_views.get_specific_ls_election),
path("api/SDE_DATA_IN_F7DSTRBND_1991/",
api_views.get_SDE_DATA_IN_F7DSTRBND_1991),
path("api/all-campaign-finance/", api_views.campaign_finance),
path("api/campaign-finance/party-donor-pair/<str:party_name>/<str:donor_name>/",
api_views.campaign_finance),
path("api/campaign-finance/all-donors/<str:party_name>/",
api_views.campaign_finance_party_subset),
path("api/campaign-finance/all-parties/<str:donor_name>/",
api_views.campaign_finance_donor_subset),
path("api/India_PC_2019_simplified/",
api_views.get_India_PC_2019_simplified),
path("api/India_PC_2019/",
api_views.get_India_PC_2019),
path("api/competitiveness_colors/<int:election_year>/",
api_views.get_competitiveness_data),
path("api/codebook/",
api_views.get_lokniti_codebook),
path("api/responderstest/",
api_views.get_lokniti_responders),
path("api/responders/<int:election_year>/<str:state_name>/<int:pc_id>",
api_views.get_responders_by_constituency),
path("api/caste_colors/<int:election_year>/",
api_views.get_caste_data),

################################################################################
# API endpoints
################################################################################
path('api/1951-1962elections/', api_views.all_elections),
path('api/1962-2019seats/', api_views.all_seats),
path('api/ls-elections/', api_views.all_ls_elections),
path('api/ls-elections/<int:year>/', api_views.get_ls_election_year),
path('api/ls-elections/<int:year>/<str:state>/<int:constituency_no>/',
api_views.get_specific_ls_election),
path("api/SDE_DATA_IN_F7DSTRBND_1991/",
api_views.get_SDE_DATA_IN_F7DSTRBND_1991),
path("api/all-campaign-finance/", api_views.campaign_finance),
path("api/campaign-finance/party-donor-pair/<str:party_name>/<str:donor_name>/",
api_views.campaign_finance),
path("api/campaign-finance/all-donors/<str:party_name>/",
api_views.campaign_finance_party_subset),
path("api/campaign-finance/all-parties/<str:donor_name>/",
api_views.campaign_finance_donor_subset),
path("api/India_PC_2019_simplified/",
api_views.get_India_PC_2019_simplified),
path("api/India_PC_2019/",
api_views.get_India_PC_2019),
path("api/competitiveness_colors/<int:election_year>/",
api_views.get_competitiveness_data),
path("api/codebook/",
api_views.get_lokniti_codebook),
path("api/responderstest/",
api_views.get_lokniti_responders),
path("api/responders/<int:election_year>/<str:state_name>/<int:pc_id>",
api_views.get_responders_by_constituency),
path("api/caste_colors/<int:election_year>/",
api_views.get_caste_data),

]
1 change: 0 additions & 1 deletion frontend/components/CasteMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const CasteMap = () => {
const [previewData, setPreviewData] = useState(null);
const [previewId, setPreviewId] = useState(null);
const [mapChanged, setMapChanged] = useState(false);
// COMMENTED VARIABLES USED TO GET INITIAL DATA TO PLACE ON BACKEND

const constituencyDataRef = useRef(constituencyData);

Expand Down

0 comments on commit 130c59f

Please sign in to comment.