-
-
Notifications
You must be signed in to change notification settings - Fork 282
Integrate newsletter feature from PR #3939 #4847
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: DonnieBLT <[email protected]>
Co-authored-by: DonnieBLT <[email protected]>
❌ Pre-commit checks failedThe pre-commit hooks found issues that need to be fixed. Please run the following commands locally to fix them: # Install pre-commit if you haven't already
pip install pre-commit
# Run pre-commit on all files
pre-commit run --all-files
# Or run pre-commit on staged files only
pre-commit runAfter running these commands, the pre-commit hooks will automatically fix most issues. 💡 Tip: You can set up pre-commit to run automatically on every commit by running: pre-commit installFor more information, see the pre-commit documentation. |
| messages.error(request, "Email address is required.") | ||
| return redirect("newsletter_subscribe") | ||
|
|
||
| if not re.match(r"[^@]+@[^@]+\.[^@]+", email): |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
user-provided value
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.
@copilot fix Polynomial regular expression used on uncontrolled data
Check failure: Polynomial regular expression used on uncontrolled data
This regular expression that depends on a user-provided value may run slow on strings with many repetitions of '?'.
| data = json.loads(request.body) | ||
| email = data.get("email") | ||
|
|
||
| if not email or not re.match(r"[^@]+@[^@]+\.[^@]+", email): |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
user-provided value
|
👋 Hi @copilot! This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:
Once a valid peer review is submitted, this check will pass automatically. Thank you! |
❌ Pre-commit checks failedThe pre-commit hooks found issues that need to be fixed. Please run the following commands locally to fix them: # Install pre-commit if you haven't already
pip install pre-commit
# Run pre-commit on all files
pre-commit run --all-files
# Or run pre-commit on staged files only
pre-commit runAfter running these commands, the pre-commit hooks will automatically fix most issues. 💡 Tip: You can set up pre-commit to run automatically on every commit by running: pre-commit installPre-commit outputFor more information, see the pre-commit documentation. |
❌ Pre-commit checks failedThe pre-commit hooks found issues that need to be fixed. Please run the following commands locally to fix them: # Install pre-commit if you haven't already
pip install pre-commit
# Run pre-commit on all files
pre-commit run --all-files
# Or run pre-commit on staged files only
pre-commit runAfter running these commands, the pre-commit hooks will automatically fix most issues. 💡 Tip: You can set up pre-commit to run automatically on every commit by running: pre-commit installPre-commit outputFor more information, see the pre-commit documentation. |
Integrates comprehensive newsletter functionality from PR #3939, including subscription management, email distribution, and admin interface.
Models
Newsletter: Markdown content, featured images, publication workflow, email trackingNewsletterSubscriber: Double opt-in flow, preference management, UUID-based tokensPointsmodel withrelated_name="points"for leaderboard queriesViews & URLs
/newsletter/Templates
Admin
NewsletterAdmin: Bulk send action, publication managementNewsletterSubscriberAdmin: Confirmation email resend, bulk status updatesManagement Command
send_newsletter: Bulk email distribution with test modeDependencies
django-gravatar2==1.4.4for compatibilityDatabase
Two migrations:
token_created_atfor expiration tracking (48hr)Security
Token expiration, rate limiting, CSRF protection, input sanitization, timing attack prevention.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.