Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xamfy/django-todo
Simple todo app with email reminders
https://github.com/xamfy/django-todo
django todoapp
Last synced: about 1 month ago
JSON representation
Simple todo app with email reminders
- Host: GitHub
- URL: https://github.com/xamfy/django-todo
- Owner: xamfy
- Created: 2019-03-13T14:35:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:53:31.000Z (11 months ago)
- Last Synced: 2024-04-24T05:35:45.648Z (7 months ago)
- Topics: django, todoapp
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-todo
We can run a cron job to send email to user's email when the date set on the schedule is equal to today.
It will run the schedule_reminder management command which will send the emails using mailgun.Example:
```
0 0 * * * cd /home/xamfy/django/todo-app; /home/xamfy/django/todo-app/venv/bin/python manage.py schedule_reminder
```Example management command code:
```
class Command(BaseCommand):
def handle(self, **options):
today = datetime.datetime.now().date()
for schedule in Schedule.objects.filter(date=today, completed=False):
print(schedule.user.email)
subject = 'Schedule reminder'
body = 'Hey, please complete your schedule ' + schedule.name
send_mail(subject, body, '[email protected]',
[schedule.user.email])```