-
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
Added council suggestions for comparison tool #698
Conversation
40c63bc
to
69e5f87
Compare
@lucascumsille I’ve wired this up, so that a maximum of 5 overall related councils are passed to the template, removing any that are already selected for comparison. I simplified some of the wording, and used flex layout for the links, rather than concatenating them into a sentence with commas. |
Marking as ready for review by @struan, so he can check I my Python isn’t too horrendous, and work out whether we should fix the linting errors or not. |
2253446
to
e68ce6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good.
I've pushed some commits to update the black version and fix the resulting linting issues. We were using an old version so I've updated it to the latest version.
context["comparisons"] = comparisons | ||
|
||
for group in council.get_related_councils(5): | ||
if group["type"].slug == "composite": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this only apply if it's composite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want the 5 "overall" similar councils, not the other types of similarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I just copied this block, wholesale, from the caps app)
3bdc2a9
to
b8bf1cb
Compare
b8bf1cb
to
ada8938
Compare
ada8938
to
8c2fe10
Compare
Fixes: #686
I left some comments regarding things that are pending, but front-end related I think it should be ready.
Preview here: