Skip to content

Instantly share code, notes, and snippets.

View morty's full-sized avatar

Tom Mortimer-Jones morty

View GitHub Profile
@morty
morty / run_at_time.py
Created November 17, 2016 10:59
Simple Django management command to run the application at a given timestamp
from django.core.management.base import BaseCommand
from django.core.management import call_command
from freezegun import freeze_time
class Command(BaseCommand):
help = 'Run application at given time'
def add_arguments(self, parser):
parser.add_argument('timestamp', nargs='?',