Add resolved smart link API views. Add Smart link manager method

.get_for(document).
This commit is contained in:
Roberto Rosario
2017-02-12 02:22:26 -04:00
parent dbd614f504
commit a3959aaf79
9 changed files with 316 additions and 11 deletions
+3
View File
@@ -11,6 +11,7 @@ from documents.models import Document, DocumentType
from .literals import (
INCLUSION_AND, INCLUSION_CHOICES, INCLUSION_OR, OPERATOR_CHOICES
)
from .managers import SmartLinkManager
@python_2_unicode_compatible
@@ -29,6 +30,8 @@ class SmartLink(models.Model):
DocumentType, verbose_name=_('Document types')
)
objects = SmartLinkManager()
def __str__(self):
return self.label