-
Notifications
You must be signed in to change notification settings - Fork 2
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
Display 2025 methodology #661
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
does not attempt any of the scores, so we can import questions to display on a methodology page
means we can have e.g. /2023/sections/ to split out different years
these now have a different namespace so update the url names
defaults to settings.PLAN_YEAR if no year in the url
mostly updates settings.PLAN_YEAR to self.request.year but also adds a year param to the appropriate functions where it was missing
move most of the content out to per year includes so these can be updated with new text as appropriate
- New `scoring/base-minimal.html` layout for pages where we don’t want the full nav, header, and footer… like the Login and Down pages. - Update `scoring/login.html` and `scoring/down.html` to use the new `scoring/base-minimal.html`. This fixes the previously un-styled look of these pages since they’re now using the right header/footer markup. - Render `scoring/login.html` form with django-bootstrap4 for slightly better form input styling. - Rename `CheckForDownPageMixin` to `PrivateScorecardsAccessMixin` for clarity. It’s not checking whether there’s a down page, it’s checking whether the scorecards are set to private. - Fix broken redirect behaviour in PrivateScorecardsAccessMixin and LoginView. The custom `get_success_url()` in LoginView was preventing Django’s default LoginView/RedirectURLMixin behaviour from picking up the `?next=` parameter in the URL, and to make things worse, we were also setting the parameter to `?redirect_to=` rather than `?next=` so it was never going to work. Stripping out all the customisations in PrivateScorecardsAccessMixin and LoginView means we benefit from the sensible defaults in Django’s built-in AccessMixin and LoginView. - Move `LOGIN_URL` config setting out of CheckForDownPageMixin and into `settings.py` (again, this is where Django’s AccessMixin expects it).
There are points when we want to display the next year's scorecards methodology as the default rather than the cuurent years to add a METHODLOGY_YEAR setting and use that in place of the PLAN_YEAR if we're not viewing a specific year.
Hard-coded at the moment, based on `question.code`.
Always filter by year
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the site to allow the display of multiple scorecard years by adding the year to the start of the url.
It defaults to displaying the year set in
settings.PLAN_YEAR
Fixes #643
Fixes #608