get frame via manage.py so it also works for private items

This commit is contained in:
j 2013-06-26 14:14:10 +02:00
commit 959479457d
3 changed files with 66 additions and 26 deletions

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.core.management.base import BaseCommand
import app.monkey_patch
from ... import models
class Command(BaseCommand):
help = 'extract frame and print path'
args = '<id> <height> <position>'
def handle(self, id, height, position, **options):
position = float(position)
i = models.Item.objects.get(itemId=id)
path = i.frame(position, height)
print path