Move index management code to the managers.py module.
This commit is contained in:
@@ -10,7 +10,7 @@ from mptt.models import MPTTModel
|
||||
|
||||
from documents.models import Document, DocumentType
|
||||
|
||||
from .managers import IndexManager
|
||||
from .managers import IndexManager, IndexInstanceNodeManager
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
@@ -83,6 +83,8 @@ class IndexInstanceNode(MPTTModel):
|
||||
value = models.CharField(max_length=128, blank=True, verbose_name=_('Value'))
|
||||
documents = models.ManyToManyField(Document, related_name='node_instances', verbose_name=_('Documents'))
|
||||
|
||||
objects = IndexInstanceNodeManager()
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user