Initial commit of document source transformations
This commit is contained in:
8
apps/sources/managers.py
Normal file
8
apps/sources/managers.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.db import models
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
|
||||
class SourceTransformationManager(models.Manager):
|
||||
def get_for_object(self, obj):
|
||||
ct = ContentType.objects.get_for_model(obj)
|
||||
return self.model.objects.filter(content_type=ct).filter(object_id=obj.pk)
|
||||
Reference in New Issue
Block a user