Skip to content

Feat: validate district URL and add 404 handler #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025

Conversation

lalver1
Copy link
Member

@lalver1 lalver1 commented Apr 30, 2025

Closes #96

This PR implements validating the district number to be a number between 1-12 in the URL and implements a page not found (404) error template.

@lalver1 lalver1 self-assigned this Apr 30, 2025
Copy link

github-actions bot commented Apr 30, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pems/districts
  urls.py
Project Total  

This report was generated by python-coverage-comment-action

@lalver1 lalver1 force-pushed the feat/district-url-validation branch from 0a0ca41 to b4f77a7 Compare May 1, 2025 15:03
validate the URL pattern to only allow 1-12 for district number
@lalver1 lalver1 force-pushed the feat/district-url-validation branch from b4f77a7 to 6cacb56 Compare May 1, 2025 15:21
@lalver1 lalver1 marked this pull request as ready for review May 1, 2025 15:26
@lalver1 lalver1 requested a review from a team as a code owner May 1, 2025 15:26
@lalver1 lalver1 force-pushed the feat/district-url-validation branch from 6cacb56 to 7fb0979 Compare May 2, 2025 13:10
Copy link
Member

@thekaveman thekaveman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

This is great since the 404.html page works for any page that isn't found, beyond just the districts app e.g. /blablabla

@lalver1 lalver1 merged commit 81d3d56 into main May 2, 2025
9 checks passed
@lalver1 lalver1 deleted the feat/district-url-validation branch May 2, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate district number in district URL pattern and implement 404 handler
2 participants