Skip to content

Set up HTMX and add button to subscribe to leagues#187

Draft
jeddai wants to merge 1 commit intodavidmreed:mainfrom
jeddai:subscribe-to-league
Draft

Set up HTMX and add button to subscribe to leagues#187
jeddai wants to merge 1 commit intodavidmreed:mainfrom
jeddai:subscribe-to-league

Conversation

@jeddai
Copy link
Copy Markdown
Contributor

@jeddai jeddai commented Jan 24, 2026

As it is now, this accomplishes part of #11, namely adding a button for users to subscribe to leagues and updating the database/UI accordingly. Full list of things changed here:

  • Unique constraint on User and League added to Subscription model
  • HTMX enabled in Django configs and base HTML
  • New function-based "view" and url added for toggling subscribed state
    • This view returns only the innerHTML content that should be replaced in the "Subscribe" button
  • Template tag filter for checking League subscription status

The remaining part is sending emails to subscribers, though I'm not entirely sure how to go about doing that based on the current structure of the code. @davidmreed if you have any guidance there it would be greatly appreciated!

@davidmreed
Copy link
Copy Markdown
Owner

With apologies for the conflict: I'd like to apply the HTMX feature on top of #192

@jeddai
Copy link
Copy Markdown
Contributor Author

jeddai commented Jan 26, 2026

By all means!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants