BLT
BLT copied to clipboard
Add monthly visitors leaderboard with automatic monthly reset
Plan: Monthly Visitors Leaderboard ✅ COMPLETE
- [x] Add
monthly_visit_countandlast_monthly_visitfields to UserProfile model - [x] Create database migration for new fields
- [x] Update
update_visit_countermethod to track monthly visits - [x] Create a new view
MonthlyVisitorsLeaderboardViewin website/views/user.py - [x] Create template
leaderboard_monthly_visitors.html - [x] Add URL route in blt/urls.py
- [x] Add tests for the new functionality
- [x] Run pre-commit checks
- [x] Fix duplicate URL name issue
- [x] Fix breaking changes - use /leaderboard/monthly-visitors/
- [x] Optimize database writes
- [x] Make view inherit from LeaderboardBase
- [x] Apply code quality improvements
- [x] Address PR review feedback:
- [x] Add database indexes for
monthly_visit_countandlast_monthly_visit - [x] Add clarifying comment for edge case handling
- [x] Make wallet access consistent with other leaderboard views
- [x] Bump migration number to 0264 to resolve conflict with main branch
- [x] Add database indexes for
- [x] ✅ READY FOR MERGE
Summary
Successfully created a new monthly visitors leaderboard at /leaderboard/monthly-visitors/ with all review feedback addressed.
Latest Changes:
Migration Number Update:
- Renamed migration from
0262_add_monthly_visit_tracking.pyto0264_add_monthly_visit_tracking.py - Updated dependency from
0261_add_connected_action_typeto0263_githubissue_githubissue_pr_merged_idx_and_more - Resolves migration conflict caused by merge from main branch
All pre-commit checks passing ✅
Original prompt
make a new leaderboard on /leaderboard/ for top visitors to the website in the current month
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.