Add PDF orientation detection. Closes GitLab issue #387.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-06-16 22:30:07 -04:00
parent 86a351e826
commit 4150fea2ad
7 changed files with 49 additions and 0 deletions
+8
View File
@@ -102,3 +102,11 @@ class TransformationManager(models.Manager):
return result
else:
return transformations
def add_for_model(self, obj, transformation, arguments=None):
content_type = ContentType.objects.get_for_model(obj)
self.create(
content_type=content_type, object_id=obj.pk,
name=transformation.name, arguments=arguments
)