Skip to content
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

(Email) Notification Command #38

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

c0rydoras
Copy link
Collaborator

@c0rydoras c0rydoras commented Jul 11, 2023

this is a draft, it depends on #73 and will probably be done from scratch once #73 is merged

  • Notifications can be configured in the settings.py with a template and a schedule
# 'template-name', when it gets sent (before/after EOL) 
NOTIFICATIONS = [
    ("first-warning", timedelta(days=180)),
    ("second-warning", timedelta(days=90)),
    ("third-warning", timedelta(days=31)),
    ("final-warning", timedelta(days=10)),
    ("first-alert", timedelta(days=0)),
    ("second-alert", timedelta(days=-10)),
    ("third-alert", timedelta(days=-30)),
    ("final-alert", timedelta(days=-60)),
]
  • Templates for mails are raw text templates e.g.
{% extends 'base-warning.txt' %}

{% block subject %}Your project will go out of date soon{% endblock %}

{% block content %}
first warning text
{% endblock %}
  • Management commands
./manage.py notify <project-name> # notify project with name <project-name>
./manage.py notify-all # notify all projects
./manage.py update-notifications # update notifications to match those in settings.py

@c0rydoras c0rydoras self-assigned this Jul 11, 2023
@c0rydoras c0rydoras force-pushed the django-notification-command branch 2 times, most recently from 9a00f76 to ada338e Compare July 17, 2023 08:45
@c0rydoras c0rydoras force-pushed the django-notification-command branch from ada338e to 7f99cd3 Compare August 3, 2023 09:43
@c0rydoras c0rydoras marked this pull request as ready for review August 3, 2023 09:44
@c0rydoras c0rydoras force-pushed the django-notification-command branch from 7f99cd3 to ef5ec4f Compare August 3, 2023 09:45
@c0rydoras c0rydoras requested a review from open-dynaMIX August 3, 2023 09:56
@c0rydoras c0rydoras force-pushed the django-notification-command branch 4 times, most recently from c6c5e50 to 5fa8790 Compare August 9, 2023 09:45
@c0rydoras c0rydoras linked an issue Aug 18, 2023 that may be closed by this pull request
@c0rydoras c0rydoras force-pushed the django-notification-command branch from 5fa8790 to 3647d5d Compare October 24, 2023 12:05
@c0rydoras c0rydoras marked this pull request as draft October 24, 2023 12:08
@c0rydoras c0rydoras force-pushed the django-notification-command branch from 3647d5d to 6dcd17c Compare October 24, 2023 13:46
@c0rydoras c0rydoras force-pushed the main branch 6 times, most recently from ec5316f to 3f2b825 Compare February 20, 2024 12:30
@c0rydoras c0rydoras force-pushed the main branch 12 times, most recently from bcaf419 to e90b123 Compare February 20, 2024 14:00
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.

Notifications
1 participant