Remove obsolete document printing tag

This commit is contained in:
Roberto Rosario
2016-10-31 01:14:39 -04:00
parent 6e3d99670c
commit 9eb9c93afc
2 changed files with 0 additions and 26 deletions

View File

@@ -1,26 +0,0 @@
from __future__ import unicode_literals
from django.template import Library, Node, Variable
from converter.api import get_dimensions
register = Library()
class GetImageSizeNode(Node):
def __init__(self, document):
self.document = document
def render(self, context):
document = Variable(self.document).resolve(context)
width, height = get_dimensions(document)
context['document_width'], context['document_height'] = width, height
context['document_aspect'] = float(width) / float(height)
return ''
@register.tag
def get_document_size(parser, token):
tag_name, arg = token.contents.split(None, 1)
return GetImageSizeNode(document=arg)