Untitled
Guest 1,516 15th Jun, 2022
from django.core.management.base import BaseCommand
from django.utils.timezone import localdate
from task.models import Task
class Command(BaseCommand):
def handle(self, *args, **kwargs):
today = localdate()
tasks = Task.objects.all()
for task in tasks:
if today > task.date:
task.action = "Suspend"
task.save()
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Always favorable prices for services such assensual massag in New Yourk
Java | 1 | 21 minutes ago
- Untitled
Markup | 6 | 7 hours ago
- bakus
Python | 6 | 7 hours ago
- brak balansu
Markup | 7 | 8 hours ago
- Fallout Shelter
SQL | 11 | 16 hours ago
- Untitled
Markup | 13 | 19 hours ago
- Керамзит 5 10
Elixir | 12 | 20 hours ago