Add team page#697
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Team” page to the Django main app, backed by a CSV file and rendered via a new template and route.
Changes:
- Add
TeamPageViewthat readsdata/team.csvand providesteam_members/contributorstemplate context. - Register
/team/route inmain/urls.py. - Add
main/pages/team.html, new team CSV data, and team member images.
Reviewed changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
main/views/page_views.py |
Adds TeamPageView that parses CSV and populates template context. |
main/urls.py |
Adds the team/ URL route. |
main/templates/main/pages/team.html |
Introduces the Team page template for members + contributors. |
data/team.csv |
Adds team/contributor data source for the Team page. |
main/static/assets/img/team/dave-horsfall.webp |
Adds team member image asset. |
main/static/assets/img/team/aleksandra-nenadic.webp |
Adds team member image asset. |
main/static/assets/img/team/adrian-dallesandro.webp |
Adds team member image asset. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <li class="list-inline-item"> | ||
| <a href="{{ member.github }}" | ||
| target="_blank" | ||
| class="text-decoration-none px-1"> | ||
| <i class="fa-brands fa-github"></i> | ||
| </a> | ||
| </li> | ||
| {% endif %} | ||
| {% if member.twitter %} | ||
| <li class="list-inline-item"> | ||
| <a href="{{ member.twitter }}" | ||
| target="_blank" | ||
| class="text-decoration-none px-1"> | ||
| <i class="fa-brands fa-twitter"></i> | ||
| </a> | ||
| </li> | ||
| {% endif %} | ||
| {% if member.linkedin %} | ||
| <li class="list-inline-item"> | ||
| <a href="{{ member.linkedin }}" | ||
| target="_blank" | ||
| class="text-decoration-none px-1"> | ||
| <i class="fa-brands fa-linkedin"></i> |
| def _safe_get(row: list[str], index: int | None) -> str: | ||
| if index is None or index >= len(row): | ||
| return "" | ||
| return row[index].strip() | ||
|
|
||
| def _safe_int(value: str, default: int = 999) -> int: | ||
| try: | ||
| return int(value) | ||
| except (TypeError, ValueError): | ||
| return default |
| class TeamPageView(TemplateView): | ||
| """View that renders the team page from CSV.""" | ||
|
|
||
| template_name = "main/pages/team.html" | ||
|
|
||
| def get_context_data(self, **kwargs: Mapping[str, Any]) -> dict[str, Any]: | ||
| """Add grouped team and contributor data to the template context.""" | ||
| context = super().get_context_data(**kwargs) |
| csv_path = Path("data/team.csv") | ||
| team_members: list[dict[str, Any]] = [] |
anenadic
left a comment
There was a problem hiding this comment.
This may have been fixed on some of the other branches but "Our team" link in the footer points to the events page.
Otherwise - great stuff @davehorsfall.
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
I like the page! Although I think the logic could do with another attempt to make it simpler. A couple of things to do still:
- Update the link in the footer to point to this page.
- Include photos of all the Team members or label them as contributors, instead (see image below)
- Include a test for this view
|
We need to add @PhilReedData's role as the Engagement Lead of DIRECT @AdrianDAlessandro @davehorsfall |
I have added myself in the branch. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
This PR adds a team page that is constructed from a CSV list of team members. The list will split people into two groups.
The active team members should include more details. The contributors will just be a list. I've added myself, Aleks and Adrian initially. We need to add others to the team list, and populate their details.
Fixes # (issue)
Type of change
Key checklist
python -m pytest)mkdocs serve)pre-commit run --all-files)Further checks