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

.get_for(document).
This commit is contained in:
Roberto Rosario
2017-02-12 01:16:58 -04:00
parent dbd614f504
commit a3959aaf79
9 changed files with 316 additions and 11 deletions

View File

@@ -174,9 +174,7 @@ class DocumentSmartLinkListView(SmartLinkListView):
}
def get_smart_link_queryset(self):
return ResolvedSmartLink.objects.filter(
document_types=self.document.document_type, enabled=True
)
return ResolvedSmartLink.objects.get_for(document=self.document)
class SmartLinkCreateView(SingleObjectCreateView):