You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
392 B
12 lines
392 B
# -*- coding: utf-8 -*-
|
|
from django.core.management.base import NoArgsCommand
|
|
from django.utils import timezone
|
|
|
|
from project.teasers.models import PathTeaser
|
|
|
|
|
|
class Command(NoArgsCommand):
|
|
help = u'Удалить старые записи из модели PathTeaser.'
|
|
|
|
def handle_noargs(self, **options):
|
|
PathTeaser.objects.filter(expire_date__lt=timezone.now()).delete()
|
|
|