Move index management code to the managers.py module.

This commit is contained in:
Roberto Rosario
2015-07-08 18:56:07 -04:00
parent 3af3747be9
commit e635a3520f
6 changed files with 98 additions and 110 deletions

View File

@@ -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