Sponsor Management UI by JacobCoffee · Pull Request #2972 · python/pythondotorg
added 17 commits
March 22, 2026 12:05Copilot AI review requested due to automatic review settings
March 22, 2026 20:37Copilot AI review requested due to automatic review settings
March 24, 2026 22:46Complete rewrite covering: dashboard, sponsorship review workflow, 6-step composer wizard, contract lifecycle, benefits & packages with feature configs, notifications with templates and history, sponsors & contacts, bulk actions & export, and what's still in Django admin. Written in direct, human tone for new team member onboarding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dashboard shows cross-year "Expiring Soon" (90-day window with color-coded countdown) and "Recently Expired" sections with one-click "+ Renewal" buttons that launch the Composer with sponsor pre-selected and renewal flag set. Sponsorship list shows expiry tags in the Period column. Detail page shows Expiring Soon/Expired tags and a "+ Renewal" button for finalized sponsorships. Adds sponsors_manage templatetags, guide documentation, and 15 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a "Sync to Sponsorships" button on the benefit edit page that lets staff push updated benefit data (name, description, value, features) to all active sponsorships using that benefit. Shows eligible sponsorships with checkboxes, excludes rejected and expired. Includes guide documentation and 6 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Regenerate only visible when sponsorship is unlocked - New contract revision = count of historical contracts (not always 0) - Regenerate/Cancel buttons use all:unset for consistent sizing - Add Assets download and Sponsor View buttons to detail page Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The generated PDF/DOCX are what was sent to the sponsor, not the final executed version. "Sent" is accurate, "Final Version" was misleading for contracts still awaiting signature. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full CRUD for legal clauses under More > Legal Clauses. List view shows clause text preview, benefit count, and up/down move buttons for ordering. Edit page shows how many benefits reference the clause. Delete confirms with impact warning. Removes legal clause CRUD from the "admin-only" list in the guide. Includes 10 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Composer contract editor now shows insert buttons for each managed legal clause below the Legal Clauses textarea. Clicking a clause button appends its text to the field. Also removes the legal clause line from the admin-only guide section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds an asset browser under More > Assets that lists all sponsor and sponsorship assets with filters for asset type (text, image, file, response), related object (sponsor vs sponsorship), submission status (submitted vs missing), and internal name search. Uses batch-loaded lookups to avoid N+1 queries on generic relations. Removes "Detailed asset filtering" from the admin-only guide section. Includes 6 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assets grouped by sponsor company with collapsible sections and submitted/total badge (green/orange/red). Expired and rejected sponsorship assets excluded. Each row shows package name and sponsorship status. Companies with missing assets get a Send Reminder link. Refactored view into helper methods for linting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sponsor-level assets show "company-level" label instead of a Sponsor tag. Internal name no longer bold to avoid looking like a link. Sponsorship assets still link to their detail page with package and status tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a Sponsors page (More > Sponsors) to browse and search all sponsor companies with contact count, sponsorship count, location, website, and quick links to edit or create a sponsorship via the Composer. Also adds the Assets section to the guide documenting the grouped asset browser, filters, and Send Reminder feature. Updates sponsor edit to redirect back to the sponsor directory. Includes 4 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a Revenue Report page (More > Revenue) with: - Summary cards: total/finalized/approved revenue, deal count + average - Revenue by Package: full-width horizontal bar chart - Year-over-Year comparison chart - Sponsorship detail table with fee, internal value, margin percentage Dashboard revenue card now links directly to the report. Sponsorship detail page gets a collapsible Financial Breakdown section showing fee vs internal value with a coverage bar, and value-by-program mini bar chart. Guide documented. 6 tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the revenue report with a full Finances page (More > Finances) featuring Chart.js interactive charts: - Revenue Trend: stacked bar (finalized vs approved) across all years - Status Breakdown: doughnut chart for selected year - Revenue by Package: horizontal bar chart - Deal Count & Avg Size: combo bar+line chart showing trends Renames revenue -> finances throughout (URL, nav, guide, dashboard link). Sponsorship detail keeps its financial breakdown section with fee vs internal value coverage bar and per-program mini charts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings
March 25, 2026 05:08- Use json_script filter instead of |safe for chart data - Add rel="noopener noreferrer" to all target="_blank" links - Gate email date range on both start_date and end_date - Log notification persistence failures instead of silent pass - Fix test assertions to match actual view behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings
March 25, 2026 14:451. Add distinct=True to Count annotations in SponsorListView to prevent cross-multiplication of contacts × sponsorships 2. Benefit form checks bound POST year data so changing year + package in a single submit works 3. SponsorshipEditForm same fix for year-scoped package filtering 4. Clear package M2M on cloned benefits when clone_packages unchecked 5. Return sent_count from notification use case; show warning when zero emails were actually sent instead of false success 6. Show error when PDF generation fails but DOCX succeeds so staff know the contract was not finalized Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or 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